:root {
    /* Bright Blue Theme */
    --bg-dark: #f0f8ff; /* Alice Blue */
    --surface-dark: rgba(255, 255, 255, 0.9);
    --surface-light-border: rgba(0, 0, 0, 0.1);
    --primary-blue: #2563eb;
    --naver-green: #03c75a;
    --kakao-yellow: #fee500;
    --text-primary: #1e3a8a;
    --text-muted: #475569;
    --radius-lg: 28px;
    --radius-md: 16px;
    --radius-sm: 10px;
    --glass-blur: blur(20px);
}

* {
    margin: 0; padding: 0; box-sizing: border-box;
    font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow: hidden; /* Prevent body scroll, let map handle it */
    transition: background-color 0.4s ease, color 0.4s ease;
}

.glass-panel {
    background: var(--surface-dark);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-light-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Top Navigation */
.top-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: calc(8px + env(safe-area-inset-top)) 12px 12px;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-bar {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    margin-bottom: 10px;
}

.search-bar svg {
    color: var(--text-muted);
    margin-right: 12px;
}

#search-input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.3rem;
    font-weight: 700;
    outline: none;
}
#search-input::placeholder {
    color: var(--text-muted);
    font-weight: 500;
}

/* Quick Tags */
.quick-tags {
    display: flex; gap: 10px; overflow-x: auto; margin-bottom: 16px;
    padding-bottom: 4px;
}
.quick-tags::-webkit-scrollbar { display: none; }
.quick-tags button {
    background: rgba(0,0,0,0.05); border: 1px solid rgba(0,0,0,0.1);
    color: var(--text-primary); padding: 10px 18px; border-radius: 20px;
    font-size: 1.15rem; font-weight: 700; white-space: nowrap; cursor: pointer;
    transition: background 0.2s;
}
.quick-tags button:active { background: rgba(0,0,0,0.1); }
.filter-btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    background: var(--surface-dark);
    border: 1px solid var(--surface-light-border);
    color: var(--text-primary);
    font-size: 1rem;
    white-space: nowrap;
    cursor: pointer;
}

/* Toggle Container */
.toggle-container {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    padding: 6px;
    width: 100%;
}

.toggle-btn {
    flex: 1;
    padding: 12px;
    background: var(--surface-dark);
    border: 1px solid var(--surface-light-border);
    color: var(--text-muted);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s ease;
}

.toggle-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Filter Container */
.filter-container {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    justify-content: center;
}
.filter-btn {
    padding: 8px 14px;
    background: var(--surface-dark);
    border: 1px solid var(--surface-light-border);
    color: var(--text-muted);
    border-radius: 20px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.filter-btn.active {
    background: rgba(3, 199, 90, 0.15);
    color: #03c75a;
    border-color: #03c75a;
}

/* Top Ad */
.top-ad-container {
    width: 100%;
    min-height: 0px; /* Let it collapse if empty */
    background: transparent;
    margin-top: 8px;
    border-radius: var(--radius-sm);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    border: none;
}

/* Map */
#map {
    position: absolute;
    top: 0; bottom: 0; width: 100%;
    z-index: 1;
    background: #e2e8f0;
}

/* Side Actions */
.side-actions {
    position: fixed;
    right: 20px;
    bottom: 40px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: transform 0.3s ease;
}

.action-btn {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--surface-dark);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--surface-light-border);
    color: var(--text-primary);
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    cursor: pointer;
}

/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 1001;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    box-shadow: 0 -8px 32px rgba(0,0,0,0.1);
    transform: translateY(100%); 
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding-bottom: calc(100px + env(safe-area-inset-bottom)); /* 앵커 광고 대비 여백 */
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.bottom-sheet.open {
    transform: translateY(0);
}
.bottom-sheet.half-open {
    transform: translateY(60%); /* Hide most of it so map is visible */
}

.sheet-header {
    width: 100%;
    padding: 16px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.sheet-handle {
    width: 60px; height: 6px;
    background: rgba(0,0,0,0.2);
    border-radius: 3px;
}

/* Bottom Ad Container */
.native-ad-container {
    width: 100%;
    margin-top: 24px;
    padding-top: 24px;
    border-top: none;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}

.sheet-content {
    padding: 0 24px 24px;
    overflow-y: auto;
    flex: 1;
}

/* Detail UI */
.detail-title { 
    font-size: 1.6rem; font-weight: 900; margin-bottom: 16px; color: var(--text-primary); 
}
.detail-tags {
    margin-bottom: 24px;
}
.detail-tag { 
    display: inline-block; padding: 8px 14px; border-radius: var(--radius-sm); 
    font-size: 0.95rem; font-weight: 600; margin-right: 8px; margin-bottom: 8px;
    background: rgba(0,0,0,0.05); color: var(--text-muted);
}

/* Navigation Buttons */
.nav-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    margin-top: 10px;
}

.sub-nav-group {
    display: flex;
    gap: 24px;
    justify-content: center;
    width: 100%;
}

.btn-sub-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 700;
}

.icon-circle {
    width: 64px; height: 64px;
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-weight: 900; color: white; font-size: 1.6rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.icon-google { background: #4285F4; }
.icon-naver { background: var(--naver-green); }
.icon-kakao { background: var(--kakao-yellow); color: black; }

/* Info Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.info-modal {
    background: var(--surface-dark);
    border: 1px solid var(--surface-light-border);
    width: 90%;
    max-width: 440px;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    color: var(--text-primary);
}

.modal-overlay.active .info-modal {
    transform: translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 12px;
}

.modal-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

.modal-section {
    margin-bottom: 20px;
}

.modal-section h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--primary-blue);
}

.modal-section p, .modal-section li {
    font-size: 1.25rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 10px;
}

.modal-section ul {
    padding-left: 20px;
}

.modal-footer {
    text-align: left;
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px dashed rgba(0,0,0,0.2);
}
