/* Olta — arcade balık oyunu arayüzü.
   Sayfa .frosted-panel içinde yaşar; buradaki her şey o kapsülün içine sığar. */

.olta-wrap {
    --olta-ink: #e2e8f0;
    --olta-dim: #94a3b8;
    --olta-line: rgba(148, 163, 184, 0.22);
    display: grid;
    gap: 1.25rem;
}

/* ── Başlık şeridi ── */
.olta-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.olta-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin: 0;
}

.olta-sub {
    font-size: 0.875rem;
    color: #475569;
    margin: 0.15rem 0 0;
}

/* Canlı koşul rozeti — oyunu gerçek veriye bağlayan görünür ip ucu */
.olta-cond {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    border: 1px solid transparent;
}
.olta-cond.harika { background: #dcfce7; color: #166534; border-color: #86efac; }
.olta-cond.iyi    { background: #e0f2fe; color: #075985; border-color: #7dd3fc; }
.olta-cond.orta   { background: #fef9c3; color: #854d0e; border-color: #fde047; }
.olta-cond.zayif  { background: #fee2e2; color: #991b1b; border-color: #fca5a5; }
.olta-cond.notr   { background: #f1f5f9; color: #475569; border-color: #cbd5e1; }

/* ── HUD ── */
.olta-hud {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.5rem;
}

.olta-stat {
    background: #0f172a;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 0.85rem;
    padding: 0.55rem 0.7rem;
    text-align: center;
}

.olta-stat-label {
    display: block;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--olta-dim);
    font-weight: 700;
}

.olta-stat-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: #f8fafc;
    font-variant-numeric: tabular-nums;
}

/* ── Oyun alanı ── */
.olta-stage {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    background: #062a49;
    box-shadow: 0 18px 40px -18px rgba(2, 6, 23, 0.7);
    line-height: 0;
}

#olta-canvas {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;   /* dokunmatikte sayfa kaymasın, oyun alsın */
    cursor: crosshair;
}

.olta-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 1.5rem;
    background: rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(4px);
    text-align: center;
    line-height: 1.5;
}

.olta-overlay.hidden { display: none; }

.olta-overlay h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: #f8fafc;
}

.olta-overlay p {
    margin: 0;
    max-width: 34rem;
    color: #cbd5e1;
    font-size: 0.9rem;
}

.olta-btn {
    appearance: none;
    border: 0;
    cursor: pointer;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1rem;
    color: #06263f;
    background: linear-gradient(135deg, #7dd3fc, #38bdf8);
    box-shadow: 0 10px 24px -10px rgba(56, 189, 248, 0.9);
    transition: transform 0.12s ease, filter 0.12s ease;
}
.olta-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.olta-btn:active { transform: translateY(0); }
.olta-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Nasıl oynanır — üç adım */
.olta-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #94a3b8;
}
.olta-steps span {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
}

/* Tur sonucu */
.olta-result-title { color: #94a3b8; font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; }
.olta-result-score { font-size: 2.75rem; font-weight: 900; color: #f8fafc; line-height: 1; font-variant-numeric: tabular-nums; }
.olta-result-meta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; color: #cbd5e1; font-size: 0.9rem; font-weight: 600; }
.olta-result-server { margin-top: 0.35rem; display: grid; gap: 0.35rem; }
.olta-rewards { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; color: #fde68a; font-weight: 800; }
.olta-levelup { color: #4ade80; font-weight: 800; }
.olta-newspecies { color: #7dd3fc; font-weight: 700; font-size: 0.875rem; }
.olta-newbadge { color: #fbbf24; font-weight: 700; font-size: 0.875rem; }
.olta-warn { color: #fca5a5; font-size: 0.8125rem; }
.olta-login-cta { color: #7dd3fc; font-weight: 700; text-decoration: underline; }

/* ── Alt bölümler ── */
.olta-cols {
    display: grid;
    gap: 1.25rem;
}
@media (min-width: 900px) {
    .olta-cols { grid-template-columns: 1.15fr 0.85fr; }
}

.olta-card {
    border: 1px solid var(--olta-line);
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(248, 250, 252, 0.6);
}

.olta-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

/* Yükseltme dükkânı */
.olta-upgrades { display: grid; gap: 0.6rem; }

.olta-upgrade {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--olta-line);
    border-radius: 0.75rem;
    background: #fff;
}

.olta-upgrade-icon { font-size: 1.5rem; line-height: 1; }
.olta-upgrade-name { font-weight: 800; color: #0f172a; font-size: 0.9rem; }
.olta-upgrade-desc { color: #64748b; font-size: 0.75rem; line-height: 1.35; }

.olta-pips { display: flex; gap: 3px; margin-top: 0.3rem; }
.olta-pips i {
    width: 18px; height: 5px; border-radius: 3px;
    background: #e2e8f0; display: block;
}
.olta-pips i.on { background: linear-gradient(90deg, #38bdf8, #0ea5e9); }

.olta-buy {
    appearance: none;
    border: 1px solid #38bdf8;
    background: #e0f2fe;
    color: #075985;
    font-weight: 800;
    font-size: 0.8125rem;
    border-radius: 999px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    white-space: nowrap;
}
.olta-buy:disabled { opacity: 0.45; cursor: not-allowed; }
.olta-buy.maxed { background: #dcfce7; border-color: #86efac; color: #166534; }

/* Lider tablosu */
.olta-lb { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.olta-lb th {
    text-align: left; font-size: 0.6875rem; text-transform: uppercase;
    letter-spacing: 0.06em; color: #64748b; padding: 0.35rem 0.5rem; font-weight: 700;
}
.olta-lb td { padding: 0.4rem 0.5rem; border-top: 1px solid var(--olta-line); color: #1e293b; }
.olta-lb td:first-child { font-weight: 800; color: #0ea5e9; width: 2.5rem; }
.olta-lb td:nth-child(3) { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; }
.olta-empty { color: #64748b; font-size: 0.875rem; padding: 0.75rem 0; }

/* Koleksiyon */
.olta-collection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 0.5rem;
}

.olta-fishcard {
    border: 1px solid var(--olta-line);
    border-radius: 0.75rem;
    padding: 0.5rem 0.35rem;
    text-align: center;
    background: #fff;
}
.olta-fishcard.locked { opacity: 0.4; filter: grayscale(1); }
.olta-fishcard .fc-icon { font-size: 1.5rem; line-height: 1.2; min-height: 2rem; }
/* Pixel ikonlar bulanıklaşmadan büyüsün */
.olta-fishcard .fc-icon img {
    display: inline-block;
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
}
.olta-fishcard .fc-name { font-size: 0.7rem; font-weight: 700; color: #0f172a; }
.olta-fishcard .fc-meta { font-size: 0.65rem; color: #64748b; font-variant-numeric: tabular-nums; }
.olta-fishcard.rare { border-color: #fbbf24; box-shadow: 0 0 0 1px rgba(251, 191, 36, 0.3) inset; }

/* Tur sırasında yakalanan tür — kart anında açılır ve kısaca vurgulanır */
.olta-fishcard { transition: opacity 0.25s ease, filter 0.25s ease; }
.olta-fishcard.just-caught { animation: olta-pop 0.7s ease; }

@keyframes olta-pop {
    0%   { transform: scale(1);    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.65); }
    35%  { transform: scale(1.09); box-shadow: 0 0 0 7px rgba(56, 189, 248, 0); }
    100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

/* Tur içinde biriken jeton tahmini */
.olta-pending {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.75rem;
    font-weight: 800;
    animation: olta-pulse 1.6s ease-in-out infinite;
}
@keyframes olta-pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }

@media (prefers-reduced-motion: reduce) {
    .olta-fishcard.just-caught { animation: none; }
    .olta-pending { animation: none; }
}

/* Bağlam notu — oyunun gerçek ürüne köprüsü */
.olta-bridge {
    border-left: 3px solid #38bdf8;
    background: #f0f9ff;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 0.75rem 0.9rem;
    font-size: 0.8125rem;
    color: #0c4a6e;
    line-height: 1.55;
}
.olta-bridge a { font-weight: 700; text-decoration: underline; }

/* ── Telefon ──────────────────────────────────────────────────
   Sahne ekranın tamamını alır: 390px'lik bir telefonda sayfa dolgusu tuvali
   308px'e düşürüyordu ve oyun oynanamıyordu.

   `100vw + translateX(-50%)` full-bleed hilesi burada KULLANILMIYOR: kabın
   viewport'ta ortalanmadığı bu düzende ~20px yatay taşma yapıp layout
   viewport'u şişiriyordu (390 → 420), HUD'un son kutusu ve metinler taşıyordu.
   Onun yerine kabuğun dolgusu sıfırlanıp sahne negatif kenar boşluğuyla
   taşırılıyor — matematiği kapalı, taşma imkânsız.

   !important şart: dolgu Tailwind sınıflarından (`px-4`, `p-6`) geliyor ve
   element seçicisi onları yenemez. Bu dosya yalnız /oyun'dan yüklenir. */
@media (max-width: 640px) {
    main {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0.5rem !important;
        padding-bottom: 1rem !important;
    }
    main > .frosted-panel {
        padding: 0.6rem !important;
        border-radius: 0;
    }
    .olta-stage {
        margin-left: -0.6rem;
        margin-right: -0.6rem;
        border-radius: 0;
        box-shadow: none;
    }

    /* Tuvalin üstündeki krom sıkışır ki sahne kaydırmadan görünsün */
    .olta-wrap { gap: 0.6rem; }
    .olta-head { gap: 0.4rem; }
    .olta-title { font-size: 1.15rem; }
    .olta-sub { display: none; }
    .olta-cond { font-size: 0.72rem; padding: 0.28rem 0.55rem; align-items: flex-start; line-height: 1.35; }

    .olta-hud { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.3rem; }
    .olta-stat { padding: 0.35rem 0.25rem; border-radius: 0.6rem; }
    .olta-stat-label { font-size: 0.55rem; letter-spacing: 0.02em; }
    .olta-stat-value { font-size: 0.95rem; }

    .olta-overlay { gap: 0.6rem; padding: 1rem; }
    .olta-overlay h2 { font-size: 1.2rem; }
    .olta-overlay p { font-size: 0.8rem; }
    .olta-steps { font-size: 0.7rem; gap: 0.3rem; }
    .olta-steps span { padding: 0.25rem 0.5rem; }
    .olta-result-score { font-size: 2rem; }
}

@media (max-width: 380px) {
    .olta-steps { display: none; }   /* çok dar ekranda yer açar */
}

