/* =====================================================================
   BUL KAZAN DENİZLİ — Tasarım Sistemi
   Tema: Buz mavisi + beyaz, sıcak altın vurgu, oyunlaştırılmış premium his
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    /* --- Renkler --- */
    --ice-50:  #f2fafd;
    --ice-100: #e2f3fb;
    --ice-200: #c7e9f7;
    --ice-300: #9edaf0;
    --ice-400: #64c2e5;
    --ice-500: #34a6d4;
    --ice-600: #2288b8;
    --ice-700: #1c6c93;
    --ice-800: #16506d;
    --navy-900: #0c2436;

    --white: #ffffff;
    --ink: #12303f;
    --ink-soft: #4c6a78;
    --ink-faint: #82a0ac;

    --gold-400: #ffcf6b;
    --gold-500: #f3ac2e;
    --gold-600: #d68f16;

    --success: #2fb787;
    --danger: #e0574c;
    --danger-bg: #fdeceb;
    --success-bg: #e9f8f1;

    --border: #d7ecf5;
    --shadow-ice: 0 12px 32px -12px rgba(28, 108, 147, 0.28);
    --shadow-soft: 0 4px 14px -6px rgba(28, 108, 147, 0.18);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 999px;

    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-body: 'Inter', sans-serif;

    --header-h: 64px;
    --bottom-nav-h: 64px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: linear-gradient(180deg, var(--ice-50) 0%, var(--white) 320px);
    min-height: 100vh;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--navy-900);
    line-height: 1.2;
    margin: 0 0 .5em;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

button { font-family: inherit; }

:focus-visible {
    outline: 3px solid var(--gold-500);
    outline-offset: 2px;
    border-radius: 4px;
}

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 18px;
}

.container-narrow {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding: 0 18px;
}

/* --------------------------------------------------------------- */
/* Header */
/* --------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    height: var(--header-h);
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.site-header__inner {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--navy-900);
}

.brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    object-fit: cover;
    box-shadow: 0 2px 8px -2px rgba(28, 108, 147, 0.4);
}

.brand small {
    display: block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.68rem;
    color: var(--ice-600);
    letter-spacing: 0.02em;
}

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

/* --------------------------------------------------------------- */
/* Masaüstü navigasyon (başlıklı) — mobilde gizli, alt nav yerine */
/* --------------------------------------------------------------- */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
}

.desktop-nav__item {
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--ink-soft);
    transition: background .15s ease, color .15s ease;
}

.desktop-nav__item:hover { background: var(--ice-50); color: var(--ice-700); }
.desktop-nav__item.is-active { background: var(--ice-100); color: var(--ice-700); }

@media (min-width: 860px) {
    .desktop-nav { display: flex; }
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-link__label {
    display: none;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--ink);
}

@media (min-width: 860px) {
    .profile-link__label { display: inline; }
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--ice-200);
    background: var(--ice-100);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--ice-700);
}

.avatar--lg { width: 96px; height: 96px; font-size: 1.6rem; border-width: 3px; }

/* --------------------------------------------------------------- */
/* Bottom nav (mobil) */
/* --------------------------------------------------------------- */
.bottom-nav {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    height: var(--bottom-nav-h);
    background: var(--white);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 40;
    box-shadow: 0 -6px 20px -14px rgba(12, 36, 54, 0.25);
}

.bottom-nav__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 0.66rem;
    font-weight: 600;
    color: var(--ink-faint);
}

.bottom-nav__item svg { width: 22px; height: 22px; }

.bottom-nav__item.is-active { color: var(--ice-600); }

.page-with-bottom-nav { padding-bottom: calc(var(--bottom-nav-h) + 20px); }

@media (min-width: 860px) {
    .bottom-nav { display: none; }
    .page-with-bottom-nav { padding-bottom: 40px; }
}

/* --------------------------------------------------------------- */
/* Butonlar */
/* --------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 22px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    min-height: 48px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--ice-500), var(--ice-600));
    color: var(--white);
    box-shadow: var(--shadow-ice);
}

.btn-primary:hover { box-shadow: 0 16px 34px -14px rgba(28, 108, 147, 0.42); }

.btn-gold {
    background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
    color: var(--navy-900);
    box-shadow: 0 12px 28px -12px rgba(214, 143, 22, 0.5);
}

.btn-outline {
    background: var(--white);
    color: var(--ice-700);
    border: 1.5px solid var(--ice-200);
}

.btn-ghost {
    background: transparent;
    color: var(--ice-700);
}

.btn-danger { background: var(--danger); color: var(--white); }

.btn-block { width: 100%; }

.btn-sm { padding: 9px 16px; min-height: 38px; font-size: 0.85rem; }

.btn:disabled { opacity: .55; cursor: not-allowed; }

/* --------------------------------------------------------------- */
/* Kartlar */
/* --------------------------------------------------------------- */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-soft);
}

.card + .card { margin-top: 16px; }

.card-title {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: 4px;
}

.card-sub { color: var(--ink-faint); font-size: 0.85rem; margin-bottom: 14px; }

/* --------------------------------------------------------------- */
/* Formlar */
/* --------------------------------------------------------------- */
.form-group { margin-bottom: 16px; }

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-size: 0.98rem;
    background: var(--white);
    color: var(--ink);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--ice-400);
    box-shadow: 0 0 0 4px rgba(100, 194, 229, 0.18);
}

.form-hint { font-size: 0.78rem; color: var(--ink-faint); margin-top: 6px; }

.form-error { font-size: 0.8rem; color: var(--danger); margin-top: 6px; }

.password-field { position: relative; }

.password-toggle {
    position: absolute;
    right: 6px; top: 6px;
    height: calc(100% - 12px);
    padding: 0 12px;
    background: transparent;
    border: none;
    color: var(--ice-600);
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

/* --------------------------------------------------------------- */
/* Uyarılar / Flash mesajlar */
/* --------------------------------------------------------------- */
.alert {
    padding: 13px 16px;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    margin-bottom: 14px;
    font-weight: 500;
}

.alert-error { background: var(--danger-bg); color: #a5342a; }
.alert-success { background: var(--success-bg); color: #1c7a58; }
.alert-info { background: var(--ice-100); color: var(--ice-700); }

/* --------------------------------------------------------------- */
/* Rozet / chip */
/* --------------------------------------------------------------- */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 13px;
    border-radius: var(--radius-pill);
    background: var(--ice-100);
    color: var(--ice-700);
    font-size: 0.78rem;
    font-weight: 700;
}

.chip-gold { background: #fff4dd; color: var(--gold-600); }
.chip-admin { background: var(--navy-900); color: var(--gold-400); }

/* --------------------------------------------------------------- */
/* Stat grid (profil / anasayfa istatistikleri) */
/* --------------------------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

@media (min-width: 560px) {
    .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 16px 14px;
    text-align: center;
}

.stat-box__value {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy-900);
}

.stat-box__label {
    font-size: 0.72rem;
    color: var(--ink-faint);
    font-weight: 600;
    margin-top: 2px;
}

/* --------------------------------------------------------------- */
/* Hero (ana sayfa) */
/* --------------------------------------------------------------- */
.hero {
    background: linear-gradient(160deg, var(--ice-600) 0%, var(--ice-500) 55%, var(--ice-400) 100%);
    border-radius: 0 0 32px 32px;
    padding: 28px 18px 34px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at 85% 0%, rgba(255,255,255,0.22), transparent 55%);
}

.hero__inner { position: relative; z-index: 2; max-width: 1080px; margin: 0 auto; }

.hero__eyebrow {
    font-size: 0.76rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
}

.hero h1 { color: var(--white); font-size: 1.5rem; }

.hero p { color: rgba(255,255,255,0.88); }

/* --------------------------------------------------------------- */
/* Bilmece / görev kartı */
/* --------------------------------------------------------------- */
.riddle-card {
    background: var(--navy-900);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 22px;
    position: relative;
    overflow: hidden;
}

.riddle-card::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(52,166,212,0.45), transparent 70%);
}

.riddle-card__text {
    position: relative;
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--white);
    line-height: 1.5;
}

.code-input-row {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    position: relative;
}

.code-input-row input {
    flex: 1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: var(--font-display);
    font-weight: 700;
}

/* --------------------------------------------------------------- */
/* Auth sayfaları */
/* --------------------------------------------------------------- */
.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 0 60px;
    background: radial-gradient(circle at 50% -10%, var(--ice-100), var(--white) 55%);
}

.auth-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    text-align: center;
}

.auth-logo img { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; box-shadow: var(--shadow-ice); }

.auth-logo span {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--navy-900);
}

.auth-logo small { color: var(--ice-600); font-weight: 600; font-size: 0.78rem; }

.auth-switch {
    text-align: center;
    margin-top: 18px;
    font-size: 0.88rem;
    color: var(--ink-soft);
}

.auth-switch a { color: var(--ice-600); font-weight: 700; }

/* --------------------------------------------------------------- */
/* Profil fotoğrafı kırpma modalı */
/* --------------------------------------------------------------- */
.crop-modal {
    position: fixed;
    inset: 0;
    background: rgba(12, 36, 54, 0.72);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 16px;
}

.crop-modal.is-open { display: flex; }

.crop-modal__panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px;
    width: 100%;
    max-width: 420px;
}

.crop-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--ink);
    touch-action: none;
    cursor: grab;
}

.crop-stage:active { cursor: grabbing; }

.crop-stage canvas { width: 100%; height: 100%; display: block; }

.crop-mask {
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: 0 0 0 2000px rgba(12, 36, 54, 0.55);
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.85);
}

.crop-mask--square { border-radius: 14%; }

.crop-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.crop-controls input[type="range"] { flex: 1; accent-color: var(--ice-600); }

.crop-actions { display: flex; gap: 10px; margin-top: 16px; }
.crop-actions .btn { flex: 1; }

/* --------------------------------------------------------------- */
/* Admin */
/* --------------------------------------------------------------- */
.admin-shell { display: flex; min-height: 100vh; background: var(--ice-50); }

.admin-sidebar {
    width: 232px;
    background: var(--navy-900);
    color: var(--white);
    padding: 20px 14px;
    display: none;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px 20px;
    font-family: var(--font-display);
    font-weight: 700;
}

.admin-sidebar__brand img { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.72);
    font-size: 0.88rem;
    font-weight: 600;
}

.admin-nav-link.is-active { background: rgba(255,255,255,0.1); color: var(--white); }
.admin-nav-link:hover { color: var(--white); }

.admin-main { flex: 1; min-width: 0; padding: 18px 16px 90px; }

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

@media (min-width: 900px) {
    .admin-sidebar { display: flex; }
    .admin-main { padding: 28px 32px 40px; }
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 700px) {
    .admin-grid--2 { grid-template-columns: 1fr 1fr; }
    .admin-grid--3 { grid-template-columns: repeat(3, 1fr); }
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--ink-faint);
}

.empty-state__icon { font-size: 2rem; margin-bottom: 8px; }

.table-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; font-size: 0.86rem; min-width: 480px; }

th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }

th { background: var(--ice-50); color: var(--ice-700); font-weight: 700; font-size: 0.76rem; text-transform: uppercase; letter-spacing: 0.03em; }

tr:last-child td { border-bottom: none; }

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-success { background: var(--success-bg); color: #1c7a58; }
.badge-danger { background: var(--danger-bg); color: #a5342a; }
.badge-muted { background: var(--ice-100); color: var(--ice-700); }

/* --------------------------------------------------------------- */
/* Yardımcı sınıflar */
/* --------------------------------------------------------------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.muted { color: var(--ink-faint); }
.section-title { font-size: 1.05rem; margin-bottom: 12px; }
.footer-note {
    text-align: center;
    color: var(--ink-faint);
    font-size: 0.78rem;
    padding: 30px 18px 10px;
}
.footer-note p { margin: 0 0 8px; line-height: 1.5; }
.footer-note a { color: var(--ice-600); font-weight: 700; }

/* --------------------------------------------------------------- */
/* Nasıl Oynanır adımları */
/* --------------------------------------------------------------- */
.how-it-works {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.how-it-works__step {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--ice-50);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 8px 14px 8px 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ink-soft);
}

.how-it-works__step span {
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--ice-500);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* --------------------------------------------------------------- */
/* Günlük ödül */
/* --------------------------------------------------------------- */
.daily-reward-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #fff8e8, #fff2d4);
    border: 1.5px solid var(--gold-400);
    border-radius: var(--radius-lg);
    padding: 12px 16px;
    margin-top: 14px;
}

.daily-reward-strip__label {
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--gold-600);
}

.daily-reward-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    border: 1.5px solid var(--gold-500);
    background: #fff8e8;
    color: var(--gold-600);
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    transition: transform .15s ease;
}

.daily-reward-chip:active { transform: scale(0.96); }
.daily-reward-chip:disabled { cursor: default; }

.daily-reward-chip--claimed {
    border-color: var(--success);
    background: var(--success-bg);
    color: #1c7a58;
}

/* --------------------------------------------------------------- */
/* Görev galerisi */
/* --------------------------------------------------------------- */
.task-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
    gap: 8px;
}

.task-gallery__thumb {
    border: none;
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    background: rgba(255,255,255,0.08);
}

.task-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(12, 36, 54, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.lightbox.is-open { display: flex; }

.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 12px; }

.lightbox__close {
    position: absolute;
    top: 18px; right: 18px;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
}

/* --------------------------------------------------------------- */
/* YouTube embed (responsive 16:9) */
/* --------------------------------------------------------------- */
.video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* --------------------------------------------------------------- */
/* Görev ipuçları */
/* --------------------------------------------------------------- */
.task-hints {
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 12px 14px;
}

.task-hints__title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--gold-400);
    margin-bottom: 6px;
}

.task-hints__item {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
    padding: 4px 0;
}

.task-hints__item + .task-hints__item { border-top: 1px solid rgba(255,255,255,0.1); }

/* --------------------------------------------------------------- */
/* Kod giriş mesajı */
/* --------------------------------------------------------------- */
.task-code-message--success { color: #7be3b8; font-weight: 600; }
.task-code-message--error { color: #ff9a90; font-weight: 600; }

.task-winner-banner {
    background: rgba(255, 207, 107, 0.16);
    border: 1px solid rgba(255, 207, 107, 0.4);
    border-radius: 12px;
    padding: 12px 14px;
    color: #fff;
    font-size: 0.9rem;
}

.task-winner-banner--muted {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.16);
    color: rgba(255,255,255,0.75);
}

/* --------------------------------------------------------------- */
/* Kazanma kutlama animasyonu */
/* --------------------------------------------------------------- */
.win-celebration {
    position: fixed;
    inset: 0;
    background: rgba(12, 36, 54, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity .3s ease;
    padding: 20px;
}

.win-celebration.is-visible { pointer-events: auto; }

.win-celebration.is-visible { opacity: 1; }

.win-celebration__card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    text-align: center;
    max-width: 340px;
    transform: scale(0.85);
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 30px 60px -20px rgba(12,36,54,0.5);
}

.win-celebration.is-visible .win-celebration__card { transform: scale(1); }

.win-celebration__emoji { font-size: 3rem; margin-bottom: 8px; }
.win-celebration__title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--navy-900); }
.win-celebration__text { color: var(--ink-soft); margin-top: 6px; font-size: 0.9rem; }
.win-celebration__reward { margin-top: 12px; font-weight: 700; color: var(--gold-600); }

/* --------------------------------------------------------------- */
/* Geçmiş görevler grid */
/* --------------------------------------------------------------- */
.history-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .history-grid { grid-template-columns: repeat(2, 1fr); }
}

.history-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 14px;
    box-shadow: var(--shadow-soft);
}

.history-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--navy-900);
    margin-top: 8px;
    font-size: 0.95rem;
}

.history-card__winner { font-size: 0.8rem; color: var(--gold-600); font-weight: 600; margin-top: 4px; }
.history-card__date { font-size: 0.74rem; color: var(--ink-faint); margin-top: 6px; }

/* --------------------------------------------------------------- */
/* Admin görev formu */
/* --------------------------------------------------------------- */
.media-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.media-manager-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 1/1;
    border: 1px solid var(--border);
}

.media-manager-item img { width: 100%; height: 100%; object-fit: cover; }

.media-manager-item button {
    position: absolute;
    top: 4px; right: 4px;
    width: 24px; height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(224, 87, 76, 0.9);
    color: #fff;
    font-size: 0.7rem;
    cursor: pointer;
}

.hint-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}

.hint-list-item:last-child { border-bottom: none; }

/* --------------------------------------------------------------- */
/* Bildirimler */
/* --------------------------------------------------------------- */
.notif-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    color: var(--ice-700);
}

.notif-bell svg { width: 21px; height: 21px; }

.notif-bell__dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--danger);
    border: 2px solid var(--white);
}

.notif-item {
    display: block;
    padding: 14px;
    border-bottom: 1px solid var(--border);
}

.notif-item:last-child { border-bottom: none; }
.notif-item--unread { background: var(--ice-50); }
.notif-item__title { font-weight: 700; font-size: 0.9rem; color: var(--navy-900); }
.notif-item__body { font-size: 0.85rem; color: var(--ink-soft); margin-top: 2px; }
.notif-item__time { font-size: 0.72rem; color: var(--ink-faint); margin-top: 4px; }

/* --------------------------------------------------------------- */
/* Çark */
/* --------------------------------------------------------------- */
.wheel-stage {
    position: relative;
    width: 100%;
    max-width: 340px;
    margin: 0 auto;
    aspect-ratio: 1/1;
}

.wheel-pointer {
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.8rem;
    color: var(--gold-500);
    z-index: 5;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,0.3));
}

.wheel-disc {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 8px solid var(--white);
    box-shadow: 0 20px 50px -14px rgba(12,36,54,0.45), 0 0 0 4px var(--ice-300);
    transform: rotate(0deg);
    overflow: hidden;
}

.wheel-disc__label {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 0;
    transform-origin: 0 0;
    pointer-events: none;
}

.wheel-disc__label span {
    position: absolute;
    right: 6%;
    top: 0;
    transform: translateY(-50%);
    text-align: right;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.12;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
}

/* Çark + ödül listesi (masaüstünde yan yana, telefonda alt alta) */
.wheel-layout { display: block; }
.wheel-prize-list { margin-top: 18px; }
.wheel-prize-list ul { list-style: none; margin: 0; padding: 0; }
.wheel-prize-list li { padding: 9px 2px; border-bottom: 1px solid var(--border, #e2edf3); font-weight: 600; font-size: 0.92rem; }
.wheel-prize-list li:last-child { border-bottom: none; }
@media (min-width: 900px) {
    .wheel-layout { display: flex; align-items: center; justify-content: center; gap: 36px; }
    .wheel-layout .wheel-stage { max-width: 440px; margin: 0; flex: 0 0 440px; }
    .wheel-prize-list { margin-top: 0; flex: 0 1 300px; }
}

/* --------------------------------------------------------------- */
/* Ödül talebi (Kazandığın Ödüller) */
/* --------------------------------------------------------------- */
.claim-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.claim-item:last-child { border-bottom: none; }

.claim-item__img {
    width: 52px; height: 52px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--ice-100);
}

.claim-item__img--placeholder {
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
}

.claim-item__body { flex: 1; min-width: 0; }
.claim-item__title { font-weight: 700; color: var(--navy-900); font-size: 0.92rem; }
.claim-item__status { margin-top: 4px; }

/* --------------------------------------------------------------- */
/* Admin çark yönetimi */
/* --------------------------------------------------------------- */
.prize-prob-bar {
    height: 8px;
    border-radius: 4px;
    background: var(--ice-100);
    overflow: hidden;
    margin-top: 6px;
}

.prize-prob-bar__fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ice-500), var(--gold-500));
}

.notif-bell__count {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--white);
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ---------- Yorumlar ---------- */
.comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--ice-200); }
.comment--reply { padding-left: 0; border-bottom: none; padding-top: 8px; padding-bottom: 8px; }
.comment-replies { margin-left: 22px; padding-left: 12px; border-left: 2px solid var(--ice-200); }
.comment__main { flex: 1; min-width: 0; }
.comment__head { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 0.85rem; }
.comment__name { font-weight: 700; color: var(--navy-900); }
.comment__time { font-size: 0.72rem; margin-left: auto; }
.comment__body { margin-top: 3px; font-size: 0.92rem; word-break: break-word; overflow-wrap: anywhere; }
.comment__actions { display: flex; gap: 14px; margin-top: 4px; }
.comment__link { background: none; border: none; padding: 2px 0; font-size: 0.76rem; font-weight: 600; color: var(--ice-600); cursor: pointer; }
.comment__link--danger { color: #c0392b; }
.comment-form { margin-top: 10px; }
.comment-form textarea { resize: vertical; min-height: 56px; }
.comment-form__row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.comment-form__msg { color: #c0392b; font-size: 0.82rem; margin-top: 4px; }
.comment-form--reply { margin: 6px 0 10px; }
.user-chip { display: inline-flex; align-items: center; gap: 8px; color: inherit; }
.user-link { color: inherit; font-weight: 600; }
.user-chip:hover span, .user-link:hover { text-decoration: underline; }

/* ---------- Açılır bölümler (profil) ---------- */
.fold { margin-top: 14px; }
.fold > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; background: var(--white); border: 1px solid var(--border); border-radius: 14px;
    font-family: var(--font-display); font-weight: 700; color: var(--navy-900);
}
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary::after { content: '▾'; transition: transform .2s; color: var(--ice-600); }
.fold[open] > summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.fold[open] > summary::after { transform: rotate(180deg); }
.fold > .card { margin-top: 0; border-top: none; border-top-left-radius: 0; border-top-right-radius: 0; }

/* ---------- Yükleniyor ekranı ---------- */
.bkd-loader {
    position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center;
    background: rgba(12, 36, 54, 0.45); backdrop-filter: blur(2px);
}
.bkd-loader.is-visible { display: flex; }
.bkd-loader__box {
    background: #fff; border-radius: 18px; padding: 22px 28px; display: flex; flex-direction: column;
    align-items: center; gap: 12px; box-shadow: 0 20px 50px -12px rgba(12,36,54,.5); font-weight: 600; color: #16506d;
}
.bkd-loader__spinner {
    width: 38px; height: 38px; border-radius: 50%; border: 4px solid #cfeaf6; border-top-color: #2288b8;
    animation: bkd-spin .8s linear infinite;
}
@keyframes bkd-spin { to { transform: rotate(360deg); } }

/* ---------- Sıralama tablosu (mobilde yatay kaydırma yok) ---------- */
.rank-table { min-width: 0; table-layout: fixed; width: 100%; }
.rank-table th, .rank-table td { padding: 10px 8px; }
.rank-table th:first-child, .rank-table td:first-child { width: 52px; }
.rank-table th:last-child, .rank-table td:last-child { width: 64px; text-align: right; font-weight: 700; }
.rank-table .rank-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rank-table .rank-user > .avatar { flex: 0 0 auto; }
.rank-table .rank-user__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---------- Görev kartı içindeki yorumlar (koyu zemin ile birleşik) ---------- */
.comments-block { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.18); color: #fff; }
.comments-block__title { font-weight: 700; font-size: 0.98rem; margin-bottom: 8px; }
.comments-muted { color: rgba(255,255,255,0.65); font-size: 0.74rem; }
.riddle-card .comment { border-bottom: 1px solid rgba(255,255,255,0.12); }
.riddle-card .comment--reply { border-bottom: none; }
.riddle-card .comment__name { color: #fff; }
.riddle-card .comment__time { color: rgba(255,255,255,0.55); }
.riddle-card .comment__body { color: rgba(255,255,255,0.92); }
.riddle-card .comment__link { color: #9edaf0; }
.riddle-card .comment__link--danger { color: #ff9b8f; }
.riddle-card .comment-replies { border-left-color: rgba(255,255,255,0.22); }
.riddle-card .comment-form textarea.form-control {
    background: rgba(255,255,255,0.10); border: 1px solid rgba(255,255,255,0.25); color: #fff;
}
.riddle-card .comment-form textarea.form-control::placeholder { color: rgba(255,255,255,0.55); }
.riddle-card .comment-form__msg { color: #ffb3a8; }
.is-hidden { display: none !important; }
.comment__more { display: block; margin: 4px 0 6px; }
.comment__like { display: inline-flex; align-items: center; gap: 2px; }
.comment__heart, .comment__likecount { background: none; border: none; cursor: pointer; padding: 2px 4px; font-size: 0.9rem; color: inherit; line-height: 1; }
.comment__heart { font-size: 1.05rem; }
.comment__likecount { font-size: 0.78rem; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.comment__like.is-liked .comment__heart { color: #ff5d73; }
.riddle-card .comment__heart, .riddle-card .comment__likecount { color: rgba(255,255,255,0.8); }
.riddle-card .comment__like.is-liked .comment__heart { color: #ff7d8f; }
.likers-modal { position: fixed; inset: 0; z-index: 9000; background: rgba(12,36,54,0.55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.likers-modal__panel { background: #fff; color: var(--navy-900, #0c2436); border-radius: 16px; width: 100%; max-width: 340px; max-height: 70vh; display: flex; flex-direction: column; overflow: hidden; }
.likers-modal__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.likers-modal__close { background: none; border: none; font-size: 1.1rem; cursor: pointer; }
.likers-modal__list { padding: 8px 16px 14px; overflow-y: auto; }
.likers-modal__row { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.likers-modal__row a { font-weight: 600; }
.riddle-card .comment__more-top, .riddle-card .comments-block .btn-outline { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.4); }

.comment-replies { border-left: none !important; }
.comment-replies.has-items { border-left: 2px solid rgba(255,255,255,0.22) !important; }
.comment-replies:not(.has-items) { margin-left: 0; padding-left: 0; }
.group-controls { margin: 2px 0 6px; display: flex; gap: 16px; flex-wrap: wrap; }
.comment-list > .group-controls { margin-top: 10px; }
.comment.is-flash { animation: bkd-flash 2.4s ease-out; }
@keyframes bkd-flash { 0%, 40% { background: rgba(243,172,46,0.28); } 100% { background: transparent; } }

/* Sosyal medya düğmeleri */
.social-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.footer-note .social-row { justify-content: center; }
.social-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
    border: 1px solid var(--border); background: rgba(255,255,255,.04); font-weight: 700; font-size: .85rem;
    text-decoration: none; color: inherit;
}
.footer-note a.social-btn { color: inherit; }
.social-btn:hover { border-color: var(--ice-600); }
.rank-more { text-align: center; margin-top: 12px; }

/* Podyum (ilk 3) */
.podium { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: start; padding: 6px 0 14px; }
.podium__slot {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
    padding: 10px 6px 8px; border-radius: 16px; background: var(--ice-50, #f2fafd); border: 1px solid var(--border, #e2edf3);
    text-decoration: none; color: inherit; min-width: 0;
}
.podium__slot--1 { margin-top: 0; background: linear-gradient(180deg, #fff6dc, #fff); border-color: #f3ac2e; }
.podium__slot--2, .podium__slot--3 { margin-top: 38px; }
.podium__slot--empty { visibility: hidden; }
.podium__medal { font-size: 1.4rem; line-height: 1; }
.podium__avatar { width: 52px; height: 52px; font-size: 1.1rem; }
.podium__slot--1 .podium__avatar { width: 66px; height: 66px; font-size: 1.3rem; }
.podium__name { font-weight: 800; font-size: 0.85rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium__pts { font-size: 0.75rem; color: var(--ink-soft, #5b7686); }
.podium__rank { font-weight: 800; font-size: 0.8rem; opacity: .6; }

/* Görev kartı otomatik bilgi satırları */
.task-info { list-style: none; margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.08); display: grid; gap: 6px; }
.task-info li { font-size: 0.88rem; color: rgba(255,255,255,0.82); }
.task-info li strong { color: #fff; }

.finders-card { padding: 6px 14px; }
.finder-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.finder-row:last-child { border-bottom: 0; }
.finder-row__main { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 0.9rem; }
.finder-row__main .muted { font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finder-row__time { font-size: 0.75rem; white-space: nowrap; }

.ig-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; font-weight: 600; color: #c13584; text-decoration: none; }
.ig-link:hover { text-decoration: underline; }

/* Profil sekmeleri */
.tabs { margin-top: 8px; }
.tabs__nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs__nav::-webkit-scrollbar { display: none; }
.tabs__btn { flex: 0 0 auto; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--white); font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); cursor: pointer; white-space: nowrap; }
.tabs__btn.is-active { background: var(--navy-900); color: var(--gold-400); border-color: var(--navy-900); }
.tabs__pane { display: none; }
.tabs__pane.is-active { display: block; }
.tabs__pane > .card { margin-top: 0; }
.legal-doc h2 { font-size: 1.02rem; margin: 18px 0 6px; }
.legal-doc p { font-size: 0.9rem; line-height: 1.6; margin: 0 0 8px; }

.consent-check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.82rem; line-height: 1.45; margin: 0 0 12px; cursor: pointer; }
.consent-check input { margin-top: 3px; flex: 0 0 auto; width: 18px; height: 18px; }

/* Yasal metin bağlantıları: tıklanabilir olduğu belli olsun */
.consent-check a, .footer-note .footer-legal a, .legal-doc a { color: #1a73e8; text-decoration: underline; font-weight: 600; }
.consent-check a:hover, .footer-note .footer-legal a:hover, .legal-doc a:hover { color: #0b57d0; }
.footer-note .footer-legal { line-height: 1.9; }
