/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    padding: 20px;
}

.screen.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Intro Screen */
.intro-content {
    text-align: center;
    max-width: 800px;
    padding: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 20px;
    border: 3px solid #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
}

.main-title {
    font-size: 3.5rem;
    margin-bottom: 10px;
    color: #ffd700;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8);
    font-weight: bold;
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 10px #ffd700; }
    to { text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.8), 0 0 20px #ffd700, 0 0 30px #ffd700; }
}

.subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #cccccc;
    font-style: italic;
}

.sarcastic-message {
    font-size: 1.2rem;
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #ffcccc;
    font-style: italic;
    border-left: 4px solid #ff6b6b;
}

/* Buttons */
.main-button {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    padding: 15px 30px;
    font-size: 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.main-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
}

.secondary-button {
    background: linear-gradient(45deg, #4ecdc4, #44a08d);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    margin: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(78, 205, 196, 0.4);
}

.secondary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(78, 205, 196, 0.6);
}

/* About Screen */
.about-content {
    max-width: 600px;
    text-align: center;
    background: rgba(0, 0, 0, 0.7);
    padding: 40px;
    border-radius: 15px;
    border: 2px solid #4ecdc4;
}

.about-text {
    text-align: left;
    line-height: 1.6;
    color: #cccccc;
}

/* Game Screen */
#game-screen {
    display: none;
    flex-direction: column;
    min-height: 100vh;
    padding: 20px;
}

#game-screen.active {
    display: flex;
}

.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-title {
    font-size: 2.5rem;
    color: #ffd700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1000px;
    margin: 0 auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.current-value {
    font-size: 1.3rem;
    color: #00ff00;
    font-weight: bold;
}

.progress {
    font-size: 1.1rem;
    color: #ffdd44;
}

.score {
    font-size: 1.1rem;
    color: #cccccc;
}

/* Question Container */
.question-container {
    max-width: 1000px;
    margin: 0 auto 30px auto;
    padding: 30px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 15px;
    border: 2px solid #ffd700;
}

.question-text {
    font-size: 1.4rem;
    line-height: 1.6;
    text-align: center;
    color: #ffffff;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Answer Buttons */
.answers-container {
    max-width: 1000px;
    margin: 0 auto 30px auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.answer-button {
    padding: 20px;
    font-size: 1.1rem;
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: white;
    border: 2px solid #ffffff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.answer-button:hover {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.answer-button.selected {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border-color: #ffd700;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.6);
}

.answer-button.correct {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    border-color: #00ff00;
    animation: pulse-correct 0.5s ease;
}

.answer-button.wrong {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border-color: #ff0000;
    animation: shake 0.5s ease;
}

@keyframes pulse-correct {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Controls */
.controls {
    text-align: center;
}

.final-answer-button {
    background: linear-gradient(45deg, #ffd700, #ffed4e);
    color: #000000;
    border: none;
    padding: 15px 40px;
    font-size: 1.3rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

.final-answer-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.6);
}

.final-answer-button:disabled {
    background: #666666;
    color: #999999;
    cursor: not-allowed;
    box-shadow: none;
}

/* Results Screen */
.results-content {
    max-width: 800px;
    text-align: center;
    background: rgba(0, 0, 0, 0.8);
    padding: 40px;
    border-radius: 20px;
    border: 3px solid #ffd700;
}

#results-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #ffd700;
}

.results-message {
    font-size: 1.2rem;
    margin: 20px 0;
    line-height: 1.6;
    color: #cccccc;
}

.total-winnings {
    font-size: 1.8rem;
    margin: 30px 0;
    color: #00ff00;
    font-weight: bold;
    padding: 20px;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 10px;
    border: 2px solid #00ff00;
}

/* Questions Review */
.questions-review {
    margin: 30px 0;
    text-align: left;
}

.questions-review h3 {
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
}

.review-item {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border-left: 4px solid #ffd700;
}

.review-question {
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffffff;
}

.review-answer {
    margin: 5px 0;
    font-size: 0.9rem;
}

.user-answer {
    color: #ffcccc;
}

.correct-answer {
    color: #ccffcc;
}

.review-button {
    background: linear-gradient(45deg, #ff6b6b, #ff8e53);
    color: white;
    border: none;
    padding: 5px 15px;
    font-size: 0.9rem;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.review-button:hover {
    background: linear-gradient(45deg, #ff8e53, #ff6b6b);
}

.explanation {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 5px;
    font-size: 0.9rem;
    color: #e0e0e0;
    border-left: 3px solid #4ecdc4;
}

.explanation.show {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.5rem;
    }
    
    .game-title {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        text-align: center;
    }
    
    .answers-container {
        grid-template-columns: 1fr;
    }
    
    .answer-button {
        font-size: 1rem;
        padding: 15px;
    }
    
    .question-text {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2rem;
    }
    
    .intro-content, .about-content, .results-content {
        padding: 20px;
        margin: 10px;
    }
    
    .question-container {
        padding: 20px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
button:focus, .answer-button:focus {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}