:root {
    /* Palette from PRD */
    --bg-color: #F7F9FC;
    --primary-color: #2D3748;
    --accent-color: #3182CE;
    --success-color: #38A169;
    --error-color: #E53E3E;
    --text-color: #2D3748;
    --card-bg: #FFFFFF;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --card-size-desktop: 280px;
    --card-size-mobile: 100%;
    
    /* Typography */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    text-align: center;
}

.subtitle {
    font-size: 1.1rem;
    color: #718096;
    margin-bottom: 3rem;
    text-align: center;
}

/* Game Container */
.game-container {
    width: 100%;
    max-width: var(--container-width);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Question Header */
.question-header {
    text-align: center;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 800px;
}

.question-counter {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-color);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.question-text {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.4;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    max-width: 1000px;
}

/* Card Component */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.1);
}

.card-content {
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    width: 100%;
}

/* Card States */
.card.revealed {
    cursor: default;
}

.card.correct {
    border-color: var(--success-color);
    background-color: #F0FFF4;
}

.card.incorrect {
    border-color: var(--error-color);
    opacity: 0.7;
}

.card-flag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card.revealed .card-flag {
    opacity: 1;
    transform: scale(1);
}

.card-source {
    position: absolute;
    bottom: 1rem;
    font-size: 0.8rem;
    color: #718096;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card.revealed .card-source {
    opacity: 1;
}

/* Feedback Section */
.feedback-section {
    min-height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feedback-section.visible {
    opacity: 1;
}

.feedback-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feedback-hint {
    color: #4A5568;
}

/* Next Button */
.btn-next {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: none; /* Hidden by default */
    margin-top: 1rem;
}

.btn-next:hover {
    background-color: #1A202C;
}

.btn-next.visible {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Score Board */
.score-board {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-weight: 600;
    display: flex;
    gap: 1rem;
    z-index: 100;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.score-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: #718096;
}

.score-value {
    font-size: 1.2rem;
    color: var(--primary-color);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .score-board {
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
        justify-content: space-around;
        padding: 0.8rem;
        border-top: 1px solid #E2E8F0;
    }
    
    body {
        padding-bottom: 80px; /* Space for score board */
    }
}

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