/* ==================== CSS VARIABLES ==================== */
:root {
    --bg: #0a0a14;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f0f0f0;
    --text-secondary: #c9cdd3;
    --text-muted: #8b919a;
    --text-dim: #5a6070;
    --accent: #10b981;
    --accent-light: #34d399;
    --accent-bg: rgba(16, 185, 129, 0.15);
    --accent-border: rgba(16, 185, 129, 0.25);
    --accent-glow: rgba(16, 185, 129, 0.35);
    --gradient-title: linear-gradient(135deg, #f0f0f0 0%, #34d399 100%);
    --progress-bg: rgba(255, 255, 255, 0.08);
}

body.light-mode {
    --bg: #f5faf8;
    --bg-card: rgba(16, 185, 129, 0.05);
    --bg-card-border: rgba(16, 185, 129, 0.12);
    --text-primary: #1a1a2e;
    --text-secondary: #4a5060;
    --text-muted: #6b7280;
    --text-dim: #9ca3af;
    --accent: #059669;
    --accent-light: #10b981;
    --accent-bg: rgba(5, 150, 105, 0.1);
    --accent-border: rgba(5, 150, 105, 0.2);
    --accent-glow: rgba(5, 150, 105, 0.25);
    --gradient-title: linear-gradient(135deg, #1a1a2e 0%, #059669 100%);
    --progress-bg: rgba(16, 185, 129, 0.1);
}

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

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.4s, color 0.4s;
    padding-top: 56px;
}

/* ==================== NAV ==================== */
.nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: rgba(10, 10, 20, 0.88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.4s;
}

body.light-mode .nav-bar {
    background: rgba(245, 250, 248, 0.92);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}

.nav-inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-logo {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.7rem;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--accent);
    background: var(--accent-bg);
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-hamburger.active span:nth-child(2) { opacity: 0; }
.nav-hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 768px) {
    .nav-hamburger { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(10, 10, 20, 0.96);
        backdrop-filter: blur(12px);
        padding: 0.5rem 1rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
    body.light-mode .nav-links { background: rgba(245, 250, 248, 0.97); }
    .nav-links.open { display: flex; }
    .nav-links a { display: block; padding: 0.7rem 0.5rem; font-size: 0.95rem; }
}

/* ==================== THEME TOGGLE ==================== */
.theme-toggle {
    position: fixed;
    top: 66px;
    right: 1.2rem;
    z-index: 100;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--accent-border);
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, background 0.3s;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--accent-bg);
}

/* ==================== PAGES ==================== */
.page {
    display: none;
    min-height: 100vh;
    position: relative;
}

.page.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==================== HERO ==================== */
.hero-container {
    text-align: center;
    padding: 2rem 1.5rem;
    max-width: 600px;
    width: 100%;
    animation: fadeUp 0.8s ease;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: var(--accent-bg);
    color: var(--accent-light);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid var(--accent-border);
}

.hero-title {
    font-size: 2.6rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 1.2rem;
    background: var(--gradient-title);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1rem;
    color: var(--text-muted);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    word-break: keep-all;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 14px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.hero-stats {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* ==================== INFO SECTIONS ==================== */
.info-section {
    width: 100%;
    padding: 4rem 1.5rem;
    position: relative;
    z-index: 1;
}

.info-container {
    max-width: 800px;
    margin: 0 auto;
}

.info-heading {
    font-size: 1.8rem;
    font-weight: 900;
    text-align: center;
    margin-bottom: 0.8rem;
    background: var(--gradient-title);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.info-lead {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 550px;
    margin-left: auto;
    margin-right: auto;
    word-break: keep-all;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.info-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 18px;
    padding: 1.8rem 1.3rem;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s;
}

.info-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-border);
}

.info-card-icon { font-size: 2.2rem; margin-bottom: 0.8rem; }

.info-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.info-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== SCENARIO CARDS ==================== */
.scenario-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
}

.scenario-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 18px;
    padding: 2rem 1.3rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.scenario-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-border);
    box-shadow: 0 8px 24px var(--accent-glow);
}

.scenario-icon { font-size: 2.8rem; margin-bottom: 0.8rem; }
.scenario-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.4rem; }

.scenario-meta {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0.6rem;
}

.scenario-meta span {
    font-size: 0.75rem;
    color: var(--text-dim);
    background: var(--accent-bg);
    padding: 0.2rem 0.6rem;
    border-radius: 8px;
}

/* ==================== CHAT TRAINING ==================== */
.training-container {
    width: 100%;
    max-width: 550px;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 0 1rem;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.training-header {
    padding: 1rem 0;
    flex-shrink: 0;
}

.training-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.training-progress {
    width: 100%;
    height: 4px;
    background: var(--progress-bg);
    border-radius: 2px;
    overflow: hidden;
}

.training-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

.back-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    padding: 0.3rem 0;
    transition: color 0.2s;
}

.back-btn:hover { color: var(--accent); }

.chat-area {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.chat-bubble {
    max-width: 85%;
    padding: 0.9rem 1.2rem;
    border-radius: 16px;
    font-size: 0.92rem;
    line-height: 1.7;
    animation: fadeUp 0.3s ease;
    word-break: keep-all;
}

.chat-bubble.interviewer {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    color: var(--text-secondary);
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
}

.chat-bubble .speaker-label {
    font-size: 0.72rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    display: block;
}

.chat-bubble.interviewer .speaker-label { color: var(--accent); }
.chat-bubble.user .speaker-label { color: rgba(255,255,255,0.7); }

.chat-options {
    padding: 1rem 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex-shrink: 0;
}

.chat-option-btn {
    width: 100%;
    text-align: left;
    background: var(--bg-card);
    border: 2px solid var(--bg-card-border);
    color: var(--text-secondary);
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    line-height: 1.5;
    word-break: keep-all;
}

.chat-option-btn:hover {
    background: var(--accent-bg);
    border-color: var(--accent-border);
    transform: translateY(-2px);
}

/* ==================== RESULT ==================== */
#result {
    align-items: flex-start;
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.result-container {
    width: 100%;
    max-width: 500px;
    padding: 0 1.5rem;
    margin: 0 auto;
    animation: fadeUp 0.6s ease;
    position: relative;
    z-index: 1;
}

.result-card {
    background: linear-gradient(180deg, var(--accent-bg) 0%, transparent 100%);
    border: 1px solid var(--accent-border);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.result-emoji { font-size: 4rem; margin-bottom: 0.5rem; }

.result-status {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    background: var(--gradient-title);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.result-score {
    font-size: 1rem;
    color: var(--accent-light);
    font-weight: 700;
    margin-bottom: 1.2rem;
}

.result-feedback {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.8;
    text-align: left;
}

.result-details {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 18px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.result-details h3 {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--text-primary);
}

.feedback-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.result-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: center;
    flex-wrap: wrap;
}

.retry-btn, .home-btn {
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}

.retry-btn {
    background: linear-gradient(135deg, var(--accent), #059669);
    color: #fff;
    border: none;
}

.retry-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--accent-glow); }

.home-btn {
    background: none;
    border: 1px solid var(--bg-card-border);
    color: var(--text-muted);
}

.home-btn:hover { border-color: var(--accent-border); color: var(--accent); }

/* ==================== TIPS ==================== */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
}

.tip-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: 16px;
    padding: 1.5rem;
    transition: transform 0.2s, border-color 0.2s;
}

.tip-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-border);
}

.tip-card h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 0.6rem;
}

.tip-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== FAQ ==================== */
.faq-list { max-width: 650px; margin: 0 auto; }

.faq-item {
    border: 1px solid var(--bg-card-border);
    border-radius: 14px;
    margin-bottom: 0.8rem;
    overflow: hidden;
    background: var(--bg-card);
    transition: border-color 0.2s;
}

.faq-item:hover { border-color: var(--accent-border); }

.faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 1.1rem 1.3rem;
    cursor: pointer;
    font-family: inherit;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    line-height: 1.5;
}

.faq-question::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--text-dim);
    flex-shrink: 0;
    transition: transform 0.3s;
}

.faq-item.open .faq-question::after { content: '\2212'; color: var(--accent); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer { max-height: 300px; padding: 0 1.3rem 1.1rem; }

.faq-answer p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.8; }

/* ==================== FOOTER ==================== */
.footer-sections {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1rem;
    position: relative;
    z-index: 1;
}

.section-heading {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}

.section-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1.2rem; }

.contact-section {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--bg-card-border);
}

.form-group { margin-bottom: 1rem; }

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--bg-card-border);
    border-radius: 12px;
    font-size: 0.9rem;
    font-family: inherit;
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-dim); }

.form-group textarea { resize: vertical; min-height: 80px; }

body.light-mode .form-group input,
body.light-mode .form-group textarea {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.1);
}

.contact-submit-btn {
    display: block;
    width: 100%;
    padding: 0.8rem;
    background: linear-gradient(135deg, var(--accent), #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.contact-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--accent-glow);
}

.success-msg {
    text-align: center;
    margin-top: 1rem;
    font-weight: 700;
    color: var(--accent);
    font-size: 0.95rem;
}

.footer-bottom { text-align: center; padding: 1rem 0 2rem; }

.footer-legal-links {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 0.8rem;
}

.footer-legal-links a { color: var(--text-dim); text-decoration: none; font-size: 0.8rem; transition: color 0.2s; }
.footer-legal-links a:hover { color: var(--accent); }
.footer-legal-links span { color: var(--text-dim); font-size: 0.7rem; }

.footer-bottom p { color: var(--text-dim); font-size: 0.75rem; }

/* ==================== MODALS ==================== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--bg);
    border: 1px solid var(--bg-card-border);
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: fadeUp 0.3s ease;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover { background: var(--accent-bg); }

.modal-content h2 { font-size: 1.3rem; font-weight: 800; margin-bottom: 1.2rem; padding-right: 2rem; }
.modal-body h3 { font-size: 0.95rem; font-weight: 700; margin-top: 1.2rem; margin-bottom: 0.4rem; }
.modal-body p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 0.4rem; }
.modal-body ul { padding-left: 1.2rem; margin-bottom: 0.4rem; }
.modal-body li { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.8; }

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 12px;
    font-size: 0.9rem;
    z-index: 1000;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ==================== ANIMATIONS ==================== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .info-grid, .scenario-grid { grid-template-columns: 1fr; }
    .tips-grid { grid-template-columns: 1fr; }
    .info-heading { font-size: 1.5rem; }
    .hero-title { font-size: 2rem; }
    .info-section { padding: 3rem 1.2rem; }
}

@media (max-width: 500px) {
    .hero-title { font-size: 1.8rem; }
    .cta-btn { width: 100%; justify-content: center; }
    .result-card { padding: 2rem 1.5rem; }
    .modal-content { padding: 1.5rem; }
    .result-actions { flex-direction: column; }
    .retry-btn, .home-btn { width: 100%; text-align: center; }
}
