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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --error-color: #e74c3c;
    --warning-color: #f39c12;
    --light-bg: #ecf0f1;
    --white: #ffffff;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--white);
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header h1 i {
    margin-right: 15px;
    color: #f8c471;
}

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

/* Main Content */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 30px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Quiz Container */
.quiz-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

/* Quote Card */
.quote-card {
    padding: 40px;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.loading {
    text-align: center;
    color: var(--text-light);
}

.loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.loading p {
    font-size: 1.1rem;
}

.quote-content {
    width: 100%;
    text-align: center;
}

.quote-text {
    font-size: 1.4rem;
    line-height: 1.8;
    font-style: italic;
    color: var(--text-color);
    margin: 0;
    position: relative;
    padding: 0 20px;
}

.quote-text::before {
    content: '"';
    font-size: 3rem;
    color: var(--secondary-color);
    position: absolute;
    left: -10px;
    top: -10px;
    font-family: serif;
}

.quote-text::after {
    content: '"';
    font-size: 3rem;
    color: var(--secondary-color);
    position: absolute;
    right: -10px;
    bottom: -20px;
    font-family: serif;
}

.quote-attribution {
    margin-top: 20px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-color);
}

/* Answer Buttons */
.answer-buttons {
    display: flex;
    border-top: 1px solid #eee;
}

.btn {
    flex: 1;
    padding: 25px;
    border: none;
    background: var(--white);
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-yes {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: var(--white);
    border-radius: 0 0 0 var(--border-radius);
}

.btn-no {
    background: linear-gradient(135deg, #e74c3c, #ec7063);
    color: var(--white);
    border-radius: 0 0 var(--border-radius) 0;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-yes:hover {
    background: linear-gradient(135deg, #229954, #27ae60);
}

.btn-no:hover {
    background: linear-gradient(135deg, #cb4335, #e74c3c);
}

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

/* Result Section */
.result-section {
    padding: 30px;
    text-align: center;
    border-top: 1px solid #eee;
}

.result-message {
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1.1rem;
}

.result-message.correct {
    background: #d5f4e6;
    color: #1e8449;
    border-left: 4px solid var(--success-color);
}

.result-message.incorrect {
    background: #fadbd8;
    color: #922b21;
    border-left: 4px solid var(--error-color);
}

.btn-next {
    background: var(--secondary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.btn-next:hover {
    background: #2980b9;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 12px 24px;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
    padding: 5px;
}

.modal-close:hover {
    color: var(--error-color);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 25px;
    border-top: 1px solid #eee;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 15px 30px;
    border-radius: var(--border-radius);
}

.btn-primary:hover {
    background: #1a252f;
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: auto;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        transform: translateY(50px);
        opacity: 0;
    }
    to { 
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

/* Stats Grid for Modal */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 20px;
    margin-top: 10px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Game Over Styles */
.game-over-stats {
    text-align: center;
}

.final-score {
    margin-bottom: 25px;
}

.score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), #5dade2);
    color: white;
    margin: 0 auto 20px;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
}

.score-total {
    font-size: 1rem;
    opacity: 0.8;
}

.performance-message {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 25px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 8px;
}

.final-stats {
    display: flex;
    justify-content: space-around;
    gap: 20px;
}

.final-stat {
    text-align: center;
    padding: 15px;
    background: rgba(52, 152, 219, 0.1);
    border-radius: 8px;
    flex: 1;
}

.final-stat .label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 5px;
}

.final-stat .value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

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

    .header h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .stats-bar {
        gap: 20px;
        padding: 15px;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .quote-card {
        padding: 25px;
        min-height: 250px;
    }

    .quote-text {
        font-size: 1.2rem;
        padding: 0 10px;
    }

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

    .btn-yes {
        border-radius: 0;
    }

    .btn-no {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .game-controls {
        flex-direction: column;
        align-items: center;
    }

    .btn-secondary {
        width: 200px;
    }
}

@media (max-width: 480px) {
    .stats-bar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .quote-text {
        font-size: 1.1rem;
    }

    .btn {
        padding: 20px;
        font-size: 1rem;
    }
}