/* Game Section Styles */
.game-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
}

.game-header {
    text-align: center;
    margin-bottom: 3rem;
}

.game-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Game Stats */
.game-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item i {
    font-size: 1.25rem;
    color: #fbbf24;
}

.stat-item span {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Game Controls */
.game-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.game-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.game-btn.primary {
    background: #fbbf24;
    color: #1f2937;
}

.game-btn.primary:hover {
    background: #f59e0b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.game-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.game-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Game Board */
.game-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-card {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    transform-style: preserve-3d;
    position: relative;
    border: 2px solid transparent;
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.game-card.flipped {
    transform: rotateY(180deg);
}

.game-card.matched {
    background: #10b981;
    border-color: #059669;
    animation: pulse 0.6s ease;
}

.game-card-front,
.game-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.game-card-front {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    color: white;
    font-size: 2rem;
}

.game-card-back {
    background: white;
    transform: rotateY(180deg);
    font-size: 2.5rem;
    color: #3b82f6;
}

/* Game Message */
.game-message {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.game-message.show {
    display: flex;
}

.message-content {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.message-content h2 {
    color: #1f2937;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.message-content p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.message-stats {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.message-stats p {
    margin: 0.5rem 0;
    color: #374151;
    font-weight: 500;
}

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

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

@keyframes flip {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(180deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .game-title {
        font-size: 2rem;
    }
    
    .game-subtitle {
        font-size: 1rem;
    }
    
    .game-stats {
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .game-board {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.75rem;
        padding: 1.5rem;
    }
    
    .game-controls {
        gap: 0.75rem;
    }
    
    .game-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .message-content {
        padding: 2rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .game-board {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .game-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .game-btn {
        width: 200px;
    }
}

/* Loading Animation */
.game-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.game-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Active Navigation Link */
.nav-link.active {
    color: #3b82f6;
    font-weight: 600;
}

/* Game Instructions */
.game-instructions {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.game-instructions h3 {
    margin-bottom: 1rem;
    color: #fbbf24;
}

.game-instructions ul {
    list-style: none;
    padding: 0;
}

.game-instructions li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.game-instructions li:before {
    content: "•";
    color: #fbbf24;
    position: absolute;
    left: 0;
    font-weight: bold;
}
