:root {
    --body-gradient-start:   #667eea;
    --body-gradient-end:     #764ba2;
    --header-gradient-start: #2196F3;
    --header-gradient-end:   #1976D2;
    --primary-color:         #2196F3;
    --primary-dark:          #1565C0;
    --primary-light:         #E3F2FD;
    --primary-shadow:        rgba(33,150,243,0.35);
    --btn-primary-bg:        linear-gradient(135deg,#2196F3,#1565C0);
}

/* ── 테마: 퍼플 (리그전 기본) ── */
[data-theme="purple"] {
    --body-gradient-start:   #9C27B0;
    --body-gradient-end:     #7B1FA2;
    --header-gradient-start: #9C27B0;
    --header-gradient-end:   #7B1FA2;
    --primary-color:         #9C27B0;
    --primary-dark:          #7B1FA2;
    --primary-light:         #F3E5F5;
    --primary-shadow:        rgba(156,39,176,0.35);
    --btn-primary-bg:        linear-gradient(135deg,#9C27B0,#7B1FA2);
}

/* ── 테마: 오션 블루 ── */
[data-theme="ocean"] {
    --body-gradient-start:   #0288D1;
    --body-gradient-end:     #01579B;
    --header-gradient-start: #0288D1;
    --header-gradient-end:   #01579B;
    --primary-color:         #0288D1;
    --primary-dark:          #01579B;
    --primary-light:         #E1F5FE;
    --primary-shadow:        rgba(2,136,209,0.35);
    --btn-primary-bg:        linear-gradient(135deg,#0288D1,#01579B);
}

/* ── 테마: 오렌지 ── */
[data-theme="orange"] {
    --body-gradient-start:   #f2994a;
    --body-gradient-end:     #E65100;
    --header-gradient-start: #F57C00;
    --header-gradient-end:   #E65100;
    --primary-color:         #F57C00;
    --primary-dark:          #E65100;
    --primary-light:         #FFF3E0;
    --primary-shadow:        rgba(245,124,0,0.35);
    --btn-primary-bg:        linear-gradient(135deg,#F57C00,#E65100);
}

/* ── 테마: 에메랄드 ── */
[data-theme="emerald"] {
    --body-gradient-start:   #00897B;
    --body-gradient-end:     #00695C;
    --header-gradient-start: #00897B;
    --header-gradient-end:   #00695C;
    --primary-color:         #00897B;
    --primary-dark:          #00695C;
    --primary-light:         #E0F2F1;
    --primary-shadow:        rgba(0,137,123,0.35);
    --btn-primary-bg:        linear-gradient(135deg,#00897B,#00695C);
}

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

html, body {
    height: 100%;
    height: 100dvh;
    overflow: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--body-gradient-start) 0%, var(--body-gradient-end) 100%);
    padding: 10px;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ========== 키프레임 애니메이션 ========== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* ========== 상단 네비게이션 바 ========== */
#topNav {
    display: flex;
    align-items: stretch;
    background: #fff;
    border-bottom: 2px solid #f0f0f0;
    flex-shrink: 0;
}

.tnav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: none;
    background: none;
    cursor: pointer;
    padding: 8px 4px 6px;
    color: #aaa;
    font-size: 10px;
    font-weight: 600;
    transition: color 0.15s, border-bottom 0.15s;
    border-bottom: 3px solid transparent;
    -webkit-tap-highlight-color: transparent;
}

.tnav-btn.active {
    color: var(--primary-color, #2196F3);
    border-bottom: 3px solid var(--primary-color, #2196F3);
}

.tnav-icon {
    font-size: 20px;
    line-height: 1;
}

.tnav-label {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

/* 기존 탭 버튼 숨기기 (네비로 대체) */
.tab-section {
    display: none !important;
}
