/* Game Pages Common Styles */

.game-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 0 2rem 0;
}

.game-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

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

.game-header h1 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.game-header p {
    color: #666;
    font-size: 1.1rem;
}

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

.stat {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    text-align: center;
    min-width: 120px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
}

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

.game-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* Game Board Styles */
.game-board {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.game-grid {
    display: grid;
    gap: 10px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

/* Common Game Elements */
.game-card {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    user-select: none;
}

.game-card:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.game-card.flipped {
    background: white;
    color: #333;
    border: 2px solid #667eea;
}

.game-card.matched {
    background: #28a745;
    color: white;
    cursor: default;
}

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

/* Game Messages */
.game-message {
    text-align: center;
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    font-weight: 600;
}

.message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.message-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Game Progress */
.progress-bar {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* Game Timer */
.timer {
    font-size: 1.2rem;
    font-weight: 600;
    color: #667eea;
    text-align: center;
    margin: 1rem 0;
}

.timer.warning {
    color: #ffc107;
    animation: pulse 1s infinite;
}

.timer.danger {
    color: #dc3545;
    animation: pulse 0.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Game Score */
.score-display {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    margin: 1rem 0;
}

/* Game Instructions */
.game-instructions {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    border-left: 4px solid #667eea;
}

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

.game-instructions ul {
    margin-left: 1.5rem;
    color: #666;
}

.game-instructions li {
    margin-bottom: 0.5rem;
}

/* Responsive Game Design */
@media (max-width: 768px) {
    .game-container {
        margin: 0 15px;
        padding: 1.5rem;
    }
    
    .game-header h1 {
        font-size: 2rem;
    }
    
    .game-stats {
        gap: 1rem;
    }
    
    .stat {
        padding: 0.8rem 1rem;
        min-width: 100px;
    }
    
    .game-controls {
        gap: 0.5rem;
    }
    
    .game-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-width: 100px;
    }
    
    .game-card {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 1rem;
    }
    
    .game-header h1 {
        font-size: 1.8rem;
    }
    
    .game-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .stat {
        width: 100%;
        max-width: 200px;
    }
    
    .game-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .game-btn {
        width: 100%;
        max-width: 200px;
    }
    
    .game-card {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
}

/* Hidden utility class */
.hidden {
    display: none !important;
}

/* Center utility class */
.center {
    text-align: center;
}

/* Replay button specific styles */
.btn-replay {
    background: #17a2b8;
    color: white;
}

.btn-replay:hover {
    background: #138496;
    transform: translateY(-2px);
}

/* Sequence button styles */
.btn-sequence {
    background: #6f42c1;
    color: white;
}

.btn-sequence:hover {
    background: #5a32a3;
    transform: translateY(-2px);
}

/* Pattern button styles */
.btn-pattern {
    background: #e83e8c;
    color: white;
}

.btn-pattern:hover {
    background: #d91a72;
    transform: translateY(-2px);
}