/* =========================================================================
   MINES ÖZEL STİLLERİ
   ========================================================================= */

/* Oyun Başlık ve İkon */
.mines-game-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.mines-game-icon {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: var(--surface-900);
    border: 1px solid var(--surface-700);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    box-shadow: inset 0 0 15px rgba(var(--primary), 0.1);
}

.mines-game-icon img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

.mines-game-title h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.mines-game-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0;
}

/* Mod Değiştirici (Manuel / Otomatik) */
.mines-mode-toggle {
    display: flex;
    background: var(--surface-900);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--surface-700);
}

.mines-mode-toggle button {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mines-mode-toggle button.active {
    background: var(--surface-700);
    color: var(--text-primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

/* Form Elemanları */
.mines-input-wrapper, .mines-auto-mode-field {
    margin-bottom: 16px;
}

.mines-input-label, .mines-auto-mode-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.mines-input-field {
    display: flex;
    align-items: center;
    background: var(--surface-900);
    border: 1px solid var(--surface-700);
    border-radius: 10px;
    padding: 8px 12px;
    position: relative;
    transition: border-color 0.3s ease;
}

.mines-input-field:focus-within {
    border-color: var(--brand-red);
}

.mines-input-icon {
    margin-right: 12px;
    width: 24px;
    height: 24px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mines-input-icon-svg {
    width: 100%;
    height: 100%;
}

.mines-input-icon-img-bomb {
    width: 20px;
    height: auto;
    filter: drop-shadow(0 0 5px rgba(239, 68, 68, 0.5));
}

.mines-input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 700;
    outline: none;
    width: 100%;
}

.mines-input-buttons {
    display: flex;
    gap: 4px;
}

.mines-input-button {
    background: var(--surface-700);
    border: 1px solid var(--surface-600);
    color: var(--text-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mines-input-button:hover {
    background: var(--surface-600);
    color: var(--brand-red);
}

/* Bomba Sayısı Butonları */
.mines-bomb-buttons-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}

.mines-bomb-button-item {
    background: var(--surface-900);
    border: 1px solid var(--surface-700);
    border-radius: 8px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mines-bomb-button-item:hover {
    background: var(--surface-800);
    border-color: var(--brand-red);
    color: var(--brand-red);
}

.mines-bomb-button-icon img {
    width: 14px;
    height: auto;
}

/* Oyna Butonu */
.mines-play-buttons {
    margin-top: 24px;
}

.mines-play-button {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background: var(--gradient);
    color: var(--text-on-accent, #000);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--primary), 0.4);
}

.mines-play-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(var(--primary), 0.6);
}

.mines-play-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Desktop İstatistikler (Oyun Alanı Üstü veya Yanı) */
.mines-stats-desktop {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.mines-stats-mobile {
    display: none;
}

.mines-stat-item {
    flex: 1;
    background: linear-gradient(145deg, var(--surface-800) 0%, var(--surface-900) 100%);
    border: 1px solid var(--surface-700);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.mines-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-900);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--surface-700);
}

.mines-stat-icon img {
    width: 24px;
    height: auto;
}

.mines-stat-content {
    display: flex;
    flex-direction: column;
}

.mines-stat-value {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
}

.mines-stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* İstatistik İkonu */
.mines-stats-button-wrapper {
    position: absolute;
    top: 24px;
    right: 24px;
}

#mines-stats-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--surface-800);
    border: 1px solid var(--surface-700);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s;
}

#mines-stats-icon-btn:hover {
    color: var(--brand-red);
    border-color: var(--brand-red);
}

/* =========================================================================
   MINES OYUN ALANI (SAĞ)
   ========================================================================= */

.mines-game-area-wrapper {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--surface-700);
    background: var(--surface-900);
    display: flex;
    flex-direction: column;
    min-height: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.mines-game-area-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.2;
    z-index: 0;
}

.mines-game-area-overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(10, 10, 10, 0.4) 0%, rgba(10, 10, 10, 0.9) 100%);
    z-index: 1;
    pointer-events: none;
}

.mines-game-area-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    flex: 1;
}

/* Mines Grid */
.mines-grid-wrapper {
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1;
    background: rgba(0,0,0,0.3);
    border-radius: 16px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.5);
}

.mines-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    width: 100%;
}

.mines-cell {
    background: linear-gradient(145deg, var(--surface-700) 0%, var(--surface-800) 100%);
    border-radius: 10px;
    border: 1px solid var(--surface-600);
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    overflow: hidden;
    aspect-ratio: 1; /* Kare olmasını garanti eder */
}

.mines-cell:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(var(--primary), 0.2);
    border-color: var(--brand-red);
}

.mines-cell:active {
    transform: scale(0.95);
}

.mines-cell-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
}

.mines-cell-inner img {
    width: 60%;
    height: auto;
    object-fit: contain;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mines-cell.revealed {
    background: var(--surface-900);
    border-color: var(--surface-600);
    cursor: default;
    transform: none;
    box-shadow: inset 0 4px 10px rgba(0,0,0,0.6);
}

.mines-cell.revealed .mines-cell-inner img {
    opacity: 1;
    transform: scale(1);
}

.mines-cell-mark-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.mines-cell-mark-img {
    width: 50%;
    height: 50%;
    object-fit: contain;
    opacity: 0.5;
}

.mines-cell.revealed .mines-cell-mark-overlay {
    opacity: 0;
    pointer-events: none;
}

.mines-cell-mark-overlay-dark {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    border-radius: inherit;
    pointer-events: none;
}

.mines-cell.dimmed {
    opacity: 0.65;
}

.mines-cell.dimmed .mines-cell-inner img {
    opacity: 0.6;
}

/* Ses İkonu */
.mines-volume-control {
    position: absolute;
    top: 24px;
    right: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 10;
}

.mines-volume-control:hover {
    color: var(--text-light, #fff);
}

/* =========================================================================
   İSTATİSTİK MODAL (Ortak Yapıdan Alındı)
   ========================================================================= */
.mines-stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.mines-stats-modal.show {
    display: flex;
}

.mines-stats-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.mines-stats-modal-content {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: linear-gradient(145deg, var(--surface-800) 0%, var(--surface-900) 100%);
    border: 1px solid var(--surface-700);
    border-radius: 16px;
    padding: 24px;
    z-index: 1001;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    animation: modalPopIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mines-stats-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--surface-700);
    padding-bottom: 16px;
}

.mines-stats-modal-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
}

.mines-stats-modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
    padding: 4px;
}

.mines-stats-modal-close:hover {
    color: var(--danger-color, #ef4444);
}

.mines-stats-tours {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.mines-stats-tour-item {
    flex: 1;
    background: var(--surface-900);
    border: 1px solid var(--surface-700);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.mines-stats-tour-label {
    display: block;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.mines-stats-tour-value {
    font-size: 24px;
    font-weight: 900;
}

.mines-stats-tour-value.wins { color: #10b981; }
.mines-stats-tour-value.losses { color: var(--danger-color, #ef4444); }

.mines-stats-chart {
    background: var(--surface-900);
    border: 1px solid var(--surface-700);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 24px;
    height: 120px;
}

.mines-stats-summary {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mines-stats-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-900);
    padding: 12px 16px;
    border-radius: 8px;
}

.mines-stats-summary-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
}

.mines-stats-summary-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mines-stats-summary-amount {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-primary);
}

.mines-stats-summary-amount.profit {
    color: #10b981;
}

.mines-stats-coin-icon {
    width: 16px;
    height: 16px;
}

/* =========================================================================
   MOBİL UYUMLULUK
   ========================================================================= */
@media (max-width: 992px) {
    .mines-stats-desktop {
        display: none;
    }
    .mines-stats-mobile {
        display: flex;
        gap: 12px;
        margin-top: 16px;
    }
    .mines-game-area-wrapper {
        min-height: auto;
    }
    .mines-game-area-content {
        padding: 12px;
    }
    .mines-grid-wrapper {
        padding: 8px;
    }
    .mines-grid {
        gap: 6px;
    }
    .mines-play-buttons {
        display: none !important;
    }
    .mines-play-buttons-mobile {
        display: block !important;
        margin-top: 16px;
        width: 100%;
    }
    .mines-volume-control {
        top: 8px;
        right: 8px;
        transform: scale(0.8);
    }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-anim {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
