/* ============================================================
   Oyunlar Sayfası
   ============================================================ */

/* ---------- Hero ---------- */
.oyunlar-section {
    padding-top: 0;
}
.oyunlar-hero {
    text-align: center;
    padding: 2.5rem 1rem 2rem;
}
.oyunlar-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}
.oyunlar-subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,.55);
    margin: 0;
}

/* ---------- Grid ---------- */
.oyunlar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 1rem;
    padding: 0 0 2rem;
}

@media (min-width: 600px) {
    .oyunlar-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1.25rem;
    }
}

@media (min-width: 900px) {
    .oyunlar-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }
}

/* ---------- Kart ---------- */
.oyun-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    /* aspect-ratio desteklemeyen eski mobil tarayıcılar için min-height fallback */
    min-height: 174px;
    aspect-ratio: 3/4;
    background: var(--card-bg, #1a1a2e);
    border: 1.5px solid rgba(255,255,255,.08);
    transition: transform 0.22s cubic-bezier(.34,1.56,.64,1),
                box-shadow 0.22s ease,
                border-color 0.22s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.oyun-card:hover {
    transform: translateY(-6px) scale(1.025);
    box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 2px var(--card-accent, #7c4dff);
    border-color: var(--card-accent, #7c4dff);
    z-index: 2;
}

.oyun-card:active {
    transform: translateY(-2px) scale(1.01);
}

.oyun-card--soon {
    cursor: default;
    opacity: .55;
    filter: grayscale(0.4);
}
.oyun-card--soon:hover {
    transform: none;
    box-shadow: none;
    border-color: rgba(255,255,255,.08);
}

.oyun-card--claimed {
    opacity: .75;
}
.oyun-card--claimed:hover {
    box-shadow: 0 10px 28px rgba(0,0,0,.4);
}

/* ---------- İç yapı ---------- */
/*
 * position: absolute + inset: 0 kullanıyoruz çünkü bazı mobil tarayıcılar
 * (Android Chrome / iOS Safari) aspect-ratio ile belirlenen parent'tan
 * height: 100% değerini doğru hesaplamıyor. Bu yaklaşım her zaman çalışır.
 */
.oyun-card-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
}

.oyun-card-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, var(--card-accent, #7c4dff) 0%, transparent 70%);
    opacity: .18;
    pointer-events: none;
}

.oyun-card:hover .oyun-card-bg {
    opacity: .28;
}

/* ---------- İkon ---------- */
.oyun-card-icon-wrap {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    /* isim alanının üzerinde kalan bölümde ortala */
    bottom: 2.4rem; /* oyun-card-name yüksekliğine eşit */
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 6px 16px rgba(0,0,0,.5));
    transition: transform 0.22s ease;
}

.oyun-card-icon-wrap .oyun-icon {
    width: 54%;
    height: auto;
    display: block;
    transition: transform 0.22s ease;
}

.oyun-card:hover .oyun-card-icon-wrap .oyun-icon {
    transform: scale(1.1);
}

/* .oyun-icon boyutu .oyun-card-icon-wrap içinde tanımlı */

/* ---------- İsim ---------- */
.oyun-card-name {
    position: relative;
    width: 100%;
    padding: 0.55rem 0.5rem 0.6rem;
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    color: #fff;
    background: rgba(0,0,0,.52);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    line-height: 1.25;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Rozet ---------- */
.oyun-card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0.03em;
    pointer-events: none;
    z-index: 3;
}

.oyun-card-badge--soon {
    background: rgba(120,120,120,.75);
    color: #ddd;
    border: 1px solid rgba(255,255,255,.15);
}

.oyun-card-badge--daily {
    background: linear-gradient(135deg, #7c4dff, #651fff);
    color: #fff;
    border: 1px solid rgba(179,157,219,.4);
    box-shadow: 0 2px 8px rgba(124,77,255,.45);
}

.oyun-card-badge--claimed {
    background: rgba(30,160,80,.75);
    color: #b9f6ca;
    border: 1px solid rgba(105,240,174,.3);
}

/* Daily card accent glow */
.oyun-card--daily:not(.oyun-card--claimed) {
    box-shadow: 0 0 0 1.5px rgba(124,77,255,.35), 0 8px 24px rgba(0,0,0,.4);
}
.oyun-card--daily:not(.oyun-card--claimed):hover {
    box-shadow: 0 16px 40px rgba(0,0,0,.5), 0 0 0 2px #7c4dff, 0 0 24px rgba(124,77,255,.45);
}

/* ============================================================
   Günlük Giriş Modal
   ============================================================ */
.oyun-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.28s ease;
}

.oyun-modal-overlay--open {
    opacity: 1;
}

.oyun-modal-box {
    position: relative;
    background: linear-gradient(145deg, #1e1430, #130e2a);
    border: 1.5px solid rgba(124,77,255,.35);
    border-radius: 20px;
    padding: 2rem 1.75rem 1.75rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 24px 64px rgba(0,0,0,.65), 0 0 0 1px rgba(255,255,255,.05) inset;
    transform: translateY(20px) scale(.96);
    transition: transform 0.28s cubic-bezier(.34,1.56,.64,1);
    text-align: center;
}

.oyun-modal-overlay--open .oyun-modal-box {
    transform: translateY(0) scale(1);
}

.oyun-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255,255,255,.08);
    border: none;
    color: rgba(255,255,255,.6);
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.oyun-modal-close:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
}

.oyun-modal-icon-wrap {
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    background: rgba(124,77,255,.15);
    border-radius: 50%;
    border: 2px solid rgba(124,77,255,.3);
}

.oyun-modal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 0.6rem;
}

.oyun-modal-desc {
    font-size: 0.92rem;
    color: rgba(255,255,255,.65);
    margin: 0 0 1.25rem;
    line-height: 1.6;
}

.oyun-modal-desc strong {
    color: #b39ddb;
}

.oyun-modal-reward-preview {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(124,77,255,.15);
    border: 1.5px solid rgba(124,77,255,.3);
    border-radius: 50px;
    padding: 0.45rem 1rem;
    margin-bottom: 1.5rem;
}

.oyun-modal-reward-preview--success {
    background: rgba(30,160,80,.15);
    border-color: rgba(105,240,174,.3);
}

.oyun-modal-reward-amount {
    font-size: 1rem;
    font-weight: 700;
    color: #e1d5ff;
}

.oyun-modal-reward-preview--success .oyun-modal-reward-amount {
    color: #b9f6ca;
}

/* Butonlar */
#daily-login-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.oyun-modal-btn {
    padding: 0.65rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: opacity 0.15s, transform 0.15s;
    min-width: 100px;
}
.oyun-modal-btn:hover { opacity: .88; }
.oyun-modal-btn:active { transform: scale(.97); }
.oyun-modal-btn:disabled { opacity: .5; cursor: not-allowed; }

.oyun-modal-btn--primary {
    background: linear-gradient(135deg, #7c4dff, #651fff);
    color: #fff;
    box-shadow: 0 4px 16px rgba(124,77,255,.4);
}

.oyun-modal-btn--secondary {
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.8);
    border: 1.5px solid rgba(255,255,255,.12);
}
.oyun-modal-btn--secondary:hover {
    background: rgba(255,255,255,.14);
    opacity: 1;
}
