/* Quiz Page Styles - Complete Version */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --success: #10b981;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --border: #334155;
    --border-light: #475569;
    
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    --font-family: 'Inter', sans-serif;
    --border-radius: 16px;
}

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
}

.quiz-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.quiz-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.back-btn:hover {
    color: var(--primary);
}

.quiz-title {
    font-size: 1.8rem;
    font-weight: 600;
}

.progress-info {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.progress-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: var(--bg-tertiary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    width: 2%;
}

.progress-percentage {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 40px;
}

/* Main Quiz Area */
.quiz-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 3rem 0;
}

.question-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.question-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    animation: slideInRight 0.5s ease-out;
}

.question-number {
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 2.5rem;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: none;
    padding: 0;
}

.option-card {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    animation: fadeInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.option-card:nth-child(1) {
    animation-delay: 0.1s;
}

.option-card:nth-child(2) {
    animation-delay: 0.2s;
}

.option-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.option-card:hover .option-text {
    color: var(--text-primary);
}

.option-card.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

.option-radio {
    position: absolute;
    opacity: 0;
}

.option-label {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
}

.option-indicator {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-light);
    border-radius: 50%;
    margin-top: 0.25rem;
    position: relative;
    transition: all 0.3s ease;
}

.option-card.selected .option-indicator {
    border-color: var(--primary);
    background: var(--primary);
}

.option-card.selected .option-indicator::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.option-content {
    flex: 1;
}

.option-prefix {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.option-text {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Navigation */
.quiz-navigation {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

/* 비활성화된 버튼 스타일 개선 */
.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.nav-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

/* 안내 메시지가 있는 버튼 스타일 */
.nav-btn.info-btn {
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
}

.nav-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.nav-btn.secondary:hover:not(:disabled) {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
}

.nav-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.nav-btn.complete {
    background: linear-gradient(135deg, var(--success), var(--primary));
}

/* Help Section */
.quiz-help {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

.help-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.help-content h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.help-content ul {
    list-style: none;
}

.help-content li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.help-content li::before {
    content: '•';
    color: var(--primary);
    position: absolute;
    left: 0;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        padding: 0 1rem;
    }
    
    .progress-container {
        padding: 0 1rem;
    }
    
    .question-container {
        padding: 0 1rem;
    }
    
    .question-card {
        padding: 2rem;
    }
    
    .question-text {
        font-size: 1.3rem;
    }
    
    .quiz-navigation {
        padding: 0 1rem;
    }
    
    .help-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .question-text {
        font-size: 1.2rem;
    }
    
    .option-card {
        padding: 1rem;
    }
    
    .nav-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        min-width: 80px;
    }
}
