/* Modern Design System - TypeTest */
:root {
    /* Color Palette - Vibrant & Premium */
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --secondary-color: #ec4899;
    --accent-color: #8b5cf6;
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.7);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles & Modern Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    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;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: -0.025em; /* Modern K-Design standard */
    word-break: keep-all;     /* Prevent awkward word breaks in Korean */
}

a { text-decoration: none; color: inherit; }
button { font: inherit; }
.lang-toggle button, .mobile-lang-toggle button { border: 0; background: transparent; cursor: pointer; color: #94a3b8; font-weight: 800; }
.lang-toggle button.active, .mobile-lang-toggle button.active { color: var(--primary-color); }
ul { list-style: none; }

/* Typography Scale */
h1, h2, h3, h4 { font-weight: 850; line-height: 1.25; color: var(--text-main); letter-spacing: -0.035em; }
h1 { font-size: clamp(2.5rem, 8vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 3vw, 1.8rem); }

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--glass);
    backdrop-filter: blur(12px);
    z-index: 1000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--primary-color);
    white-space: nowrap;
}

.logo .logo-type { color: var(--primary-color); }
.logo .logo-test { color: #334155; }

.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: var(--transition);
    white-space: nowrap;
}

.nav-links a:hover { color: var(--primary-color); }

.btn-start-nav {
    background: var(--text-main);
    color: white !important;
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: 1rem;
    padding: 0.4rem 0.8rem;
    background: #f1f5f9;
    border-radius: 99px;
}

.lang-toggle.desktop-only {
    display: flex;
}

.mobile-lang-toggle {
    display: none;
    align-items: center;
    gap: 1rem;
    justify-content: center;
    padding: 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid rgba(0,0,0,0.1);
}

.lang-toggle a, .mobile-lang-toggle a {
    font-size: 0.75rem;
    font-weight: 800;
    color: #94a3b8;
    transition: var(--transition);
}

.mobile-lang-toggle a { font-size: 1.1rem; }

.lang-toggle a.active, .mobile-lang-toggle a.active { color: var(--primary-color); }
.lang-toggle .sep, .mobile-lang-toggle .sep { color: #cbd5e1; font-size: 0.7rem; }
.mobile-lang-toggle .sep { font-size: 1rem; }

/* Sections */
.intro-section {
    padding: 10rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.intro-section.alt { background-color: var(--bg-alt); }

.intro-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 5rem;
}

.intro-text { flex: 1; text-align: left; }
.intro-visual { flex: 1; display: flex; justify-content: center; align-items: center; }

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
    border-radius: 99px;
    font-weight: 800;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.intro-text h1 { margin-bottom: 2rem; }
.intro-text h2 { margin-bottom: 1.5rem; }
.intro-text p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    line-height: 1.7;
    font-weight: 400;
}

.btn-hero {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 20px;
    font-weight: 850;
    font-size: 1.2rem;
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.4);
    transition: var(--transition);
}

.btn-hero:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(99, 102, 241, 0.5);
}

/* Theme Colors */
.theme-type16 { --primary-color: #f59e0b; --primary-hover: #d97706; --secondary-color: #ef4444; }
.theme-enneagram { --primary-color: #10b981; --primary-hover: #059669; --secondary-color: #3b82f6; }
.theme-big5 { --primary-color: #3b82f6; --primary-hover: #2563eb; --secondary-color: #8b5cf6; }

/* Visual Elements */
.visual-card {
    background: white;
    padding: 3rem;
    border-radius: 40px;
    box-shadow: var(--shadow-xl);
    text-align: center;
    border: 1px solid rgba(0,0,0,0.03);
}

.visual-icon { font-size: 4rem; margin-bottom: 1.5rem; display: block; }
.mini-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    background: white;
    padding: 2.5rem;
    border-radius: 40px;
    box-shadow: var(--shadow-xl);
}
.mini-grid span { font-size: 3rem; }

.stat-circle {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-xl);
    border: 8px solid var(--primary-color);
}
.stat-circle .num { font-size: 5rem; font-weight: 950; color: var(--primary-color); line-height: 1; }
.stat-circle .lab { font-weight: 800; color: var(--text-muted); text-transform: uppercase; }

.feature-tags { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.feature-tags span {
    padding: 1rem 2rem;
    background: white;
    border-radius: 20px;
    font-weight: 850;
    box-shadow: var(--shadow-md);
    color: var(--text-main);
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 10px;
    z-index: 2000;
}
.fade-in-up { opacity: 1 !important; transform: translateY(0) !important; }
.choose-container,.age-container { max-width: 1200px; margin: 6rem auto; padding: 3rem 2rem; text-align: center; min-height: 65vh; }
.choose-header,.age-header { margin-bottom: 3rem; }
.choose-header h1,.age-header h1 { font-size: 3rem; margin-bottom: 1rem; }
.choose-header p,.age-header p,.choose-card p,.age-card p { color: var(--text-muted); }
.age-selector { margin-bottom: 4rem; background:#f8fafc; padding:2rem; border-radius:30px; display:inline-block; }
.selector-label { font-weight:800; margin-bottom:1rem; }.age-buttons{display:flex;gap:1rem}.btn-age{padding:.8rem 2rem;border-radius:99px;border:2px solid #e2e8f0;background:#fff;cursor:pointer;font-weight:700}.btn-age.active{background:var(--primary-color);border-color:var(--primary-color);color:#fff}
.choose-grid,.age-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:2rem}.choose-card,.age-card{background:#fff;padding:3rem 2rem;border-radius:40px;box-shadow:var(--shadow-lg);transition:var(--transition);display:flex;flex-direction:column;justify-content:space-between;border:1px solid rgba(0,0,0,.03)}.choose-card:hover,.age-card:hover{transform:translateY(-12px)}.card-icon,.age-icon{font-size:4rem;margin-bottom:1.5rem}.choose-card h3,.age-card h3{margin-bottom:1rem}.choose-card p{margin-bottom:2rem}.btn-select{padding:1rem 2rem;background:linear-gradient(135deg,var(--primary-color),var(--secondary-color));color:#fff;border-radius:16px;font-weight:800}
.test-container{max-width:600px;margin:7rem auto 4rem;padding:0 2rem;min-height:60vh}.progress-bar{height:8px;background:#e2e8f0;border-radius:99px;margin-bottom:3rem;overflow:hidden}.progress-bar div{height:100%;background:linear-gradient(90deg,var(--primary-color),var(--secondary-color));transition:.4s}.quiz-card{background:#fff;padding:4rem 3rem;border-radius:40px;box-shadow:var(--shadow-xl);text-align:center}.test-label{display:inline-block;font-size:1.2rem;font-weight:850;color:var(--primary-color);margin-bottom:1rem}.quiz-card h2{font-size:1.8rem;margin-bottom:3rem}.options-grid{display:flex;flex-direction:column;gap:1.2rem}.btn-option{padding:1.5rem 2rem;border:2px solid #f1f5f9;border-radius:20px;background:#fff;font-size:1.2rem;font-weight:700;cursor:pointer}.btn-option:hover{border-color:var(--primary-color);transform:translateY(-3px)}
.result-container{max-width:900px;margin:7rem auto 4rem;padding:0 2rem;text-align:center}.result-card{background:#fff;padding:5rem 3rem;border-radius:48px;box-shadow:0 30px 60px -12px rgba(0,0,0,.08)}.result-icon-lg{font-size:7rem}.result-code{font-size:4rem;color:var(--primary-color)}.result-name{font-size:2.2rem;margin-bottom:2.5rem}.desc-wrapper{background:#f8fafc;padding:3rem;border-radius:32px;margin-bottom:4rem;text-align:left}.result-desc,.trait-desc{color:#475569;line-height:2}.result-actions{display:flex;gap:1.5rem;justify-content:center}.btn-retry,.btn-share{padding:1.25rem 3rem;border-radius:20px;font-weight:850;border:0;cursor:pointer;font-size:1.1rem}.btn-retry{background:#f1f5f9;color:#64748b}.btn-share{background:var(--primary-color);color:#fff}.big5-results{margin:4rem 0;text-align:left}.trait-block{margin-bottom:3rem}.trait-header{display:flex;justify-content:space-between;margin-bottom:1rem}.trait-name,.trait-val{font-size:1.4rem;font-weight:900}.trait-val{color:var(--primary-color)}.trait-bar{height:16px;background:#f1f5f9;border-radius:99px;overflow:hidden;margin-bottom:1.5rem}.trait-bar div{height:100%;background:linear-gradient(90deg,var(--primary-color),var(--secondary-color))}

.mobile-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--text-main);
    border-radius: 3px;
    transition: 0.3s;
}

/* Footer */
footer {
    padding: 6rem 2rem;
    background: #0f172a;
    color: white;
    text-align: center;
}

.footer-container { max-width: 800px; margin: 0 auto; }
.footer-logo { font-size: 2rem; font-weight: 900; margin-bottom: 2rem; display: block; }
.footer-logo span { color: var(--primary-color); }

.disclaimer { font-size: 0.9rem; color: #94a3b8; line-height: 1.8; margin-bottom: 3rem; }
.copyright { font-size: 0.85rem; color: #64748b; font-weight: 700; }

@media (max-width: 768px) {
    .header-container { padding: 0.8rem 1.2rem; }
    .logo { font-size: 1.2rem; }
    .desktop-only { display: none !important; }
    .mobile-toggle { display: flex; }
    .mobile-lang-toggle { display: flex; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        padding: 4rem 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.05);
        z-index: 1500;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.5rem;
        padding: 1rem;
        width: 100%;
        text-align: center;
    }

    .btn-start-nav {
        margin-top: 2rem;
        width: 100%;
        font-size: 1.2rem;
        padding: 1rem;
    }

    .intro-container { flex-direction: column; text-align: center; gap: 3rem; }
    .intro-section.alt .intro-container { flex-direction: column-reverse; }
    .intro-text h1, .intro-text h2 { font-size: clamp(2rem, 10vw, 2.5rem); }
    .intro-text p { font-size: 1.1rem; }
    .intro-section { padding: 6rem 1.5rem; }
    
    .mini-grid, .stat-circle { transform: scale(0.9); }
    .choose-header h1,.age-header h1{font-size:2rem}.age-buttons,.result-actions{flex-direction:column}.choose-container,.age-container{margin:3rem auto}.quiz-card{padding:3rem 1.5rem}.result-container{padding:0 1rem}.result-card{padding:2.5rem 1rem;box-shadow:none}.result-code{font-size:2.6rem}.desc-wrapper{padding:1.5rem}.btn-retry,.btn-share{width:100%}
}
