body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #2c3e50;
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.home-btn {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: #667eea;
    color: white;
    font-weight: 600;
}

.game-title {
    margin: 0;
}

.comparison-container {
    max-width: 1200px;
    margin: 1.5rem auto;
    display: grid;
    grid-template-columns: 1.1fr 1.5fr 1fr;
    gap: 1.5rem;
    padding: 0 1.5rem 2rem;
}

.instructions-card,
.game-area,
.stats-panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.instructions-card h2 {
    margin-top: 0;
}

.instructions-card ul {
    padding-left: 1.2rem;
}

.difficulty-selector {
    margin-top: 1rem;
}

.difficulty-selector select {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: 1px solid #ccc;
}

.game-area {
    display: flex;
    flex-direction: column;
}

#variable-display {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.comparison-display {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
}

.expression {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-width: 120px;
    text-align: center;
    transition: transform 0.2s;
}

.expression:hover {
    transform: scale(1.05);
}

.vs-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.comparison-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.compare-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.left-btn {
    background: #3498db;
    color: white;
}

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

.equal-btn {
    background: #95a5a6;
    color: white;
}

.equal-btn:hover {
    background: #7f8c8d;
}

.right-btn {
    background: #e74c3c;
    color: white;
}

.right-btn:hover {
    background: #c0392b;
}

.compare-btn.correct {
    background: #2ecc71 !important;
    transform: scale(1.05);
}

.compare-btn.incorrect {
    background: #e74c3c !important;
}

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

.feedback {
    min-height: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
}

.feedback.correct {
    color: #27ae60;
}

.feedback.incorrect {
    color: #c0392b;
}

.explanation {
    min-height: 1.2rem;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
    margin-bottom: 0.5rem;
}

.controls {
    display: flex;
    gap: 0.5rem;
}

.control-btn {
    flex: 1;
    padding: 0.5rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.skip-btn {
    background: #bdc3c7;
}

.next-btn {
    background: #2ecc71;
    color: white;
}

.stats-card h3 {
    margin-top: 0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #7f8c8d;
}

.stat-value {
    font-weight: 700;
}

.achievements-card {
    margin-top: 1rem;
}

.achievement {
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    background: #ecf0f1;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.achievement.unlocked {
    background: #2ecc71;
    color: white;
}

.reset-btn, .back-btn {
    margin-top: 0.6rem;
    display: block;
    width: 100%;
    padding: 0.5rem;
    text-align: center;
    border-radius: 999px;
    border: none;
    font-weight: 600;
    text-decoration: none;
}

.reset-btn {
    background: #e74c3c;
    color: white;
    cursor: pointer;
}

.back-btn {
    background: #95a5a6;
    color: white;
}

@media (max-width: 1000px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }
    
    .expression {
        font-size: 1.5rem;
    }
}
