/* Memory Game CSS */

.memory-game-container {
    background: linear-gradient(135deg, #181a20 60%, #232946 100%);
    border: 2.5px solid #a259ff;
    border-radius: 16px;
    padding: 32px 16px 24px 16px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    max-width: 650px;
    margin: 32px auto;
    box-shadow: 0 8px 32px 0 rgba(0,0,0,0.25);
}
.game-header h2 {
    color: #a259ff;
    font-size: 2rem;
    letter-spacing: 2px;
    margin-bottom: 8px;
    text-shadow: 0 0 8px #a259ff99, 0 0 2px #fff;
}
.game-info {
    display: flex;
    gap: 18px;
    justify-content: center;
    margin-bottom: 8px;
    color: #00f7ff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.1rem;
}
.memory-grid {
    display: grid;
    gap: 12px;
    margin: 24px 0;
    justify-content: center;
}
.memory-grid.easy { grid-template-columns: repeat(4, 1fr); }
.memory-grid.medium { grid-template-columns: repeat(6, 1fr); }
.memory-grid.hard { grid-template-columns: repeat(8, 1fr); }
.memory-card {
    width: 80px;
    height: 80px;
    background: #232946;
    border: 2.5px solid #a259ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1em;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(.4,2,.6,1);
    color: transparent;
    user-select: none;
    box-shadow: 0 0 16px #a259ff22;
}
.memory-card:hover {
    background: #2a2a2a;
    box-shadow: 0 0 18px #a259ff;
    transform: scale(1.07);
}
.memory-card.flipped {
    background: #a259ff;
    color: #fff;
    border-color: #00f7ff;
    transform: rotateY(180deg) scale(1.08);
    box-shadow: 0 0 24px #00f7ff99;
}
.memory-card.matched {
    background: #51cf66;
    color: #fff;
    border-color: #51cf66;
    animation: pulse 1s infinite;
    box-shadow: 0 0 24px #51cf6688;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}
.memory-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 18px 0;
    flex-wrap: wrap;
    gap: 12px;
}
.memory-stats {
    display: flex;
    gap: 18px;
    justify-content: center;
    flex-wrap: wrap;
}
.memory-stat {
    background: #232946;
    padding: 10px 15px;
    border-radius: 7px;
    border: 1.5px solid #a259ff;
    color: #a259ff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05em;
}
.memory-stat-label {
    font-size: 0.85em;
    color: #00f7ff;
    margin-bottom: 4px;
}
.memory-stat-value {
    font-size: 1.2em;
    font-weight: bold;
    color: #51cf66;
}
.difficulty-selector {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 18px 0;
}
.difficulty-selector button {
    background: #232946;
    color: #a259ff;
    border: 2px solid #a259ff;
    padding: 10px 22px;
    border-radius: 7px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    font-size: 1.05em;
    transition: all 0.3s;
    box-shadow: 0 0 8px #a259ff22;
}
.difficulty-selector button:hover, .difficulty-selector button.active {
    background: #a259ff;
    color: #fff;
    box-shadow: 0 0 16px #a259ff;
}
.new-game-btn, .memory-btn {
    background: linear-gradient(90deg, #a259ff 60%, #00f7ff 100%);
    color: #181a20;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    margin: 8px 0;
    font-size: 1.1em;
    box-shadow: 0 2px 12px #a259ff33;
    letter-spacing: 1px;
    transition: all 0.2s;
}
.new-game-btn:hover, .memory-btn:hover {
    background: linear-gradient(90deg, #00f7ff 60%, #a259ff 100%);
    color: #fff;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 4px 24px #00f7ff55;
}
.memory-btn.secondary {
    background: #232946;
    color: #a259ff;
    border: 2px solid #a259ff;
}
.memory-btn.secondary:hover {
    background: #a259ff;
    color: #fff;
}
.memory-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.memory-modal-content {
    background: #232946;
    border: 2.5px solid #a259ff;
    border-radius: 14px;
    padding: 32px 18px;
    color: #fff;
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 24px #a259ff33;
}
.memory-modal-content h3 {
    color: #a259ff;
    margin-bottom: 18px;
    font-size: 1.4em;
}
.memory-modal-btn {
    background: linear-gradient(90deg, #a259ff 60%, #00f7ff 100%);
    color: #181a20;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-family: 'Orbitron', sans-serif;
    font-weight: bold;
    cursor: pointer;
    margin-top: 18px;
    font-size: 1.05em;
    transition: all 0.2s;
}
.memory-modal-btn:hover {
    background: linear-gradient(90deg, #00f7ff 60%, #a259ff 100%);
    color: #fff;
    transform: scale(1.05);
}
.memory-best-score {
    margin: 10px 0;
    padding: 10px;
    background: #232946;
    border-radius: 7px;
    border: 1.5px solid #a259ff;
    color: #a259ff;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.05em;
}
.memory-best-score strong {
    color: #00f7ff;
    font-size: 1.1em;
}
@media (max-width: 768px) {
    .memory-grid.easy { grid-template-columns: repeat(4, 1fr); }
    .memory-grid.medium { grid-template-columns: repeat(4, 1fr); }
    .memory-grid.hard { grid-template-columns: repeat(4, 1fr); }
    .memory-game-container { padding: 12px 2vw 18px 2vw; }
    .memory-modal-content { padding: 18px 4px; }
    .memory-card { width: 48px; height: 48px; font-size: 1.1em; }
}
@media (max-width: 480px) {
    .memory-card { width: 32px; height: 32px; font-size: 0.9em; }
    .memory-game-container { padding: 6px 1vw 10px 1vw; }
    .memory-modal-content { padding: 8px 2px; }
} 