/* hafiza.css - HAFIZA OYUN TASARIMI */

.hafiza-game { --gap: 10px; --radius: 10px; }
.hafiza-game * { box-sizing: border-box; }

.hafiza-game .wrap {
    margin-bottom: 10px;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: #222;
}

.hafiza-game .area {
    position: relative;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 10px;
}

/* Başlangıç Ekranı */
.hafiza-game .game-begin-content {
    text-align: center;
    padding: 60px 20px;
}

/* Oyun container */
.hafiza-game .game-container {
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    user-select: none;
}

/* Sol panel ortak butonlar */
.hafiza-game .baslatBTN {
    width: 100%;
    padding: 18px;
    font-size: 18px;
    background: #22c55e;
    margin-bottom: 20px;
    border: 0;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hafiza-game .baslatBTN:hover {
    background: #16a34a;
    transform: translateY(-2px);
}

/* Zorluk Seçimi */
.hafiza-game .difficulty-selection {
    padding: 0;
}

.hafiza-game .difficulty-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 15px;
    text-align: center;
}

.hafiza-game .difficulty-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hafiza-game .difficulty-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hafiza-game .difficulty-card:hover {
    border-color: #667eea;
    background: #f0f4ff;
}

.hafiza-game .difficulty-card.selected {
    border-color: #22c55e;
    background: #dcfce7;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.hafiza-game .difficulty-card.disabled {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

.hafiza-game .difficulty-card.disabled:hover {
    border-color: #dee2e6;
    background: #f8f9fa;
}

.hafiza-game .difficulty-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.hafiza-game .difficulty-content {
    flex: 1;
}

.hafiza-game .difficulty-name {
    font-size: 14px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 2px;
}

.hafiza-game .difficulty-description {
    font-size: 12px;
    color: #6b7280;
}

/* Sağ panel kutular - base.css ile uyumlu */
.hafiza-game .gameci_durum_baslik {
    font-weight: 700 !important;
    font-size: 20px !important;
    margin-bottom: 12px !important;
    color: #da2728 !important;
    position: absolute;
    top: 5px !important;
    right: 8px !important;
    text-align: center;
}

.hafiza-game .gameci_durum {
    position: relative;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 15px;
}

.hafiza-game .gameci_durum > div:not(.gameci_durum_baslik) {
    font-size: 32px;
    font-weight: 800;
    color: #667eea;
}

.hafiza-game .gameci_timer {
    position: relative;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
}

.hafiza-game .gameci_timer1 {
    font-size: 36px;
    font-weight: 800;
    color: #000;
}

.hafiza-game .gameci_timer2 {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #e0e0e0;
    overflow: hidden;
    margin-top: 10px;
}

.hafiza-game .gameci_timer3 {
    width: 100%;
    height: 6px;
    border-radius: 5px;
    background: #22c55e;
    transition: width 0.1s linear, background-color 0.3s ease;
}

/* Rules */
.hafiza-game .rules_baslik {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 10px;
    margin-top: 20px;
    color: #000;
}

.hafiza-game .rules_icerik {
    line-height: 1.8;
    font-size: 14px;
    color: #666;
}

.hafiza-game .memory-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 30px auto 50px auto;
    max-width: 500px;
}

.hafiza-game .memory-box {
    width: 60px;
    height: 60px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hafiza-game .memory-box:hover {
    border-color: #007bff;
    transform: scale(1.05);
}

.hafiza-game .memory-box.active {
    background: #007bff;
    border-color: #007bff;
    transform: scale(1.1);
    box-shadow: 0 0 20px rgba(0, 123, 255, 0.5);
}

.hafiza-game .memory-box.correct {
    background: #28a745;
    border-color: #28a745;
    transform: scale(1.1);
}

.hafiza-game .memory-box.wrong {
    background: #dc3545;
    border-color: #dc3545;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.hafiza-game .game-progress {
    margin: 20px auto;
    text-align: center;
}

.hafiza-game .progress-bar-container {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.hafiza-game .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    width: 0%;
    transition: width 0.3s ease;
}

.hafiza-game .progress-text {
    font-size: 12px;
    color: #666;
}

.hafiza-game .sequence-display,
.hafiza-game .input-waiting {
    text-align: center;
    padding: 15px;
    margin: 20px 0;
    border-radius: 8px;
    font-weight: bold;
}

.hafiza-game .sequence-display {
    background: #e3f2fd;
    color: #1976d2;
}

.hafiza-game .input-waiting {
    background: #fff3e0;
    color: #f57c00;
}

.hafiza-game .difficulty-selection {
    padding: 15px;
    text-align: center;
}

.hafiza-game .difficulty-grid {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 100%;
}

.hafiza-game .difficulty-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
}

.hafiza-game .difficulty-card:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.hafiza-game .difficulty-card.selected {
    border-color: #28a745;
    background: #d4edda;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.hafiza-game .difficulty-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.hafiza-game .difficulty-content {
    flex: 1;
}

.hafiza-game .difficulty-name {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #333;
}

.hafiza-game .difficulty-description {
    font-size: 12px;
    color: #666;
    line-height: 1.3;
}

.hafiza-game .btn {
    border: 0;
    padding: 10px 14px;
    border-radius: 8px;
    color: #fff;
    background: #2e6cff;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
}

.hafiza-game .start-game-btn {
    background: #22c55e;
    padding: 15px;
    font-size: 16px;
}

.hafiza-game .start-game-btn:hover {
    background: #16a34a;
}

.hafiza-game .game-end-content {
    text-align: center;
    padding: 30px 20px;
}

.hafiza-game .game-end-title {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #1f2937;
}

.hafiza-game .game-end-emoji {
    font-size: 60px;
    margin-bottom: 25px;
}

.hafiza-game .game-end-stats {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}


.hafiza-game .hafiza-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    z-index: 1000;
}

.hafiza-game .hafiza-loading-content {
    text-align: center;
}

.hafiza-game .hafiza-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.hafiza-game .hafiza-loading-text {
    color: #6b7280;
    font-weight: 500;
}

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

@media (max-width: 600px) {
    .hafiza-game .memory-box {
        width: 50px;
        height: 50px;
    }

    .hafiza-game .difficulty-card {
        padding: 10px 12px;
        gap: 8px;
    }
}
