/**
 * Memory Game Styles - Minimal Version
 */

.emg-game-container {
    max-width: 700px;
    margin: 10px auto;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.emg-game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.emg-timer-display {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.emg-game-board {
    display: grid;
    gap: 4px;
    margin-bottom: 8px;
    min-height: 150px;
    width: 100%;
    box-sizing: border-box;
}

.emg-card {
    background: linear-gradient(135deg, #0073aa 0%, #005177 100%);
    border-radius: 6px;
    cursor: pointer;
    aspect-ratio: 1;
    min-height: 50px;
    max-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
    transition: background 0.3s;
    user-select: none;
    box-sizing: border-box;
    border: 2px solid transparent;
    overflow: hidden;
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    text-align: center;
    padding: 4px;
    max-width: 100%;
}

.emg-card .emg-card-symbol {
    font-size: 24px;
}

.emg-card.emg-flipped {
    background: white;
    color: #333;
    border: 2px solid #0073aa;
}

.emg-card.emg-matched {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.emg-game-controls {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.emg-restart-btn {
    padding: 8px 16px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.emg-restart-btn:hover {
    background: #005177;
}

.emg-game-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.emg-game-overlay-content {
    background: white;
    padding: 40px 60px;
    border-radius: 20px;
    text-align: center;
    max-width: 500px;
    width: 90%;
    margin: auto;
    animation: popIn 0.5s ease-out;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.emg-trophy {
    font-size: 60px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

.emg-game-overlay-stats {
    margin: 20px 0;
    text-align: left;
}

.emg-game-overlay-stats p {
    margin: 8px 0;
    font-size: 16px;
}

.emg-close-overlay {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 20px;
}

.emg-confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    animation: fall linear forwards;
}

@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes fall {
    to {
        transform: translateY(100vh) rotate(720deg);
    }
}

.emg-error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}
