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

body {
    font-family: 'Noto Sans KR', sans-serif;
    line-height: 1.6;
    color: #333;
    /* Calmer backdrop */
    background: linear-gradient(135deg, #eef1f7 0%, #e8ecf6 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header a, .nav-link, .footer a, a {
    text-decoration: none;
}

/* Global link color inherits for calmer look */
a { color: inherit; }
a:hover { opacity: .9; }

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-brand h1 {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-brand i {
    margin-right: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #667eea;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

/* Dark animated background for Hero */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(-45deg, #0f172a, #111827, #0b2139, #1f2937);
    background-size: 400% 400%;
    animation: heroGradient 20s ease infinite;
}

@keyframes heroGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fade-in-up .7s ease both;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    animation: fade-in-up .8s ease both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
    animation: float-in .9s ease both;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.hero-buttons .btn { animation: pulse 3s ease-in-out infinite; }

/* Button Styles */
.btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-quiet {
    background: #f1f3f7;
    color: #445;
    border: 1px solid #e2e6ef;
}
.btn-quiet:hover { background: #e9edf6; }

.btn-primary {
    background: #ff6b6b;
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.btn-secondary {
    background: #4ecdc4;
    color: white;
}

.btn-secondary:hover {
    background: #26c6da;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(78, 205, 196, 0.4);
}

.btn-accent {
    background: #45b7d1;
    color: white;
}

.btn-accent:hover {
    background: #039be5;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(69, 183, 209, 0.4);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* About Section */
.about {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 3rem;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

/* Explicit responsive columns for About grid */
@media (min-width: 901px) {
    .about-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) and (min-width: 481px) {
    .about-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .about-grid { grid-template-columns: 1fr; }
}

.about-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 2rem;
}

.about-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333;
}

.about-card p {
    color: #666;
    line-height: 1.6;
}

/* Test Section */
.test-section {
    padding: 80px 0;
    background: white;
    min-height: 100vh;
}

.test-header {
    text-align: center;
    margin-bottom: 3rem;
}

.test-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2rem;
}

.progress-bar {
    width: 100%;
    max-width: 600px;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    margin: 0 auto 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    color: #666;
    font-weight: 500;
}

.test-content {
    max-width: 800px;
    margin: 0 auto;
}

.question-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    will-change: transform, opacity;
    animation: fade-in-up .35s ease both;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    text-align: center;
    line-height: 1.4;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.answer-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.answer-option:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.answer-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.answer-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.answer-text {
    font-weight: 500;
    line-height: 1.4;
}

.test-navigation {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
}

/* Result Section */
.result-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.result-content {
    max-width: 900px;
    margin: 0 auto;
}

.result-header {
    margin-bottom: 3rem;
}

.result-type {
    font-size: 4rem;
    font-weight: 700;
    background: white;
    color: #667eea;
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 20px;
    margin-bottom: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: pop-in .5s ease both;
}

.result-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.result-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.result-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 15px;
    text-align: left;
}

.result-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.result-card ul {
    list-style: none;
}

.result-card li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    line-height: 1.4;
}

.result-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #4ecdc4;
    font-weight: bold;
}

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

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-info h3 {
    color: #667eea;
    margin-bottom: 0.5rem;
}

.footer-info p {
    opacity: 0.8;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: white;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #667eea;
}

/* Animations */
@keyframes fade-in-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float-in {
    0% { opacity: 0; transform: translateY(14px) scale(.98); }
    60% { opacity: 1; transform: translateY(-2px) scale(1.01); }
    100% { transform: translateY(0) scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-1px); }
}

.pulse { animation: pulse 2.6s ease-in-out infinite; }

.animate-card { animation: fade-in-up .35s ease both; }

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #34495e;
    opacity: 0.8;
}

.test-tools { margin-top: .75rem; }

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        gap: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .question-card {
        padding: 2rem 1.5rem;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .answer-option {
        padding: 1rem;
    }
    
    .result-type {
        font-size: 3rem;
        padding: 0.8rem 1.5rem;
    }
    
    .result-title {
        font-size: 2rem;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .test-navigation {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .about-card {
        padding: 1.5rem;
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}
