/* =========================================
   [테마 설정] 심플, 부드러움, 곡선, 따뜻함
   ========================================= */
:root {
    --primary-color: #FFCA28;       /* 메인: 따뜻한 앰버 옐로우 */
    --primary-hover: #FFB300;       
    --bg-color: #FDFCF8;            /* 배경: 크림 화이트 */
    --bg-cream: #FFFDE7;            /* 배경: 연한 옐로우 (섹션 구분용) */
    --surface-color: #FFFFFF;       
    
    --text-main: #4E342E;           /* 고동색 */
    --text-sub: #8D6E63;            /* 연한 갈색 */
    --border-color: #EFEBE9;

    --btn-blue: #90CAF9; --btn-green: #A5D6A7; --btn-red: #EF9A9A; --btn-purple: #CE93D8; --btn-grey: #EEEEEE;
    --radius-s: 8px; --radius-m: 16px; --radius-l: 24px; --radius-round: 50px;
    --shadow-soft: 0 4px 12px rgba(78, 52, 46, 0.08);
}

* { box-sizing: border-box; }

body {
    font-family: 'Noto Sans KR', sans-serif;
    margin: 0; padding: 0;
    background-color: var(--bg-color);
    color: var(--text-main);
    /* 중요: 랜딩 페이지 스크롤을 위해 height: 100vh 제거하고 flex 구조 변경 */
    min-height: 100vh;
}

/* =========================================
   [1. 랜딩 페이지 전용 스타일]
   ========================================= */
.landing-body {
    display: block; /* Flex 해제하여 스크롤 가능하게 */
    overflow-x: hidden; /* 가로 스크롤 방지 */
}

/* 네비게이션 */
.landing-nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 40px;
    position: sticky; top: 0; z-index: 100;
    background: rgba(253, 252, 248, 0.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.nav-logo { font-family: 'Gowun Dodum', sans-serif; font-weight: bold; font-size: 1.5rem; color: var(--text-main); }
.nav-links a { margin-left: 30px; text-decoration: none; color: var(--text-sub); font-weight: bold; transition: 0.3s; }
.nav-links a:hover { color: var(--primary-color); }

/* 히어로 섹션 */
.landing-hero {
    height: 90vh; /* 화면 가득 채우기 */
    display: flex; justify-content: center; align-items: center;
    text-align: center; position: relative;
    background: linear-gradient(180deg, var(--bg-color) 0%, #FFF 100%);
}
.landing-content { 
    z-index: 2; 
    max-width: 900px; /* 기존 600px -> 900px로 넓힘 (중요!) */
    padding: 20px; 
    animation: fadeIn 1s ease-out; 
}
.landing-title { 
    font-family: 'Gowun Dodum', sans-serif; 
    font-size: 3.5rem; 
    line-height: 1.4; 
    margin-bottom: 25px; 
    color: var(--text-main);
    
    /* 단어 중간 끊김 방지 */
    word-break: keep-all; 
}
.landing-desc { font-size: 1.2rem; color: var(--text-sub); margin-bottom: 50px; line-height: 1.6; }
.badge { display: inline-block; background-color: #FFF3E0; color: #FF9800; padding: 8px 20px; border-radius: var(--radius-round); font-weight: bold; margin-bottom: 25px; font-family: 'Gowun Dodum', sans-serif; }
.btn-main-start {
    display: inline-block; background-color: var(--primary-color); color: var(--text-main);
    padding: 18px 45px; border-radius: var(--radius-round); font-size: 1.3rem; font-weight: bold;
    text-decoration: none; box-shadow: 0 4px 15px rgba(255, 202, 40, 0.4); transition: all 0.3s ease;
}
.btn-main-start:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(255, 202, 40, 0.6); }

/* 배경 장식 원 */
.circle-bg { position: absolute; border-radius: 50%; filter: blur(80px); z-index: 1; opacity: 0.5; }
.circle-1 { width: 400px; height: 400px; background: #FFF59D; top: -10%; left: -5%; }
.circle-2 { width: 500px; height: 500px; background: #B3E5FC; bottom: -10%; right: -10%; }

/* 공통 섹션 스타일 */
.landing-section { padding: 100px 20px; text-align: center; }
.bg-cream { background-color: var(--bg-cream); }
.section-content { max-width: 1000px; margin: 0 auto; }
.section-title { font-family: 'Gowun Dodum', sans-serif; font-size: 2.5rem; margin-bottom: 15px; color: var(--text-main); }
.section-sub { color: var(--text-sub); font-size: 1.1rem; margin-bottom: 60px; }

/* 기능 카드 그리드 */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.feature-card {
    background: white; padding: 40px; border-radius: var(--radius-l);
    box-shadow: var(--shadow-soft); transition: 0.3s; border: 1px solid var(--border-color);
}
.feature-card:hover { transform: translateY(-10px); border-color: var(--primary-color); }
.feature-icon { font-size: 3rem; margin-bottom: 20px; }
.feature-card h3 { margin-bottom: 15px; color: var(--text-main); }
.feature-card p { color: var(--text-sub); line-height: 1.6; }

/* 여행지 태그 */
.destination-grid { display: flex; flex-wrap: wrap; gap: 15px; justify-content: center; }
.dest-tag {
    background: white; padding: 15px 30px; border-radius: var(--radius-round);
    font-weight: bold; color: var(--text-main); box-shadow: var(--shadow-soft);
    font-size: 1.1rem; transition: 0.3s; cursor: default;
}
.dest-tag:hover { transform: scale(1.1) rotate(-2deg); background: var(--primary-color); }

/* 철학 박스 */
.philosophy-box {
    background: white; padding: 80px 40px; border-radius: var(--radius-l);
    max-width: 800px; margin: 0 auto; box-shadow: var(--shadow-soft);
    border: 2px dashed var(--primary-color);
}
.philosophy-box h3 { font-family: 'Gowun Dodum', sans-serif; color: var(--primary-color); font-size: 1.5rem; margin-bottom: 30px; }
.philosophy-box p { font-size: 1.3rem; line-height: 2; color: var(--text-main); }

/* 푸터 */
.landing-footer { padding: 40px; text-align: center; color: var(--text-sub); font-size: 0.9rem; background: var(--bg-color); }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }


/* =========================================
   [2. 앱 기능 페이지 스타일 (create.html, view.html 등)]
   ========================================= */
/* 기존 스타일 유지하되, body가 block으로 바뀌었으므로 container에 높이 지정 */
.container { 
    display: flex; height: calc(100vh - 65px); /* 헤더 제외 높이 */ overflow: hidden; 
}

/* 아래는 기존 기능 스타일 (그대로 유지) */
header {
    background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(5px);
    text-align: center; padding: 15px; font-weight: 700; font-size: 1.3rem;
    border-bottom: 1px solid var(--border-color); color: var(--text-main);
    z-index: 10; position: sticky; top: 0; font-family: 'Gowun Dodum', sans-serif;
}
.create-container { flex-direction: column; overflow-y: auto; padding: 30px 20px; max-width: 1400px; margin: 0 auto; width: 95%; height: auto;}

/* 버튼 */
button, .btn-small, .btn-import, .btn-reset, .btn-save, .btn-add-day, .btn-route {
    font-family: 'Noto Sans KR', sans-serif; border: none; cursor: pointer; transition: all 0.2s ease;
    border-radius: var(--radius-round); font-weight: bold; color: var(--text-main);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05); display: inline-flex; align-items: center; justify-content: center;
}
button:hover, .btn-small:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.1); opacity: 0.9; }

.btn-save { background: var(--primary-color); padding: 12px 24px; font-size: 1rem; }
.btn-import { background: #FFCC80; padding: 8px 16px; margin-left: 10px; font-size: 0.9rem; }
.btn-reset { background: #FFAB91; color: var(--text-main); padding: 8px 16px; }
.btn-add-day { background: var(--btn-green); padding: 10px 20px; margin-right: 10px; }
.btn-edit { background: var(--btn-green); }
.btn-route, .btn-file-save { background: var(--btn-blue); color: #fff; }
.btn-capture { background: var(--btn-purple); color: #fff; }
.btn-small { padding: 8px 15px; font-size: 0.85rem; margin-left: 5px; text-decoration: none; }
.btn-remove-event { background: var(--btn-red); color: white; padding: 8px 12px; border-radius: var(--radius-s); box-shadow: none;}
.btn-delete-day { float: right; background: var(--btn-red); color: white; padding: 5px 12px; border-radius: var(--radius-round); font-size: 0.8rem; box-shadow: none;}
.btn-add-event { background: var(--btn-grey); color: #757575; padding: 10px; border-radius: var(--radius-s); width: 100%; margin-top: 10px; box-shadow: none; border: 1px dashed #ddd; }
.btn-add-event:hover { background: #fff; border-color: var(--primary-color); color: var(--primary-color); }

/* 입력 폼 */
.create-toolbar, .dashboard-bar {
    background: var(--surface-color); padding: 15px 20px; margin-bottom: 25px;
    border-radius: var(--radius-m); box-shadow: var(--shadow-soft);
    display: flex; justify-content: space-between; align-items: center; border: 1px solid var(--border-color);
}
.dashboard-bar { background-color: #5D4037; color: #FFF8E1; }
#total-cost-display { color: var(--primary-color); font-size: 1.1rem; }
.input-trip-title {
    width: 100%; font-size: 1.6rem; font-weight: 700; padding: 20px; margin-bottom: 25px;
    border: 2px solid transparent; border-radius: var(--radius-m); background-color: var(--surface-color);
    color: var(--text-main); text-align: center; box-shadow: var(--shadow-soft);
    font-family: 'Gowun Dodum', sans-serif;
}
.input-trip-title:focus { border-color: var(--primary-color); outline: none; }
.day-input-group {
    background: var(--surface-color); padding: 25px; border-radius: var(--radius-l);
    margin-bottom: 25px; box-shadow: var(--shadow-soft); border: 1px solid var(--border-color);
}
.day-title {
    font-size: 1.3rem; font-weight: bold; color: var(--text-main); margin-bottom: 15px;
    padding-bottom: 10px; border-bottom: 2px solid #F5F5F5; font-family: 'Gowun Dodum', sans-serif;
}
.event-row {
    display: grid;
    grid-template-columns: auto 1.2fr 1.2fr 0.7fr 0.7fr 0.8fr 0.7fr 2fr 1fr 1fr 1fr auto;
    gap: 12px; margin-bottom: 12px; align-items: center;
    background: #FAFAFA; padding: 15px; border-radius: var(--radius-s);
}
.event-row:hover { background: #FFF; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.event-row input {
    width: 100%; padding: 12px; font-size: 1rem; border: 1px solid #E0E0E0; border-radius: var(--radius-s); background-color: #fff;
}
.event-row input:focus { border-color: var(--primary-color); outline: none; }
.input-note, .input-start, .input-end { ime-mode: active; }
.drag-handle { cursor: grab; color: #BDBDBD; padding: 0 5px; font-size: 1.2rem; }

/* 뷰어 */
.schedule-container { flex: 6; overflow-y: auto; padding: 30px; background: #fff; }
.map-container { flex: 4; background: #eee; position: relative; border-left: 1px solid var(--border-color); }
iframe { width: 100%; height: 100%; border: none; }
table {
    width: 100%; border-collapse: separate; border-spacing: 0;
    margin-bottom: 40px; box-shadow: var(--shadow-soft); border-radius: var(--radius-m); overflow: hidden;
}
th { background-color: #6D4C41; color: white; padding: 12px; font-weight: normal; }
td { border-bottom: 1px solid #eee; padding: 12px; text-align: center; background: #fff; color: #555; font-size: 0.9rem; }
tr:last-child td { border-bottom: none; }
.day-header {
    font-family: 'Gowun Dodum', sans-serif; font-size: 1.4rem; padding: 10px 5px; margin-top: 30px;
    border-left: 5px solid var(--primary-color); padding-left: 15px; color: var(--text-main);
}
.thumb-img { width: 60px; height: 40px; object-fit: cover; border-radius: 6px; cursor: pointer; transition: 0.2s;}
.thumb-img:hover { transform: scale(3); z-index: 100; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.btn-map { background-color: #E0F2F1; color: #00695C; border: none; padding: 5px 10px; border-radius: var(--radius-s); font-size: 0.8rem; font-weight: bold; }
.btn-map:hover { background-color: #B2DFDB; }
td a { color: #5D4037; text-decoration: underline; font-size: 0.8rem; }

/* 체크리스트 */
.checklist-section { background: var(--surface-color); padding: 25px; border-radius: var(--radius-l); margin-top: 30px; box-shadow: var(--shadow-soft); border: 1px solid var(--border-color); }
#view-checklist-area {
    width: 50%; margin: 40px auto; padding: 20px;
    background-color: #FFF8E1; border-radius: var(--radius-m);
    box-shadow: var(--shadow-soft); border: 1px dashed var(--primary-color);
}
.checklist-input-area { width: 100%; max-width: 600px; margin: 40px 0 20px 0; display: flex; gap: 10px; }
.checklist-input-area input { flex: 1; padding: 15px; font-size: 1.1rem; border: 2px solid var(--primary-color); border-radius: var(--radius-round); outline: none; ime-mode: active; }
#full-checklist-wrapper { width: 100%; max-width: 600px; background: #fff; border-radius: var(--radius-l); box-shadow: var(--shadow-soft); padding: 20px; min-height: 300px; }
.big-check-item { display: flex; align-items: center; justify-content: space-between; padding: 15px; border-bottom: 1px solid #eee; font-size: 1.2rem; transition: 0.2s; }
.big-check-item:last-child { border-bottom: none; }
.big-check-item:hover { background-color: #FAFAFA; }
.check-label { display: flex; align-items: center; cursor: pointer; flex: 1; }
.check-label input { width: 25px; height: 25px; margin-right: 15px; accent-color: var(--primary-color); cursor: pointer; }
.check-label span { transition: 0.2s; }
.big-check-item.checked .check-label span { text-decoration: line-through; color: #ccc; }

@media (max-width: 768px) {
    /* 1. 레이아웃: 위아래로 배치 (지도가 위, 일정이 아래) */
    .container { 
        flex-direction: column-reverse; 
        height: auto; 
    }
    
    /* 2. 지도 높이 고정 */
    .map-container { 
        flex: none; 
        height: 350px; 
        width: 100%;
        border-left: none; 
        border-top: 1px solid var(--border-color); 
        z-index: 5; /* 지도 조작 우선순위 */
    }
    
    .schedule-container { 
        padding: 15px; 
        flex: none; /* 높이 자동 조절 */
        width: 100%;
    }

    /* 3. 랜딩 페이지(메인) 글씨 크기 조절 */
    .landing-title { 
        font-size: 2.2rem; 
        margin-top: 20px;
    }
    .landing-hero { height: auto; min-height: 80vh; padding: 50px 20px; }
    .landing-nav { flex-direction: column; gap: 15px; padding: 15px; }
    .nav-links { width: 100%; display: flex; justify-content: center; gap: 15px; margin: 0; }
    .nav-links a { margin: 0; font-size: 0.95rem; }

    /* 4. [중요] 일정 입력창(create.html) 모바일 최적화 */
    /* 한 줄에 다 구겨넣지 않고, 2칸씩 예쁘게 줄바꿈 */
    .event-row {
        display: grid;
        grid-template-columns: 1fr 1fr; /* 2열 배치 */
        gap: 10px;
        padding: 15px;
        border: 1px solid #eee;
        background: #fff;
    }
    
    /* 특정 입력칸은 한 줄을 꽉 채우기 */
    .drag-handle { grid-column: span 2; text-align: center; margin-bottom: 5px; background: #f5f5f5; border-radius: 4px; }
    .input-start, .input-end { grid-column: span 1; } /* 출발/도착 반반 */
    .input-note { grid-column: span 2; } /* 메모는 넓게 */
    .input-link, .input-photo, .input-map { grid-column: span 2; } /* 링크/사진/지도 넓게 */
    .btn-remove-event { grid-column: span 2; margin-top: 5px; background-color: #ffebee; color: #d32f2f; border: 1px solid #ffcdd2;}

    /* 5. 일정표 뷰어(view.html) 가로 스크롤 허용 */
    /* 테이블이 찌그러지지 않고 옆으로 넘기면서 볼 수 있게 함 */
    .schedule-container {
        overflow-x: hidden; /* 전체 컨테이너 스크롤 방지 */
    }
    #schedule-list {
        width: 100%;
        overflow-x: auto; /* 테이블 영역만 가로 스크롤 */
        -webkit-overflow-scrolling: touch; /* 부드러운 스크롤 */
    }
    table {
        min-width: 700px; /* 테이블 최소 너비 확보 (찌그러짐 방지) */
    }
    
    /* 6. 기타 요소 조정 */
    .dashboard-bar { flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }
    .dash-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
    .btn-small { flex: 1; min-width: 80px; margin: 0; }
    #view-checklist-area { width: 95%; margin: 20px auto; }
}
.btn-excel {
    background-color: #2E7D32; /* 엑셀 고유의 진한 녹색 */
    color: white;
}
.btn-excel:hover {
    background-color: #1B5E20;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}