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

:root {
    --primary-color: #007AFF;
    --primary-hover: #0051D5;
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --background: #fbfbfd;
    --card-background: #ffffff;
    --border-color: #d2d2d7;
    --success-color: #34C759;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    min-height: 100vh;
}

/* Screen Management */
.screen {
    display: none;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: block;
}

/* Intro Screen */
.intro-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 0;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 40px;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.back-button:hover {
    background: rgba(0, 122, 255, 0.1);
}

.intro-icon {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, var(--primary-color), #5856d6);
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    color: white;
}

.intro-content h1 {
    font-size: 48px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.intro-description {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.intro-description strong {
    color: var(--text-primary);
    font-weight: 600;
}

.intro-details {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--text-secondary);
}

.detail-icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    flex-shrink: 0;
}

/* Buttons */
.primary-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 16px 48px;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.primary-button:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.primary-button:active {
    transform: translateY(0);
}

/* Quiz Screen */
.quiz-header {
    margin-bottom: 48px;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #5856d6);
    border-radius: 2px;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 0%;
}

.progress-text {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

/* Question Container */
.question-container {
    background: var(--card-background);
    border-radius: 24px;
    padding: 48px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.question-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), #5856d6);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 24px;
}

.question-text {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}

/* Options */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.option-button {
    background: var(--background);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    color: var(--text-primary);
    font-weight: 500;
}

.option-button:hover {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.05);
}

.option-button.selected {
    border-color: var(--primary-color);
    background: rgba(0, 122, 255, 0.1);
}

.option-circle {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    transition: all 0.2s;
    position: relative;
}

.option-button:hover .option-circle {
    border-color: var(--primary-color);
}

.option-button.selected .option-circle {
    border-color: var(--primary-color);
    background: var(--primary-color);
}

.option-button.selected .option-circle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
}

.nav-button {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-button.secondary {
    background: var(--background);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.nav-button.secondary:hover {
    background: var(--border-color);
}

/* Loading Screen */
.loading-content {
    text-align: center;
    padding: 100px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 24px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content p {
    font-size: 18px;
    color: var(--text-secondary);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.8s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .quiz-container {
        padding: 20px;
    }

    .intro-content {
        padding: 40px 0;
    }

    .intro-content h1 {
        font-size: 36px;
    }

    .intro-description {
        font-size: 16px;
    }

    .question-container {
        padding: 32px 24px;
    }

    .question-text {
        font-size: 22px;
    }

    .option-button {
        padding: 16px 20px;
        font-size: 15px;
    }

    .navigation-buttons {
        flex-direction: column;
    }

    .nav-button {
        width: 100%;
    }
}
