:root {
    /* 감성 캠핑 컬러 팔레트 */
    --primary-color: #2F4F4F; /* Dark Slate Gray */
    --primary-light: #4A6E6E;
    --accent-color: #D2B48C; /* Tan / Beige */
    --accent-dark: #C19A6B;
    --bg-color: #F8F5F0; /* Off-white warm */
    --surface-color: #FFFFFF;
    --text-main: #333333;
    --text-muted: #666666;
    --border-color: #E2DDD5;
    
    --shadow-sm: 0 2px 8px rgba(47, 79, 79, 0.08);
    --shadow-md: 0 8px 16px rgba(47, 79, 79, 0.12);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* App Container (Responsive) */
#app-container {
    max-width: 800px;
    margin: 0 auto;
    min-height: 100vh;
    background-color: var(--bg-color);
    box-shadow: 0 0 40px rgba(0,0,0,0.1);
    position: relative;
    overflow-x: hidden;
}

/* Header */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: var(--surface-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-title {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary-color);
    cursor: pointer;
}

.icon-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Views (SPA) */
.view {
    display: none;
    animation: fadeIn 0.3s ease;
    padding-bottom: 40px;
}
.view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
    padding: 40px 24px 20px;
    background: linear-gradient(to bottom, var(--surface-color), var(--bg-color));
}
.hero-section h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 12px;
    color: var(--primary-color);
    font-weight: 900;
}
.highlight-text {
    color: var(--accent-dark);
    position: relative;
}
.highlight-text::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 8px;
    background-color: rgba(210, 180, 140, 0.4);
    z-index: -1;
}
.hero-section p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Search Box */
.search-box {
    padding: 0 24px;
    margin-top: 24px;
}
.form-group {
    margin-bottom: 24px;
}
.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-light);
}

.custom-select {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--surface-color);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    appearance: none;
    outline: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232F4F4F' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    transition: border-color 0.2s;
}
.custom-select:focus { border-color: var(--primary-light); }

.custom-input {
    width: 100%;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background-color: var(--surface-color);
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s;
}
.custom-input:focus { border-color: var(--primary-light); }

/* Theme Grid */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.theme-btn {
    background-color: var(--surface-color);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.theme-btn.selected {
    border-color: var(--primary-color);
    background-color: rgba(47, 79, 79, 0.05);
}
.theme-icon { font-size: 1.5rem; }
.theme-name { font-size: 0.8rem; font-weight: 500; }

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 18px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: var(--shadow-sm);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:hover { background-color: var(--primary-light); }

/* List View */
.list-header {
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.list-header h2 { font-size: 1.4rem; color: var(--primary-color); font-weight: 900; }
#list-result-count { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; }

.camp-list { 
    padding: 0 20px; 
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}
.camp-card {
    background: var(--surface-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    /* margin-bottom removed because gap handles it */
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.camp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.camp-card:active { transform: scale(0.98); }
.card-img-wrap {
    width: 100%;
    height: 180px;
    background-color: #eee;
    position: relative;
}
.card-img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(4px);
}
.card-body { padding: 16px; }
.card-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.card-desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    background: var(--bg-color);
    color: var(--primary-light);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Detail View */
.detail-hero { width: 100%; height: 240px; position: relative; background: #eee; }
.detail-img { width: 100%; height: 100%; object-fit: cover; }
.detail-content-wrap {
    padding: 24px;
    background: var(--surface-color);
    border-radius: 24px 24px 0 0;
    margin-top: -20px;
    position: relative;
    min-height: calc(100vh - 220px);
}
.detail-title { font-size: 1.5rem; font-weight: 900; margin-bottom: 8px; color: var(--primary-color); }
.detail-addr { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; display: flex; align-items: center; gap: 4px; }
.detail-section { margin-bottom: 24px; }
.detail-section-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; border-bottom: 2px solid var(--bg-color); padding-bottom: 8px; }
.detail-desc { font-size: 0.95rem; line-height: 1.7; color: var(--text-main); }
.facility-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.facility-item { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; }
.facility-item i { color: var(--accent-dark); font-weight: bold; }

.action-bar-inline {
    margin: 16px 0 24px 0;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}
.btn-outline {
    flex: 1;
    padding: 12px 4px;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: var(--radius-md);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
}
.btn-reserve {
    flex: 2;
    padding: 12px 4px;
    background: var(--accent-dark);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    font-size: 1.05rem;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(193, 154, 107, 0.3);
}

/* Adsense Slots (Responsive fixed width issue solved) */
.ad-container {
    background: transparent;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    margin: 16px 20px;
    position: relative;
}
/* IMPORTANT: Fix for AdSense flexbox zero-width issue */
.ad-container ins {
    width: 100% !important;
    display: block !important;
    z-index: 1; /* 가짜 텍스트보다 위에 오도록 설정 */
}

.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-icon { font-size: 3rem; margin-bottom: 16px; display: block; }

/* Custom Modal for Outbound Links */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: fadeIn 0.2s ease;
}
.modal-content {
    background: var(--surface-color);
    width: 100%;
    max-width: 360px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 900;
}
.modal-close {
    background: none; border: none; font-size: 1.5rem; color: #adb5bd; cursor: pointer; padding: 4px;
}
.modal-body {
    padding: 24px;
}
.modal-footer {
    padding: 20px 24px 24px;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
