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

:root {
    --primary-color: #FF6B35;
    --secondary-color: #F7931E;
    --bg-color: #1a1a2e;
    --card-bg: #16213e;
    --text-color: #ffffff;
    --text-secondary: #a0a0a0;
    --success-color: #4CAF50;
    --error-color: #f44336;
    --border-color: #2d2d44;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: var(--text-color);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
}

.header h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Game Header */
.game-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.back-button {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

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

.game-header h1 {
    font-size: 1.5rem;
    flex: 1;
}

/* Game Stats */
.game-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.game-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 16px;
    padding: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.game-card:hover::before {
    left: 100%;
}

.game-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.game-card.coming-soon {
    opacity: 0.6;
    cursor: not-allowed;
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.game-card h2 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.game-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 15px;
}

.game-badge {
    display: inline-block;
    padding: 5px 12px;
    background: var(--primary-color);
    color: white;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.game-badge.disabled {
    background: var(--text-secondary);
}

/* Game Content */
.game-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
}

.question-card {
    text-align: center;
}

.question-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--text-color);
}

.description-box {
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: left;
}

.description-box h3 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.description-text {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

.card-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.card-option {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.card-option:hover {
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.card-option.selected {
    border-color: var(--primary-color);
    background: rgba(255, 107, 53, 0.1);
}

.card-option.correct {
    border-color: var(--success-color);
    background: rgba(76, 175, 80, 0.2);
}

.card-option.incorrect {
    border-color: var(--error-color);
    background: rgba(244, 67, 54, 0.2);
}

.card-option.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.card-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-color);
}

.card-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.result-message {
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: bold;
}

.result-message.success {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.result-message.error {
    background: rgba(244, 67, 54, 0.2);
    color: var(--error-color);
    border: 2px solid var(--error-color);
}

.next-button {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.next-button:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(255, 107, 53, 0.4);
}

.next-button:active {
    transform: scale(0.98);
}

.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Cards Section */
.cards-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-color);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.card-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

.card-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.2);
}

.card-item-name {
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--text-color);
}

.card-item-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Scroll to cards button */
.scroll-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.6);
}

/* Responsive */
@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5rem;
    }
    
    .game-card {
        padding: 20px;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
