/* ============================================================
   DefneStore — koyu tema + sakin defne yaprağı yeşili
   ============================================================ */

:root {
    --bg-deep:        #070b09;
    --bg-deep-2:      #0b120d;
    --card:           #101712;
    --card-2:         #141d17;
    --input:          #172019;
    --input-2:        #1a261d;
    --line:           #29372d;
    --text:           #edf4ef;
    --text-soft:      #a8b9ad;
    --text-mute:      #74847a;
    --gold:           #8faf73;
    --gold-2:         #b8d69e;
    --gold-3:         #4f7447;
    --green:          #58c98a;
    --gold-rgb:       143,175,115;
    --gold2-rgb:      184,214,158;
    --green-rgb:      88,201,138;
    --shadow-card:    0 30px 80px -45px rgba(89,126,74,.55);
    --radius:         16px;
    --radius-card:    24px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: var(--bg-deep);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.page-order {
    background:
        radial-gradient(var(--glow-top-size, 600px) calc(var(--glow-top-size, 600px) * 0.55) at 50% 7%,
            rgba(var(--gold-rgb,255,184,0), var(--glow-top-opacity, 0.08)), transparent 65%),
        linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-deep-2) 100%);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 16px 80px;
    perspective: 1200px;
}

.bg-glow {
    display: none;
}

/* element transform */
.el {
    display: inline-block;
    transform:
        translate3d(var(--el-x,0), var(--el-y,0), var(--el-z,0))
        rotate(var(--el-rot,0deg))
        scale(var(--el-scale,1));
    transform-origin: center;
    transition: transform .25s ease;
    will-change: transform;
}

/* ----- order page ----- */
.order-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.brand-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 4px 8px 8px;
}

.brand-logo {
    display: inline-flex;
    width: 56px;
    height: 56px;
    position: relative;
    filter: drop-shadow(0 0 var(--logo-glow-blur, 24px)
        rgba(var(--gold-rgb,255,184,0), var(--logo-glow-opacity, 0.45)));
}

.brand-logo .el-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

/* Brand link — tıklayıp anasayfaya götürür */
.brand-link {
    text-decoration: none;
    cursor: pointer;
    transition: transform .25s cubic-bezier(.22,1.3,.6,1), filter .25s;
    will-change: transform, filter;
}
.brand-link:hover,
.brand-link.is-hovered {
    transform: translateY(-2px) scale(1.03);
    filter: drop-shadow(0 6px 18px rgba(var(--gold-rgb), 0.35));
}
.brand-link:hover .brand-name-2,
.brand-link.is-hovered .brand-name-2 {
    text-shadow: 0 0 14px rgba(var(--gold-rgb), 0.55);
}
.brand-link:active { transform: translateY(0) scale(0.98); }
.brand-link:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.6); outline-offset: 6px; border-radius: 4px; }

.brand-name {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1.2px;
    font-style: italic;
    line-height: 1;
}

.brand-name-1 { color: var(--brand-1, #fff); }
.brand-name-2 { color: var(--brand-2, var(--gold)); }

.brand-tagline {
    margin-top: 6px;
    font-size: 10px;
    letter-spacing: 4px;
    color: var(--gold);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.brand-tagline::before,
.brand-tagline::after {
    content: '';
    height: 1px;
    flex: 0 0 28px;
    background: linear-gradient(90deg, transparent, rgba(var(--gold-rgb), 0.55), transparent);
}

/* ----- card ----- */
.card {
    position: relative;
    width: 100%;
    background: linear-gradient(180deg, var(--card) 0%, var(--card-2) 100%);
    border: 1px solid rgba(255,255,255,0.04);
    border-radius: var(--radius-card);
    padding: 8px 22px 22px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,184,0,0.35), transparent);
}

/* tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    margin: 4px -22px 22px;
    padding: 0 14px;
}

.tab {
    flex: 1;
    background: none;
    border: 0;
    color: var(--text-soft);
    font-size: 14.5px;
    font-weight: 600;
    padding: 16px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    transition: color .2s;
    font-family: inherit;
}

.tab:hover { color: var(--text); }

.tab-ic { width: 17px; height: 17px; flex-shrink: 0; }

.tab.active { color: var(--gold); }

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 18%;
    right: 18%;
    height: 2px;
    background: var(--gold);
    border-radius: 2px;
}

/* fields */
.field-block { margin-bottom: 18px; }

.field-label {
    display: block;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1.4px;
    color: var(--text-soft);
    font-weight: 700;
    margin-bottom: 8px;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color .2s, box-shadow .2s;
}

.input-shell:focus-within {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255,184,0,0.12);
}

.input-ic {
    width: 18px;
    height: 18px;
    color: var(--text-mute);
    margin: 0 12px;
    flex-shrink: 0;
}

.input-shell input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: none;
    color: var(--text);
    padding: 14px 14px 14px 0;
    font-size: 14px;
    font-family: inherit;
}

.input-shell input::placeholder { color: var(--text-mute); }

.field-hint {
    display: block;
    color: var(--text-mute);
    font-size: 11.5px;
    margin-top: 6px;
}

/* consent */
.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: var(--input-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 13px 14px;
    margin-bottom: 18px;
    cursor: pointer;
    transition: border-color .2s;
}

.consent:hover { border-color: rgba(255,184,0,0.35); }

.consent input {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid var(--text-mute);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
    margin: 2px 0 0;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    transition: background .15s, border-color .15s;
}

.consent input:checked {
    background: var(--gold);
    border-color: var(--gold);
}

.consent input:checked::after {
    content: '';
    width: 9px;
    height: 5px;
    border: solid #0b0d18;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg) translateY(-1px);
}

.consent-box { display: none; }

.consent-text {
    color: var(--text-soft);
    font-size: 12.5px;
    line-height: 1.5;
}

/* consent metinleri kelime kelime sarmalanabilsin — transform burada anlamsız */
.consent-text .el {
    display: inline;
    transform: none;
}
.consent-text .em {
    color: var(--gold);
    font-style: italic;
    font-weight: 600;
}

/* submit */
.submit-btn {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--gold-2) 0%, var(--gold) 55%, var(--gold-3) 100%);
    color: #0b0d18;
    font-weight: 800;
    font-size: 15px;
    padding: 15px 18px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow:
        0 8px 22px -10px rgba(var(--gold-rgb), 0.55),
        0 1px 0 rgba(255,255,255,0.25) inset,
        0 -2px 0 rgba(0,0,0,0.12) inset;
    transition: filter .15s, box-shadow .25s, transform .12s;
    font-family: inherit;
    letter-spacing: .2px;
}

.submit-btn:hover {
    filter: brightness(1.05);
    box-shadow:
        0 12px 28px -10px rgba(var(--gold-rgb), 0.7),
        0 1px 0 rgba(255,255,255,0.3) inset,
        0 -2px 0 rgba(0,0,0,0.15) inset;
}

.submit-btn:active { transform: translateY(1px); }
.submit-btn svg { width: 16px; height: 16px; }

/* footer */
.card-foot { margin-top: 22px; text-align: center; }

.status-line {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-soft);
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 6px rgba(var(--green-rgb,52,211,153), 0.55);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%,100% { box-shadow: 0 0 5px rgba(var(--green-rgb,52,211,153), 0.45); }
    50%     { box-shadow: 0 0 10px rgba(var(--green-rgb,52,211,153), 0.8); }
}

.status-label { color: var(--text-soft); }
.status-value { color: var(--green); font-weight: 700; }

.card-foot hr {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 14px 0 12px;
}

.foot-copy {
    margin: 0;
    color: var(--text-soft);
    font-size: 12px;
}

.foot-disclaimer {
    margin: 4px 0 0;
    color: var(--text-mute);
    font-size: 11px;
}

/* flash */
.flash {
    margin: 0 0 16px;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 13px;
    border: 1px solid;
}

.flash-success {
    color: #b6f5d8;
    background: rgba(52,211,153,0.10);
    border-color: rgba(52,211,153,0.35);
}

.flash-error {
    color: #ffc8c8;
    background: rgba(255,90,90,0.10);
    border-color: rgba(255,90,90,0.35);
}

/* ===== Game picker ===== */
.pick-panel { padding: 4px 0; display: flex; flex-direction: column; gap: 12px; }

/* Scrollable container — büyük listelerde dikey kaydırma + drag tutamak */
/* Sarı scroll rail'i içerikle KAYMAMASI için scroll'un DIŞINDA, wrapper'a göre konumlanır */
.game-scroll-wrap { position: relative; margin-top: 8px; }
.game-scroll {
    max-height: 440px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 14px;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE */
}
.game-scroll::-webkit-scrollbar { width: 0; height: 0; }

.game-scroll-rail {
    position: absolute;
    top: 0; right: 2px;
    width: 6px;
    height: 100%;
    background: rgba(var(--gold-rgb), 0.08);
    border-radius: 999px;
    opacity: 0;
    transition: opacity .2s;
    pointer-events: none;
}
.game-scroll-wrap.has-overflow .game-scroll-rail { opacity: 1; pointer-events: auto; }
.game-scroll-thumb {
    position: absolute;
    left: 0; right: 0;
    background: linear-gradient(180deg, var(--gold), var(--gold-2));
    border-radius: 999px;
    cursor: grab;
    box-shadow: 0 0 8px rgba(var(--gold-rgb), 0.4);
    transition: background .15s;
}
.game-scroll-thumb:hover, .game-scroll-thumb.is-dragging {
    background: linear-gradient(180deg, var(--gold-3), var(--gold));
}
.game-scroll-thumb.is-dragging { cursor: grabbing; }

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}
.game-tile-form { margin: 0; }
.game-tile {
    width: 100%;
    background-color: var(--input);
    background-image: none;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 12px;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    transition: border-color .15s, background-color .15s, transform .12s, box-shadow .15s, filter .15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 110px;
    text-align: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Görsel border'a (hover'daki sarı parlamaya) taşmasın — sadece border'ın iç tarafını doldursun */
    background-origin: padding-box;
    background-clip: padding-box;
    isolation: isolate;
}
/* Klavye erişimi için sadece :focus-visible'a sarı vurgu — fare tıklamasında gözükmez */
.game-tile:focus { outline: none; box-shadow: none; }
.game-tile:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.55); outline-offset: 2px; }

/* Kapak görselli kutular: görsel border'ın içini tam doldurur — köşelere kadar uzanır ama border'a taşmaz */
.game-tile.has-cover {
    color: #fff;
    text-shadow: 0 2px 6px rgba(0,0,0,0.88), 0 1px 3px rgba(0,0,0,0.95);
    border-color: rgba(var(--gold-rgb), 0.28);
}
/* Aktif (kilitsiz) kapak görselleri: HİÇ gölge/karartma yok — oyun açık olduğu için canlı renkler */
.game-tile.has-cover:not(.is-locked)::before { content: none; }

/* Sadece kilitli kapak görsellerinde karartma + grayscale */
.game-tile.is-locked.has-cover {
    color: #e8ebf5;
    filter: grayscale(0.55);
}
.game-tile.is-locked.has-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.62) 0%, rgba(0,0,0,0.82) 100%);
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
}

.game-tile:hover { border-color: var(--gold); background-color: var(--input-2); box-shadow: 0 6px 16px -8px rgba(var(--gold-rgb), 0.4); }
.game-tile.has-cover:hover {
    box-shadow: 0 8px 22px -8px rgba(var(--gold-rgb), 0.55);
}
.game-tile:active { transform: translateY(1px); }

.game-tile.is-locked {
    cursor: not-allowed;
    color: var(--text-mute);
    background-color: rgba(255,255,255,0.02);
}
.game-tile.is-locked:hover { border-color: rgba(255,140,140,0.55); }
.game-tile.is-locked.has-cover:hover {
    box-shadow: 0 6px 16px -8px rgba(255,90,90,0.35);
}

.game-tile-name { position: relative; z-index: 1; line-height: 1.25; word-break: break-word; }

.game-tile-lock {
    position: absolute;
    top: 8px; right: 8px;
    color: #ff8a8a;
    z-index: 2;
    background: rgba(0,0,0,0.55);
    border-radius: 999px;
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 6px rgba(0,0,0,0.5);
}
.game-tile-lock svg { width: 12px; height: 12px; }
.game-special-badge {
    position: absolute;
    top: 8px; left: 8px;
    color: var(--gold);
    font-size: 14px;
    line-height: 1;
    z-index: 2;
    text-shadow: 0 0 4px rgba(0,0,0,0.8);
}

/* Admin: cover preview */
.cover-preview-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 8px; flex-wrap: wrap; }
.cover-preview {
    width: 120px;
    height: 70px;
    border-radius: 8px;
    border: 1px solid var(--line);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--input);
    flex-shrink: 0;
}

/* Admin: kapak pozisyon editörü */
.cover-editor {
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 16px;
    align-items: start;
    margin-top: 8px;
    padding: 14px;
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 10px;
}
.cover-editor-left { display: flex; align-items: flex-start; }
.cover-stage {
    width: 100%;
    aspect-ratio: 16 / 10;
    position: relative;
    background: linear-gradient(180deg, #0a0c12, #14171f);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
}
.cover-stage.is-dragging { cursor: grabbing; }
.cover-stage-img {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 50% 50%;
}
.cover-stage-empty {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-mute);
    font-size: 12px;
}
.cover-stage-empty svg { width: 28px; height: 28px; opacity: .6; }
.cover-stage-hint {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 999px;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.cover-editor-right {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cover-controls { display: flex; flex-direction: column; gap: 6px; }
.cover-ctrl-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-soft); }
.cover-ctrl-label output { color: var(--gold); font-family: ui-monospace, monospace; font-weight: 700; }
.cover-controls input[type="range"] {
    width: 100%;
    accent-color: var(--gold);
}
.cover-upload-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* license_allowed_games checkbox listesi (admin) */
.games-checks {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    margin: 6px 0 10px;
}
.game-check {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 13px;
    transition: border-color .15s, background .15s;
}
.game-check:hover { border-color: var(--gold); }
.game-check input { accent-color: var(--gold); }
.game-check.is-on { border-color: rgba(var(--gold-rgb), 0.5); background: rgba(var(--gold-rgb), 0.06); }
.game-check.is-special { border-color: rgba(var(--gold-rgb), 0.35); }
.game-check span { flex: 1; }
.game-special-pill {
    font-style: normal;
    font-size: 10px;
    color: var(--gold);
    background: rgba(var(--gold-rgb), 0.12);
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* ===== Toast notifications ===== */
#toastHost {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line);
    border-left-width: 3px;
    border-radius: 10px;
    padding: 11px 14px 11px 12px;
    font-size: 13px;
    color: var(--text);
    box-shadow: 0 14px 32px -18px rgba(0,0,0,0.7);
    max-width: 360px;
    transform: translateX(120%);
    opacity: 0;
    transition: transform .25s ease, opacity .25s ease;
    pointer-events: auto;
}
.toast-in { transform: none; opacity: 1; }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast-warning { border-left-color: var(--gold); }
.toast-warning svg { color: var(--gold); }
.toast-error { border-left-color: #ff6464; }
.toast-error svg { color: #ff8a8a; }
.toast-success { border-left-color: var(--green); }
.toast-success svg { color: var(--green); }

/* ===== Loader (5 kutu + progress + faz) ===== */
.guard-result.loader-state {
    background: transparent;
    border: 0;
    padding: 10px 0;
    text-align: center;
}
.loader-bars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
}
.char-box {
    width: 52px;
    height: 62px;
    border: 2px dashed rgba(var(--gold-rgb), 0.55);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 1px;
    background: rgba(var(--gold-rgb), 0.04);
    text-shadow: 0 0 8px rgba(var(--gold-rgb), 0.35);
}
.progress-track {
    height: 4px;
    background: rgba(var(--gold-rgb), 0.12);
    border-radius: 2px;
    overflow: hidden;
    margin: 4px auto 10px;
    max-width: 320px;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold-3), var(--gold), var(--gold-2));
    transition: width .18s linear;
    box-shadow: 0 0 8px rgba(var(--gold-rgb), 0.4);
}
.loader-phase {
    color: var(--gold);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ===== Bulk license popup ===== */
.bulk-popup { max-width: 480px; padding: 26px 22px 18px; text-align: left; }
.bulk-popup .qpop-title { text-align: center; }
.bulk-popup .qpop-text  { text-align: center; }
.bulk-keys-list {
    max-height: 320px;
    overflow-y: auto;
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 4px;
    margin: 10px 0 14px;
}
.bulk-key-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}
.bulk-key-row:last-child { border-bottom: 0; }
.bulk-key-num {
    font-size: 11px;
    color: var(--text-mute);
    font-family: ui-monospace, monospace;
    min-width: 32px;
}
.bulk-key-code {
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 14px;
    color: var(--gold);
    letter-spacing: 1.2px;
}
.bulk-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.bulk-actions button { flex: 1 1 auto; }

/* Lisans listesi kopya simgesi */
.copy-mini {
    background: transparent;
    border: 0;
    color: var(--text-mute);
    cursor: pointer;
    padding: 4px;
    margin-left: 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    transition: color .15s, background .15s;
}
.copy-mini:hover { color: var(--gold); background: rgba(255,255,255,0.04); }
.copy-mini svg   { width: 14px; height: 14px; }

/* ===== Queue popup ===== */
.qpop-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 9, 14, 0.93);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: qpopFade .2s ease;
    cursor: default;
}
@keyframes qpopFade { from { opacity: 0; } to { opacity: 1; } }
.qpop-box {
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 26px 24px 20px;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: 0 22px 50px -20px rgba(0,0,0,0.7);
    animation: qpopPop .25s cubic-bezier(.22,1.3,.6,1);
}
@keyframes qpopPop { from { transform: translateY(12px) scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
.qpop-icon {
    display: inline-flex;
    margin-bottom: 12px;
}
.qpop-icon .spinner {
    width: 36px; height: 36px;
    border-width: 3px;
}
.qpop-title {
    margin: 0 0 8px;
    color: var(--gold);
    font-size: 17px;
    letter-spacing: .3px;
}
.qpop-text {
    margin: 0 0 14px;
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.5;
}
.qpop-info {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px;
    color: var(--text);
    margin-bottom: 16px;
}
.qpop-info b { color: var(--gold); font-family: ui-monospace, monospace; }
.qpop-close {
    background: var(--input);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 9px 22px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s, color .15s;
}
.qpop-close:hover { border-color: var(--gold); color: var(--gold); }

.qpop-warn {
    margin: 14px 0 0;
    font-size: 11.5px;
    color: var(--text-mute);
    line-height: 1.45;
    padding-top: 12px;
    border-top: 1px dashed rgba(255,255,255,0.08);
}

/* Popup kapanış animasyonu */
.qpop-overlay.qpop-closing { animation: qpopFadeOut .18s ease forwards; }
.qpop-overlay.qpop-closing .qpop-box { animation: qpopPopOut .18s ease forwards; }
@keyframes qpopFadeOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes qpopPopOut  { from { transform: none; opacity: 1; } to { transform: translateY(-8px) scale(.96); opacity: 0; } }

/* Oyun seçim onay popup'ı */
.confirm-box { padding: 20px 20px 18px; max-width: 330px; }
.confirm-cover {
    width: min(178px, 68vw);
    aspect-ratio: 2 / 3;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    background-color: var(--input);
    margin: 0 auto 14px;
    box-shadow: 0 10px 28px -12px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(var(--gold-rgb), 0.12);
    position: relative;
    overflow: hidden;
}
.confirm-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.6) 100%);
    border-radius: inherit;
}
.confirm-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(var(--gold-rgb), 0.35);
}
.confirm-cover-empty svg { width: 42px; height: 42px; }
.confirm-cover-empty::after { display: none; }

.confirm-game-name { color: var(--gold); }

.confirm-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 4px;
}
.confirm-actions .primary-btn,
.confirm-actions .outline-btn {
    flex: 1 1 auto;
    min-width: 140px;
    padding: 10px 16px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 700;
    font-family: inherit;
    transition: transform .12s, box-shadow .15s, background .15s, border-color .15s, color .15s;
}
.confirm-actions .primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 22px -8px rgba(var(--gold-rgb), 0.55);
}
.confirm-actions .outline-btn:hover {
    border-color: var(--gold);
    color: var(--gold);
}
.confirm-actions button:active { transform: translateY(0) scale(.98); }
.confirm-actions button:focus-visible { outline: 2px solid rgba(var(--gold-rgb), 0.5); outline-offset: 2px; }

/* ===== Guard queue / processing ===== */
.guard-result.queue, .guard-result.processing {
    background: rgba(var(--gold-rgb), 0.04);
    border-color: rgba(var(--gold-rgb), 0.25);
    text-align: left;
}
.queue-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.queue-row > svg {
    width: 22px; height: 22px;
    color: var(--gold);
    flex-shrink: 0;
}
.queue-text { flex: 1; min-width: 0; }
.queue-title {
    font-size: 13px;
    color: var(--text);
    font-weight: 700;
    margin-bottom: 2px;
}
.queue-sub {
    font-size: 12px;
    color: var(--text-soft);
}
.queue-sub b {
    color: var(--gold);
    font-family: ui-monospace, monospace;
}

.spinner {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2.5px solid rgba(var(--gold-rgb), 0.2);
    border-top-color: var(--gold);
    animation: spin 0.8s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Query result cards ===== */
.status-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 0;
}
.status-head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold);
}
.status-head.danger { color: #ff8a8a; }
.status-head svg { width: 22px; height: 22px; }
.status-head h3 {
    margin: 0;
    font-size: 17px;
    letter-spacing: .5px;
}

.kv-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
}
.kv-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-soft);
    font-weight: 700;
}
.kv-val {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 13px;
    color: var(--text);
}

.reactivate-info {
    background: var(--input-2);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 14px;
    text-align: center;
    font-size: 13px;
}
.reactivate-info b { color: var(--gold); font-family: ui-monospace, monospace; letter-spacing: .4px; }

.last-guard-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: -4px;
    padding: 8px;
    background: rgba(var(--gold-rgb), 0.05);
    border: 1px dashed rgba(var(--gold-rgb), 0.25);
    border-radius: 10px;
}
.last-guard-code {
    font-family: ui-monospace, monospace;
    color: var(--gold);
    letter-spacing: 2.5px;
    font-weight: 700;
    font-size: 15px;
}
.last-guard-inline { margin-top: 4px; font-size: 12px; }
.last-guard-inline .last-guard-code { font-size: 13px; }
.muted-small { color: var(--text-mute); font-size: 11px; }

.countdown-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background: rgba(var(--gold-rgb), 0.06);
    border: 1px solid rgba(var(--gold-rgb), 0.3);
    border-radius: 10px;
    color: var(--text-soft);
    font-size: 12.5px;
}
.countdown-banner svg { width: 16px; height: 16px; color: var(--gold); flex-shrink: 0; }
.countdown-banner b { color: var(--gold); font-family: ui-monospace, monospace; letter-spacing: .4px; }

.ghost-link {
    display: block;
    text-align: center;
    color: var(--text-mute);
    font-size: 12.5px;
    text-decoration: none;
    padding: 8px;
    margin-top: 4px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.ghost-link:hover { color: var(--gold); background: rgba(255,255,255,0.03); }

.submit-btn:disabled {
    opacity: .55;
    cursor: not-allowed;
    filter: grayscale(.2);
}

/* tab as anchor (no underline) */
.tab { text-decoration: none; }

/* ===== Steam unlock panel ===== */
.steam-panel {
    padding: 4px 0 4px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.steam-head {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--gold);
}
.steam-head svg { width: 22px; height: 22px; }
.steam-head h3 {
    margin: 0;
    font-size: 17px;
    letter-spacing: .5px;
}
.steam-creds {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.cred-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cred-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--text-soft);
    font-weight: 700;
}
.cred-val {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--input);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 10px 12px;
}
.cred-val code {
    flex: 1;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 14px;
    color: var(--text);
    letter-spacing: .8px;
}
.cred-eye, .cred-copy {
    background: transparent;
    border: 0;
    color: var(--text-mute);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    transition: color .15s, background .15s;
}
.cred-eye:hover, .cred-copy:hover { color: var(--gold); background: rgba(255,255,255,0.04); }
.cred-eye svg, .cred-copy svg { width: 16px; height: 16px; }

/* guard result */
.guard-result {
    margin-top: 6px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid;
    text-align: center;
}
.guard-result.success {
    background: rgba(var(--gold-rgb), 0.06);
    border-color: rgba(var(--gold-rgb), 0.4);
}
.guard-result.error {
    background: rgba(255,90,90,0.08);
    border-color: rgba(255,90,90,0.35);
    color: #ffc8c8;
    font-size: 13px;
}
.guard-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    color: var(--text-soft);
    font-weight: 700;
    margin-bottom: 10px;
}

/* Steam Guard kodu — 5 kutu + kopya butonu */
.guard-code-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: nowrap;
}
.guard-code-boxes {
    display: flex;
    gap: 8px;
}
.guard-code-boxes .char-box {
    border-style: dashed;
    border-color: rgba(var(--gold-rgb), 0.85);
    background: rgba(var(--gold-rgb), 0.08);
    color: var(--gold);
    width: 44px;
    height: 54px;
    font-size: 22px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-weight: 800;
    text-shadow: 0 0 8px rgba(var(--gold-rgb), 0.45);
    border-width: 2px;
}
.guard-code-copy {
    background: rgba(var(--gold-rgb), 0.08);
    border: 1px solid rgba(var(--gold-rgb), 0.35);
    color: var(--gold);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .12s;
}
.guard-code-copy:hover { background: rgba(var(--gold-rgb), 0.18); }
.guard-code-copy:active { transform: scale(0.95); }
.guard-code-copy svg { width: 16px; height: 16px; }

.guard-result .cred-copy { vertical-align: middle; }
.guard-hint {
    margin: 12px 0 0;
    color: var(--text-mute);
    font-size: 11.5px;
}

/* Hesap notu (müşteri tarafı) — Steam credentials altında */
.account-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: rgba(var(--gold-rgb), 0.07);
    border: 1px solid rgba(var(--gold-rgb), 0.35);
    border-left-width: 3px;
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
}
.account-note svg {
    width: 18px; height: 18px;
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 2px;
}
.account-note b {
    color: var(--gold);
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    letter-spacing: .4px;
    text-transform: uppercase;
}
.account-note p {
    margin: 0;
    color: var(--text-soft);
    white-space: pre-wrap;
    word-break: break-word;
}

/* Admin: hesap notu sekmeleri */
.note-block {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed rgba(255,255,255,0.06);
}
.note-tabs {
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    margin-bottom: 8px;
}
.note-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    color: var(--text-mute);
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    transition: background .15s, color .15s;
}
.note-tab:hover { color: var(--text); }
.note-tab.is-active {
    background: rgba(var(--gold-rgb), 0.18);
    color: var(--gold);
}
.note-tab .flag, .note-tab svg { width: 16px; height: 12px; border-radius: 2px; }
.note-pane label { display: block; font-size: 12px; color: var(--text-soft); margin-bottom: 4px; }
.note-pane textarea {
    width: 100%;
    background: var(--input);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.45;
    resize: vertical;
    min-height: 70px;
    box-sizing: border-box;
}
.note-pane textarea:focus { outline: none; border-color: rgba(var(--gold-rgb), 0.5); }

/* Admin: proxy + test row */
.proxy-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.proxy-row .proxy-input { flex: 1; }
.proxy-test-btn { font-size: 12px; font-weight: 700; cursor: pointer; }
.proxy-test-btn:disabled { opacity: .6; cursor: wait; }

.proxy-test-result {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    line-height: 1.5;
    border: 1px solid var(--line);
    background: var(--input);
}
.proxy-test-result.proxy-test-loading {
    color: var(--text-soft);
    border-color: rgba(var(--gold-rgb), 0.3);
}
.proxy-test-result.proxy-test-success {
    color: #d8f5dd;
    background: rgba(var(--green-rgb), 0.08);
    border-color: rgba(var(--green-rgb), 0.45);
}
.proxy-test-result.proxy-test-success b { color: var(--green); }
.proxy-test-result.proxy-test-error {
    color: #ffd8d8;
    background: rgba(255,90,90,0.06);
    border-color: rgba(255,90,90,0.45);
}
.proxy-test-result.proxy-test-error b { color: #ff8a8a; }
.proxy-test-result ul { margin: 0; padding-left: 18px; }
.proxy-test-result code {
    background: rgba(255,255,255,0.05);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11.5px;
}

/* IMAP yok — Guard atlanır, kullanıcı direkt giriş yapar */
.guard-skip-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 6px;
    padding: 12px 14px;
    background: rgba(var(--green-rgb), 0.07);
    border: 1px solid rgba(var(--green-rgb), 0.35);
    border-radius: 10px;
    color: var(--text-soft);
    font-size: 12.5px;
    line-height: 1.45;
}
.guard-skip-note svg {
    width: 18px; height: 18px;
    color: var(--green);
    flex-shrink: 0;
    margin-top: 1px;
}

/* Awaiting fazı — 5dk geri sayım */
.loader-countdown {
    color: var(--text-mute);
    font-size: 12px;
    margin-top: 6px;
    font-family: ui-monospace, monospace;
    letter-spacing: .5px;
}
.loader-countdown b {
    color: var(--gold);
    margin-left: 4px;
    font-family: ui-monospace, monospace;
}

/* language picker */
.lang-picker {
    position: fixed;
    top: 18px;
    right: 20px;
    z-index: 5;
    display: inline-flex;
    gap: 6px;
    padding: 4px;
    background: rgba(16,16,21,0.7);
    border: 1px solid var(--line);
    border-radius: 999px;
    backdrop-filter: blur(6px);
}

.lang-opt {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-mute);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .5px;
    opacity: .6;
    transition: opacity .15s, background .15s, color .15s;
}

.lang-opt:hover { opacity: 1; color: var(--text-soft); }

.lang-opt.is-active {
    background: var(--input-2);
    color: var(--gold);
    opacity: 1;
}

.lang-opt .flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    overflow: hidden;
    display: inline-flex;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

.lang-opt .flag svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   Admin panel
   ============================================================ */

body.page-admin {
    background:
        radial-gradient(1100px 700px at 80% -100px, rgba(255,184,0,0.06), transparent 60%),
        linear-gradient(180deg, #0b0d18 0%, #090b15 100%);
    min-height: 100vh;
    padding: 32px 24px;
}

.admin-shell {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.admin-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    flex-wrap: wrap;
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .14s ease, filter .14s ease;
}
a.admin-brand:hover { transform: translateY(-1px); filter: drop-shadow(0 4px 14px rgba(var(--gold-rgb,255,184,0),0.35)); }

.admin-brand img {
    width: 38px;
    height: 38px;
    filter: drop-shadow(0 0 12px rgba(255,184,0,0.5));
}

.admin-brand b {
    font-size: 18px;
    font-weight: 900;
    font-style: italic;
    letter-spacing: 1px;
}
.admin-brand b .brand-name-1 { color: var(--brand-1, #fff); }
.admin-brand b .brand-name-2 { color: var(--brand-2, var(--gold)); }

.admin-bar h1 {
    margin: 14px 0 4px;
    font-size: 24px;
    font-weight: 800;
}

/* Nav sağ-üstte, başlığın yanında; sığmazsa alta blok olarak sarar (boş sağ-üst kalmaz) */
.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-content: flex-start;
}
.admin-actions .is-current {
    color: #17130a;
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: 0 0 0 1px rgba(var(--gold-rgb),.25), 0 8px 22px rgba(var(--gold-rgb),.18);
}

.games-search-wrap {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 14px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 12px;
    background: var(--input);
}
.games-search-wrap svg { width: 18px; height: 18px; color: var(--text-mute); flex: 0 0 auto; }
.games-search-wrap input {
    min-width: 0; flex: 1; padding: 3px 0; border: 0; outline: 0;
    color: var(--text); background: transparent; font: inherit;
}
.games-search-wrap small { color: var(--text-mute); white-space: nowrap; }

.game-transfer-box {
    margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.game-transfer-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.game-transfer-progress { margin-top:12px; }
.game-transfer-progress .bulk-bar { height:9px; }
.game-transfer-errors {
    position: fixed; z-index: 1000; inset: 0; display: grid; place-items: center;
    padding: 20px; background: rgba(3,4,9,.78); backdrop-filter: blur(8px);
}
.game-transfer-errors[hidden] { display:none; }
.game-transfer-errors-box {
    width:min(620px,100%); max-height:min(680px,85vh); overflow:auto;
    padding:22px; border:1px solid rgba(255,91,111,.42); border-radius:16px;
    background:var(--card); box-shadow:0 30px 80px rgba(0,0,0,.5);
}
.game-transfer-errors-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.game-transfer-errors-head button { width:34px; height:34px; padding:0; }
.game-transfer-errors-list { margin:14px 0 0; padding-left:20px; color:var(--text-soft); }
.game-transfer-errors-list li + li { margin-top:7px; }

@media (max-width: 760px) {
    .admin-bar > div:first-child p { display:none; }
    .admin-actions { justify-content:flex-start; gap:6px; }
    .admin-actions .primary-btn, .admin-actions .outline-btn, .admin-actions .danger-btn { padding:7px 9px; font-size:11px; }
    .games-search-wrap small { display:none; }
}

.muted { color: var(--text-soft); margin: 0; font-size: 13.5px; }

.primary-btn, .outline-btn, .danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    font-family: inherit;
    transition: filter .15s, border-color .15s, background .15s;
}

.primary-btn {
    background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, var(--gold-3));
    color: #0b0d18;
    border-color: transparent;
    box-shadow: 0 6px 18px -10px rgba(var(--gold-rgb), 0.55);
}

.primary-btn:hover {
    filter: brightness(1.05);
}

.outline-btn {
    background: rgba(255,255,255,0.03);
    color: var(--text);
    border-color: var(--line);
}

.outline-btn:hover { border-color: var(--gold); color: var(--gold); }

.danger-btn {
    background: rgba(255,80,80,0.10);
    color: #ff8a8a;
    border-color: rgba(255,80,80,0.35);
}

.danger-btn:hover { background: rgba(255,80,80,0.18); }

.panel {
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 22px;
}

.panel h2 {
    margin: 0 0 14px;
    font-size: 17px;
    font-weight: 800;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.field label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: .8px;
}

.field input,
.field textarea,
.field select {
    background: var(--input);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13.5px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(255,184,0,0.12);
}

.field textarea { resize: vertical; min-height: 70px; }

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 14px;
    border: 1px solid;
    background: rgba(255,80,80,0.10);
    color: #ffb5b5;
    border-color: rgba(255,80,80,0.35);
}

.alert.success {
    background: rgba(52,211,153,0.10);
    color: #b6f5d8;
    border-color: rgba(52,211,153,0.35);
}

/* element editor grid */
.elements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 18px;
}

.element-card {
    background: var(--card-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.element-card header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.element-card header b {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
}

.element-card header em {
    font-style: normal;
    font-size: 10.5px;
    color: var(--text-mute);
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
}

.thumb-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.thumb {
    width: 64px;
    height: 64px;
    border-radius: 10px;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--line);
    object-fit: contain;
    padding: 6px;
    flex-shrink: 0;
}

.transform-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.transform-grid .field { margin-bottom: 0; }
.transform-grid .field label { font-size: 10.5px; letter-spacing: .4px; text-align: center; }
.transform-grid .field input {
    padding: 7px 8px;
    font-size: 12.5px;
    text-align: center;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 26px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
}

.section-head h2 {
    margin: 0;
    color: var(--gold);
    font-size: 14px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.sticky-save {
    position: sticky;
    bottom: 14px;
    background: rgba(11,13,24,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    gap: 10px;
    margin-top: 20px;
    z-index: 5;
}

.auth-card {
    max-width: 420px;
    margin: 80px auto;
    background: linear-gradient(180deg, var(--card), var(--card-2));
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    padding: 28px;
    box-shadow: var(--shadow-card);
}

.auth-card h1 {
    margin: 14px 0 6px;
    font-size: 22px;
}

.auth-card .form-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.admins-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
}

.admins-table th,
.admins-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
    vertical-align: middle;
}

.admins-table th {
    color: var(--text-soft);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .6px;
}

.admins-table input {
    background: var(--input);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: 8px;
    padding: 7px 9px;
    font-size: 12.5px;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}

.row-actions {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.row-actions button {
    padding: 6px 10px;
    font-size: 12px;
}

@media (max-width: 540px) {
    .order-wrap { max-width: 100%; }
    .brand-name { font-size: 22px; }
    .brand-logo { width: 46px; height: 46px; }
    .card { padding: 4px 16px 18px; }
    .tabs { margin: 0 -16px 18px; }
    .transform-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Oyun Listesi nav butonu ===== */
.catalog-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--input, #0f1115);
    border: 1px solid var(--line, #282b35);
    color: var(--text-soft, #aab2ce);
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
    white-space: nowrap;
}
.catalog-link svg { width: 15px; height: 15px; }
.catalog-link:hover,
.catalog-link.is-active {
    border-color: var(--gold, #e9b208);
    color: var(--gold, #e9b208);
    box-shadow: 0 4px 14px -8px rgba(var(--gold-rgb, 233,178,8), 0.6);
}
@media (max-width: 560px) {
    .catalog-link span { display: none; }
    .catalog-link { padding: 6px 9px; }
}

/* ===== Oyun arama çubuğu (katalog + seçim ekranı) ===== */
.game-search {
    position: relative;
    display: flex;
    align-items: center;
    margin: 4px 0 10px;
}
.game-search svg {
    position: absolute;
    left: 12px;
    width: 17px; height: 17px;
    color: var(--text-mute, #7d869f);
    pointer-events: none;
}
.game-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: var(--input, #0f1115);
    border: 1px solid var(--line, #282b35);
    border-radius: 12px;
    color: var(--text, #ecf0ff);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease;
}
.game-search input:focus { border-color: var(--gold, #e9b208); }
.game-search input::placeholder { color: var(--text-mute, #7d869f); }

/* ===== Katalog kutuları (tıklanamaz vitrin) ===== */
.catalog-tile { cursor: default; }
.catalog-tile:active { transform: none; }
.catalog-tile:hover { border-color: rgba(var(--gold-rgb, 233,178,8), 0.5); }

/* ===== Geniş oyun listesi (yalnız catalog sayfası) ===== */
.catalog-page .order-wrap { max-width: 1360px; }
/* Sayfa TAM ekran otursun; SADECE oyun grid'i içeride kaysın (sayfa kaymaz) */
@media (min-height: 600px) {
    body.page-order.catalog-page { height: 100vh; overflow: hidden; align-items: stretch; padding-top: 22px; padding-bottom: 22px; }
    .catalog-page .order-wrap { justify-content: flex-start; gap: 14px; min-height: 0; }
    .catalog-page .card { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; width: 100%; }
    .catalog-page .game-scroll-wrap { flex: 1 1 auto; min-height: 0; margin-top: 4px; }
    .catalog-page .game-scroll { max-height: none; height: 100%; }
}
/* Kısa ekran / mobil: doğal yükseklik + sayfa kayması (grid yine kendi içinde 74vh) */
@media (max-height: 599px) {
    .catalog-page .game-scroll { max-height: min(74vh, 1000px); }
}
/* Geniş ekranda her satırda daha çok oyun — daha büyük, sade kartlar */
.catalog-page .game-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.catalog-page .catalog-tile { min-height: 142px; display: flex; align-items: flex-end; padding: 14px; border-radius: 14px; }
.catalog-page .game-scroll-rail { width: 7px; }
@media (max-width: 720px) {
    .catalog-page .order-wrap { max-width: 100%; }
    .catalog-page .game-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
    .catalog-page .catalog-tile { min-height: 112px; }
}

/* ===== Toplu import progress bar ===== */
.bulk-bar { width: 100%; height: 12px; background: var(--input, #0f1115); border: 1px solid var(--line, #282b35); border-radius: 999px; overflow: hidden; }
.bulk-bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--gold, #e9b208), var(--gold-2, #ffd24a)); transition: width .25s ease; box-shadow: 0 0 10px rgba(var(--gold-rgb,233,178,8),.5); }

/* ===== Games toplu işlem araç çubuğu + modal + popup ===== */
.bulk-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; padding: 10px 12px; background: var(--card, #1a1d23); border: 1px solid var(--line, #282b35); border-radius: 10px; }
.bulk-tools-count { font-size: 12.5px; color: var(--gold, #e9b208); font-weight: 700; min-width: 70px; }
.bulk-sep { width: 1px; height: 20px; background: var(--line, #282b35); }

.bulk-modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 20px; }
.bulk-modal[hidden] { display: none; }
.bulk-modal-box { background: var(--card, #1a1d23); border: 1px solid var(--line, #282b35); border-radius: 14px; padding: 20px 22px; max-width: 460px; width: 100%; box-shadow: 0 20px 60px -20px rgba(0,0,0,.7); max-height: 90vh; overflow-y: auto; }
.bulk-modal-box h3 { margin: 0 0 6px; font-size: 16px; }
.bulk-modal-box .field { margin-bottom: 10px; }
.bulk-modal-box .field label { display: block; font-size: 12px; color: var(--text-soft, #aab2ce); margin-bottom: 4px; }
.bulk-modal-box input, .bulk-modal-box select { width: 100%; padding: 8px 10px; border-radius: 8px; background: var(--input, #0f1115); border: 1px solid var(--line, #282b35); color: var(--text, #ecf0ff); font-size: 13px; }

.bulk-pop { position: fixed; top: 16px; right: 16px; z-index: 10000; width: 300px; background: var(--card, #1a1d23); border: 1px solid var(--line, #282b35); border-radius: 12px; padding: 14px 16px; box-shadow: 0 16px 44px -14px rgba(0,0,0,.75); }
.bulk-pop[hidden] { display: none; }
.bulk-pop-title { font-weight: 700; font-size: 13.5px; color: var(--text, #ecf0ff); }
.bulk-pop-status { margin-top: 2px; }

/* ===== Oyun kartı rozetleri (Premium + ALL DLC) — küçük, şık, yatay ===== */
.game-badges { position: absolute; top: 7px; left: 7px; z-index: 4; display: flex; flex-direction: row; gap: 4px; align-items: center; pointer-events: none; }
.gbadge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3.5px 9px; border-radius: 8px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .4px; text-transform: uppercase;
    line-height: 1; white-space: nowrap; text-shadow: none;
}
.gbadge-ic { font-size: 11px; line-height: 1; }
/* Lisans seçim ekranı (index.php picker) kartları küçük → rozetler de küçük */
body.page-order:not(.catalog-page) .game-badges { top: 6px; left: 6px; gap: 3px; }
body.page-order:not(.catalog-page) .gbadge { font-size: 8px; padding: 2px 6px; border-radius: 6px; gap: 3px; }
body.page-order:not(.catalog-page) .gbadge-ic { font-size: 8.5px; }
/* Premium: parlak altın rozet */
.gbadge-premium {
    background: linear-gradient(135deg, #ffe58f 0%, #f4b400 55%, #e08e00 100%);
    color: #3a2600; border: 1px solid rgba(255,246,205,.85);
    box-shadow: 0 1px 3px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.75);
}
.gbadge-premium .gbadge-ic { color: #8a5200; }
/* ALL DLC: koyu cam (glass) rozet — premium'dan farklı stil */
.gbadge-dlc {
    background: rgba(9,13,24,.72);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    color: #eaf2ff; border: 1px solid rgba(120,180,255,.5);
    box-shadow: 0 1px 3px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
}

/* ===== Admin: Steam'den Çek paneli ===== */
.panel-inset {
    background: var(--input, #0f1115);
    border: 1px solid var(--line, #282b35);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 4px 0 14px;
}
.steam-fetch-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.steam-fetch-head b { color: var(--gold, #e9b208); font-size: 13.5px; }
.steam-search-row { display: flex; gap: 8px; }
.steam-search-row input {
    flex: 1;
    padding: 9px 12px;
    background: var(--card, #1a1d23);
    border: 1px solid var(--line, #282b35);
    border-radius: 10px;
    color: var(--text, #ecf0ff);
    font-family: inherit; font-size: 13.5px; outline: none;
}
.steam-search-row input:focus { border-color: var(--gold, #e9b208); }
.steam-results {
    margin-top: 8px;
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid var(--line, #282b35);
    border-radius: 10px;
}
.steam-result-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--line, #282b35);
    color: var(--text, #ecf0ff);
    font-family: inherit; font-size: 13px; text-align: left;
    cursor: pointer;
    transition: background .12s ease;
}
.steam-result-row:last-child { border-bottom: none; }
.steam-result-row:hover { background: rgba(var(--gold-rgb, 233,178,8), 0.08); }
.steam-result-row img { width: 46px; height: 22px; object-fit: cover; border-radius: 3px; flex-shrink: 0; background: #000; }
.steam-result-row span { flex: 1; }
.steam-result-row small { color: var(--text-mute, #7d869f); }
.steam-picked {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 8px 10px;
    background: var(--card, #1a1d23);
    border: 1px solid rgba(var(--gold-rgb, 233,178,8), 0.35);
    border-radius: 10px;
}
.steam-picked img { width: 92px; height: 43px; object-fit: cover; border-radius: 5px; background: #000; flex-shrink: 0; }
.steam-picked-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.steam-picked-info b { font-size: 13.5px; }

/* Kapak üstünde isim gizli (arama yine textContent'i okur) */
.game-tile-name.name-hidden { display: none; }

/* ==========================================================================
   2026 Storefront — dikey poster kartları, grid/liste görünümü ve canlı satış
   ========================================================================== */
.storefront-shell { min-width: 0; }
.storefront-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    margin: 10px 0 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: color-mix(in srgb, var(--card-2) 88%, transparent);
}
.storefront-toolbar .game-search { flex: 1; margin: 0; }
.storefront-toolbar .game-search input { min-height: 46px; border-radius: 12px; }
.storefront-view-switch {
    display: inline-flex;
    gap: 5px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--input);
    flex-shrink: 0;
}
.storefront-view-btn {
    width: 38px; height: 38px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 9px;
    color: var(--text-mute); background: transparent; cursor: pointer;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}
.storefront-view-btn:hover { color: var(--text); transform: translateY(-1px); }
.storefront-view-btn.is-active { color: #19150a; background: linear-gradient(135deg, var(--gold-2), var(--gold)); }
.storefront-view-btn svg { width: 18px; height: 18px; }
.storefront-count { margin: 0 0 12px; color: var(--text-soft); font-size: 13px; }
.storefront-count b { color: var(--text); }

.game-grid.storefront-grid {
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 18px;
    padding: 2px;
}
.storefront-card-wrap { min-width: 0; }
.game-tile.storefront-card {
    min-height: 0; height: 100%; padding: 0;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;
    gap: 0; text-align: left;
    border-radius: 15px; overflow: hidden;
    color: var(--text); text-shadow: none;
    background: var(--card-2); border: 1px solid var(--line);
    /* Katmanı hover'dan önce de hazır tut: animasyon bitince tarayıcının kartı
       başka bir raster kalitesinde yeniden çizmesini engeller. */
    transform: translate3d(0, 0, 0);
    transform-origin: center center;
    backface-visibility: hidden;
    will-change: transform;
    transition: transform .34s cubic-bezier(.2,.75,.25,1), border-color .25s ease, box-shadow .34s ease;
}
.game-tile.storefront-card:hover {
    transform: translate3d(0, -5px, 0);
    border-color: var(--gold);
    background: var(--card-2);
    box-shadow: 0 18px 38px -24px rgba(var(--gold-rgb), .72);
}
.game-tile.storefront-card:active { transform: translate3d(0, -2px, 0); }
.storefront-poster {
    display: block; position: relative; width: 100%;
    aspect-ratio: 2 / 3; overflow: hidden;
    background: linear-gradient(145deg, rgba(var(--gold-rgb), .075), transparent 42%), var(--input);
}
.storefront-poster.has-image::before {
    content: ''; position: absolute; z-index: 0; inset: 0;
    background:
        linear-gradient(105deg, transparent 34%, rgba(255,255,255,.075) 46%, transparent 58%),
        linear-gradient(145deg, rgba(var(--gold-rgb),.07), transparent 48%),
        var(--input);
    background-size: 240% 100%, 100% 100%, 100% 100%;
    animation: storefront-cover-loading 1.35s ease-in-out infinite;
    opacity: 1; transition: opacity .22s ease;
}
.storefront-poster.has-image.is-cover-loaded::before {
    opacity: 0; animation: none; pointer-events: none;
}
.storefront-poster-art {
    position: absolute; z-index: 1; inset: 0; display: block;
    width: 100%; height: 100%;
    object-fit: cover;
    background-repeat: no-repeat;
    background-position: 50% 50%;
    background-size: cover;
    /* Başlangıç tam 1.0 ölçek; kesirli dinlenme ölçeği yok. Katman sürekli
       hazır kaldığı için hover sonrası birkaç saniye içinde kalite değişmez. */
    transform: translate3d(0, 0, 0) scale(var(--cover-scale, 1));
    transform-origin: center center;
    backface-visibility: hidden;
    will-change: transform;
    image-rendering: auto;
    opacity: 0;
    transition: transform .7s cubic-bezier(.2,.72,.18,1), opacity .24s ease;
}
.storefront-poster.is-cover-loaded .storefront-poster-art { opacity: 1; }
@keyframes storefront-cover-loading {
    0% { background-position: 115% 0, 0 0, 0 0; }
    100% { background-position: -115% 0, 0 0, 0 0; }
}
.storefront-poster:not(.has-image)::after {
    content: 'DEFNE'; position: absolute; inset: 0;
    display: grid; place-items: center;
    color: rgba(var(--gold-rgb), .45); font-weight: 900; letter-spacing: .22em;
    background: radial-gradient(circle at 50% 35%, rgba(var(--gold-rgb),.15), transparent 55%), linear-gradient(145deg, var(--input-2), var(--input));
}
.storefront-card:hover .storefront-poster-art { transform: translate3d(0, 0, 0) scale(var(--cover-hover-scale, 1.055)); }
.storefront-card-info {
    min-height: 96px; padding: 14px 14px 12px;
    display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
    background: var(--card-2);
    position: relative; z-index: 3;
}
.storefront-card-info .game-tile-name {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
    font-size: 13.5px; font-weight: 800; line-height: 1.45; color: var(--text);
}
.storefront-card-meta { display: flex; align-items: center; justify-content: space-between; color: var(--text-mute); font-size: 11px; }
.storefront-platform { display: inline-flex; align-items: center; gap: 5px; }
.storefront-platform svg { width: 13px; height: 13px; }
.storefront-arrow { color: var(--text-soft); font-size: 16px; transition: color .2s, transform .2s; }
.storefront-card:hover .storefront-arrow { color: var(--gold); transform: translate(2px,-2px); }
.storefront-card .game-badges { top: 10px; left: 10px; }
.storefront-card .gbadge { font-size: 9px; padding: 4px 7px; }
.storefront-card .game-tile-lock { top: 10px; right: 10px; width: 28px; height: 28px; }
.game-tile.storefront-card.is-locked { filter: none; }
.game-tile.storefront-card.is-locked .storefront-poster-art { filter: grayscale(.72) brightness(.48); }
.game-tile.storefront-card.is-locked:hover { border-color: rgba(255,120,120,.7); }

/* Görsel #5'teki kompakt yatay görünüm */
.storefront-grid.is-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.storefront-grid.is-list .storefront-card { flex-direction: row; min-height: 122px; }
.storefront-grid.is-list .storefront-poster { width: 92px; min-width: 92px; aspect-ratio: 2 / 3; }
.storefront-grid.is-list .storefront-card-info { min-height: 122px; flex: 1; padding: 16px; justify-content: center; }
.storefront-grid.is-list .storefront-card-meta { margin-top: 8px; }
.storefront-grid.is-list .storefront-card .game-badges {
    top: 7px; left: auto; right: 7px; gap: 3px;
    max-width: calc(100% - 106px); justify-content: flex-end;
}
.storefront-grid.is-list .storefront-card .gbadge {
    gap: 2px; padding: 2px 4px; border-radius: 5px;
    font-size: 7px; letter-spacing: .15px;
}
.storefront-grid.is-list .storefront-card .gbadge-ic { font-size: 7px; }

/* Lisans sonrası oyun seçimi genişler; normal sipariş ekranı aynı kalır. */
.game-picker-page .order-wrap { max-width: 1280px; }
.game-picker-page .card { width: 100%; }
.game-picker-page .game-scroll { max-height: min(66vh, 760px); }
.game-picker-page .storefront-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

/* Katalog sayfası */
.catalog-page .catalog-card { padding-top: 22px; }
.catalog-page .game-grid.storefront-grid { grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 20px; }
.catalog-page .catalog-tile { min-height: 0; padding: 0; align-items: stretch; cursor: pointer; border-radius: 15px; }
.catalog-page .catalog-tile:active { transform: translate3d(0, -2px, 0); }
.catalog-page .catalog-foot { margin-top: 16px; }

/* Oyun listesinden kod kullanma modalı */
html.catalog-modal-open,
body.catalog-modal-open {
    overflow: hidden;
    overscroll-behavior: none;
}
body.catalog-modal-open {
    /* Body'deki global perspective, fixed modali viewport yerine tum sayfanin
       (on binlerce piksel) ortasina yerlestiren bir containing block olusturur. */
    perspective: none;
}
.redeem-modal {
    position: fixed; inset: 0; z-index: 10020;
    display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(3,5,8,.78);
    -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
    opacity: 0; transition: opacity .18s ease;
}
.redeem-modal[hidden] { display: none; }
.redeem-modal.is-open { opacity: 1; }
.redeem-modal-box {
    position: relative; z-index: 1; display: block; opacity: 1; visibility: visible;
    width: min(100%, 500px); max-height: 92vh; overflow-y: auto;
    padding: 24px; border: 1px solid var(--line); border-radius: 18px;
    background: linear-gradient(155deg, var(--card), var(--card-2));
    box-shadow: 0 28px 90px -28px rgba(0,0,0,.9), 0 0 0 1px rgba(var(--gold-rgb),.08) inset;
    transform: translateY(14px) scale(.985); transition: transform .2s ease;
}
.redeem-modal.is-open .redeem-modal-box { transform: none; }
.redeem-modal-close {
    position: absolute; top: 11px; right: 12px; z-index: 2;
    width: 34px; height: 34px; border: 0; border-radius: 9px;
    background: rgba(255,255,255,.04); color: var(--text-mute);
    font-size: 24px; line-height: 1; cursor: pointer;
}
.redeem-modal-close:hover { color: var(--gold); background: rgba(var(--gold-rgb),.1); }
.redeem-game-head { display: flex; align-items: center; gap: 15px; padding-right: 34px; margin-bottom: 14px; }
.redeem-game-cover {
    width: 68px; aspect-ratio: 2 / 3; flex-shrink: 0;
    border: 1px solid var(--line); border-radius: 9px;
    background: var(--input) center / cover no-repeat;
}
.redeem-game-cover.is-empty { background: linear-gradient(145deg, rgba(var(--gold-rgb),.18), var(--input)); }
.redeem-game-head span { color: var(--text-mute); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.redeem-game-head h3 { margin: 4px 0 0; color: var(--gold); font-size: 18px; line-height: 1.3; }
.catalog-redeem-form { margin-top: 18px; }
.catalog-redeem-form input[name="license_key"] { text-transform: uppercase; letter-spacing: 1.5px; }

/* Sağ alt anonim satın alma bildirimi */
#purchaseFeedHost {
    position: fixed; right: 22px; bottom: 22px; z-index: 10010;
    width: min(370px, calc(100vw - 28px)); pointer-events: none;
}
.purchase-toast {
    position: relative; display: grid; grid-template-columns: 62px 1fr 26px; align-items: center; gap: 12px;
    padding: 12px; border: 1px solid var(--line); border-radius: 15px;
    background: linear-gradient(145deg, rgba(20,22,29,.97), rgba(13,15,20,.98));
    box-shadow: 0 22px 55px -20px rgba(0,0,0,.9), 0 0 0 1px rgba(var(--gold-rgb),.07) inset;
    transform: translateY(24px) translateX(24px) scale(.96); opacity: 0;
    transition: transform .28s cubic-bezier(.2,.8,.25,1), opacity .24s ease;
    pointer-events: auto;
}
.purchase-toast.is-visible { transform: none; opacity: 1; }
.purchase-toast-cover {
    width: 62px; aspect-ratio: 1 / 1; border-radius: 10px; overflow: hidden;
    display: grid; place-items: center;
    background: linear-gradient(145deg, rgba(var(--gold-rgb),.3), var(--input)) center / cover no-repeat;
    color: var(--gold); font-size: 12px; font-weight: 900;
}
.purchase-toast-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.purchase-toast-copy span { color: var(--text-soft); font-size: 12px; }
.purchase-toast-copy strong { color: var(--gold); font-size: 13.5px; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.purchase-toast-copy small { color: var(--text-mute); font-size: 10.5px; }
.purchase-toast-close {
    align-self: start; width: 26px; height: 26px; padding: 0;
    border: 0; border-radius: 7px; background: transparent;
    color: var(--text-mute); font-size: 19px; cursor: pointer;
}
.purchase-toast-close:hover { color: var(--text); background: rgba(255,255,255,.05); }

/* Admin: yeni dikey önizleme ve AI butonları */
.cover-editor { grid-template-columns: minmax(180px, 230px) 1fr; }
.cover-editor-left { flex-direction: column; align-items: stretch; gap: 10px; min-width: 0; }
.cover-stage { aspect-ratio: 2 / 3; }
.ai-cover-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; margin-top: 5px; padding-top: 10px; border-top: 1px solid var(--line); }
.ai-cover-actions .primary-btn { padding: 8px 12px; font-size: 12px; }
.ai-cover-gallery-wrap { display: flex; flex-direction: column; gap: 7px; }
.ai-cover-gallery-label { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: var(--text-soft); }
.ai-cover-gallery-label span { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .45px; }
.ai-cover-gallery-label small { color: var(--text-mute); font-size: 9px; text-align: right; }
.ai-cover-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; transition: opacity .15s ease; }
.ai-cover-gallery.is-busy { opacity: .55; pointer-events: none; }
.ai-cover-thumb { position: relative; min-width: 0; aspect-ratio: 1; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: var(--card-2); }
.ai-cover-thumb.is-active { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(var(--gold-rgb),.35); }
.ai-cover-pick { width: 100%; height: 100%; padding: 0; border: 0; display: block; background: transparent; cursor: pointer; }
.ai-cover-pick img { width: 100%; height: 100%; display: block; object-fit: cover; }
.ai-cover-pick span { position: absolute; left: 3px; bottom: 3px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border-radius: 5px; background: rgba(8,10,15,.86); color: #fff; font-size: 9px; font-weight: 900; }
.ai-cover-remove { position: absolute; top: 3px; right: 3px; width: 19px; height: 19px; padding: 0; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; display: grid; place-items: center; background: rgba(185,32,48,.94); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; opacity: 0; transform: translateY(-3px); pointer-events: none; transition: opacity .15s ease, transform .15s ease, background .15s ease; }
.ai-cover-thumb:hover .ai-cover-remove,
.ai-cover-thumb:focus-within .ai-cover-remove { opacity: 1; transform: none; pointer-events: auto; }
.ai-cover-remove:hover { background: #ef334d; }
.ai-cover-gallery-empty { padding: 7px 0 2px; text-align: center; }

@media (max-width: 820px) {
    .storefront-grid.is-list { grid-template-columns: 1fr; }
    .catalog-page .game-grid.storefront-grid,
    .game-picker-page .storefront-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 13px; }
    .storefront-card-info { min-height: 88px; padding: 12px; }
}
@media (max-width: 620px) {
    .storefront-toolbar { padding: 10px; gap: 8px; }
    .storefront-toolbar .game-search input { min-height: 42px; }
    .storefront-view-btn { width: 34px; height: 34px; }
    .catalog-page .game-grid.storefront-grid,
    .game-picker-page .storefront-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .storefront-card-info .game-tile-name { font-size: 12px; }
    .storefront-card-info { min-height: 82px; padding: 10px; gap: 8px; }
    .storefront-grid.is-list { grid-template-columns: 1fr; }
    .storefront-grid.is-list .storefront-poster { width: 74px; min-width: 74px; }
    .storefront-grid.is-list .storefront-card,
    .storefront-grid.is-list .storefront-card-info { min-height: 111px; }
    #purchaseFeedHost { right: 14px; bottom: 14px; }
    .redeem-modal { padding: 12px; }
    .redeem-modal-box { padding: 20px 16px 18px; }
    .cover-editor { grid-template-columns: 1fr; }
    .cover-editor-left { max-width: 230px; width: 100%; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
    .storefront-card, .storefront-poster-art, .purchase-toast, .redeem-modal, .redeem-modal-box { transition-duration: .01ms !important; }
}

/* ===== Admin: Rotation durum paneli ===== */
.rotation-state {
    background: var(--input, #0f1115);
    border: 1px solid var(--line, #282b35);
    border-radius: 12px;
    padding: 12px 14px;
    margin: 4px 0 14px;
}
.rotation-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.rotation-head b { color: var(--gold, #e9b208); font-size: 13.5px; }
.rotation-list { display: flex; flex-direction: column; gap: 6px; }
.rotation-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background: var(--card, #1a1d23);
    border: 1px solid var(--line, #282b35);
    border-radius: 9px;
}
.rotation-item.is-active {
    border-color: var(--gold, #e9b208);
    box-shadow: 0 0 0 1px rgba(var(--gold-rgb, 233,178,8), 0.3) inset;
}
.rotation-reorder { display: inline-flex; flex-direction: column; gap: 1px; flex-shrink: 0; }
.rot-move {
    display: inline-flex; align-items: center; justify-content: center;
    width: 20px; height: 15px; padding: 0;
    background: transparent; border: 1px solid var(--line, #282b35);
    border-radius: 4px; color: var(--text-soft, #aab2ce); cursor: pointer;
    transition: all .12s ease;
}
.rot-move svg { width: 12px; height: 12px; }
.rot-move:hover { border-color: var(--gold, #e9b208); color: var(--gold, #e9b208); }
.rotation-slot { font-family: ui-monospace, monospace; color: var(--gold, #e9b208); font-weight: 700; }
.rotation-user { flex: 1; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rotation-count { font-family: ui-monospace, monospace; font-size: 12.5px; color: var(--text-soft, #aab2ce); }
.rotation-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .5px;
    color: #0f1116;
    background: var(--gold, #e9b208);
    padding: 2px 7px;
    border-radius: 999px;
}
.rotation-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px; height: 24px;
    border-radius: 999px;
    background: transparent;
    border: 1px solid var(--line, #282b35);
    color: var(--text-soft, #aab2ce);
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s ease;
}
.rotation-info-btn:hover { border-color: var(--gold, #e9b208); color: var(--gold, #e9b208); }

/* ===== Paste (rentry tarzı) ===== */
.paste-wrap { max-width: 860px; }

/* Kompakt şifre ekranı — tema renklerini kullanır */
.paste-lock-wrap { max-width: 380px; }
.paste-lock-card { padding: 22px 20px 20px !important; }
.paste-lock { text-align: center; }
.paste-lock-ic {
    width: 44px; height: 44px;
    margin: 0 auto 12px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: rgba(var(--gold-rgb, 233,178,8), 0.12);
    border: 1px solid rgba(var(--gold-rgb, 233,178,8), 0.35);
    color: var(--gold, #e9b208);
}
.paste-lock-ic svg { width: 20px; height: 20px; }
.paste-lock h3 { margin: 0 0 4px; font-size: 16px; color: var(--text, #ecf0ff); }
.paste-lock p  { margin: 0 0 14px; font-size: 12.5px; color: var(--text-mute, #7d869f); }
.paste-lock-row { display: flex; gap: 8px; }
.paste-lock-row input {
    flex: 1;
    min-width: 0;
    padding: 10px 12px;
    background: var(--input, #0f1115);
    border: 1px solid var(--line, #282b35);
    border-radius: 10px;
    color: var(--text, #ecf0ff);
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .15s ease;
}
.paste-lock-row input:focus { border-color: var(--gold, #e9b208); }
.paste-lock-row input::placeholder { color: var(--text-mute, #7d869f); }
.paste-lock-row button {
    padding: 10px 18px;
    background: linear-gradient(180deg, var(--gold, #e9b208), var(--gold-2, #e1a807));
    border: none;
    border-radius: 10px;
    color: #14161c;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: filter .15s ease;
}
.paste-lock-row button:hover { filter: brightness(1.08); }
.paste-lock-err {
    margin: 0 0 12px;
    padding: 8px 10px;
    border-radius: 9px;
    background: rgba(255, 90, 90, 0.10);
    border: 1px solid rgba(255, 90, 90, 0.35);
    color: #ff8a8a;
    font-size: 12.5px;
}
.paste-body {
    color: var(--text, #ecf0ff);
    font-size: 15px;
    line-height: 1.75;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    padding: 6px 0 10px;
}
.paste-body a { color: var(--gold, #e9b208); }
.paste-body .paste-h { margin: 18px 0 8px; line-height: 1.3; }
.paste-body h1.paste-h { font-size: 26px; }
.paste-body h2.paste-h { font-size: 21px; }
.paste-body h3.paste-h { font-size: 17px; }
.paste-body .paste-bg { padding: 1px 6px; border-radius: 4px; }
.paste-code {
    display: block;
    background: var(--input, #0f1115);
    border: 1px solid var(--line, #282b35);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 10px 0;
    font-family: ui-monospace, monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-x: auto;
}
.paste-preview {
    margin-top: 12px;
    padding: 14px;
    background: var(--input, #0f1115);
    border: 1px dashed var(--line, #282b35);
    border-radius: 10px;
}

/* Games tablosu ✓/✗ rozeti */
.yn-badge { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; }
.yn-badge svg { width: 13px; height: 13px; }
.yn-yes { background: rgba(52,211,153,.14); color: var(--green, #34d399); }
.yn-no  { background: rgba(255,90,90,.13); color: #ff6b6b; }

.turnstile-row { display: flex; justify-content: center; margin: 4px 0 2px; }
.cf-turnstile { min-height: 65px; }

/* ===== Public paste — rentry tarzı görünüm ===== */
.paste-wrap { max-width: 820px; }
.paste-wrap .card {
    padding: 34px 38px 24px;
    border-radius: 16px;
    box-shadow: 0 24px 70px -30px rgba(0,0,0,.6);
}
.paste-title-row { margin: 0 0 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line, #282b35); }
.paste-title {
    margin: 0; font-size: 25px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em;
    color: var(--text, #ecf0ff); word-wrap: break-word; overflow-wrap: anywhere;
}
.paste-body {
    font-size: 14.5px;
    line-height: 1.8;
}
.paste-foot {
    display: flex; align-items: center; gap: 12px;
    margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line, #282b35);
    flex-wrap: wrap;
}
.paste-foot-side { flex: 1 1 0; display: flex; align-items: center; min-width: 92px; }
.paste-foot-right { justify-content: flex-end; }
.paste-meta {
    flex: 0 1 auto; text-align: center; font-size: 12px;
    color: var(--text-mute, #7d869f); white-space: nowrap;
}
.paste-act-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 14px; border-radius: 9px;
    background: var(--card-2, #20242c); border: 1px solid var(--line, #282b35);
    color: var(--text-soft, #aab2ce); font-size: 13px; font-weight: 600;
    cursor: pointer; text-decoration: none; transition: all .14s ease;
}
.paste-act-btn svg { width: 16px; height: 16px; }
.paste-act-btn:hover { border-color: var(--gold, #e9b208); color: var(--gold, #e9b208); }
.paste-act-btn.primary {
    background: var(--gold, #e9b208); border-color: var(--gold, #e9b208); color: #1a1400;
}
.paste-act-btn.primary:hover { filter: brightness(1.08); color: #1a1400; }
.paste-report-btn:hover { border-color: #ff8a8a; color: #ff8a8a; }
.paste-export { position: relative; display: inline-block; }
.paste-export-menu {
    position: absolute; bottom: calc(100% + 8px); left: 0;
    display: flex; flex-direction: column; min-width: 138px;
    background: var(--card, #1a1d23); border: 1px solid var(--line, #282b35);
    border-radius: 11px; padding: 6px; z-index: 40;
    box-shadow: 0 16px 44px -14px rgba(0,0,0,.75);
    animation: pasteMenuIn .13s ease;
}
.paste-export-menu[hidden] { display: none; }
@keyframes pasteMenuIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.paste-export-menu a, .paste-export-menu button {
    display: block; width: 100%; text-align: left;
    padding: 8px 11px; border: none; background: transparent;
    color: var(--text-soft, #aab2ce); font-size: 13px; font-weight: 500;
    border-radius: 7px; cursor: pointer; text-decoration: none; font-family: inherit;
}
.paste-export-menu a:hover, .paste-export-menu button:hover { background: var(--card-2, #20242c); color: var(--gold, #e9b208); }

/* ===== Report (public form) ===== */
.report-card { padding: 28px 30px 22px; }
.report-head { text-align: center; margin-bottom: 20px; }
.report-head-ic, .report-done-ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; border-radius: 50%; margin-bottom: 10px;
    background: rgba(255,138,138,.12); color: #ff8a8a;
}
.report-done-ic { background: rgba(120,220,150,.12); color: var(--green, #6ddf9c); }
.report-head-ic svg, .report-done-ic svg { width: 22px; height: 22px; }
.report-head h1, .report-done h1 { margin: 0 0 6px; font-size: 20px; color: var(--text, #ecf0ff); }
.report-done { text-align: center; padding: 10px 0; }
.report-form .field { margin-bottom: 14px; }
.report-form label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-soft, #aab2ce); }
.report-form input, .report-form select, .report-form textarea {
    width: 100%; padding: 10px 12px; border-radius: 9px;
    background: var(--input, #0f1115); border: 1px solid var(--line, #282b35);
    color: var(--text, #ecf0ff); font-size: 14px; font-family: inherit;
}
.report-form textarea { resize: vertical; line-height: 1.6; }
.report-form input:focus, .report-form select:focus, .report-form textarea:focus { border-color: var(--gold, #e9b208); outline: none; }
.report-actions { display: flex; gap: 10px; margin-top: 6px; }

/* ===== Report (admin liste) ===== */
.report-badge {
    position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px;
    padding: 0 5px; border-radius: 9px; background: #ff5a5a; color: #fff;
    font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}
.report-item {
    padding: 14px 16px; border-radius: 11px;
    background: var(--card, #1a1d23); border: 1px solid var(--line, #282b35);
}
.report-item.is-open { border-color: rgba(255,90,90,.5); }
.report-item-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-item-msg {
    margin: 10px 0 8px; padding: 10px 12px; border-radius: 8px;
    background: var(--input, #0f1115); color: var(--text, #ecf0ff);
    font-size: 13.5px; line-height: 1.6; white-space: pre-wrap; word-break: break-word;
}
.report-item-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.report-item-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.report-item-img { display: inline-block; margin: 4px 0 10px; }
.report-item-img img {
    max-width: 220px; max-height: 160px; border-radius: 9px;
    border: 1px solid var(--line, #282b35); object-fit: cover; display: block;
}

/* ===== Görsel görüntüleyici (public, imgur tarzı) ===== */
.img-wrap { max-width: 860px; }
.img-card { padding: 26px 30px 20px; border-radius: 16px; box-shadow: 0 24px 70px -30px rgba(0,0,0,.6); }
.img-stage {
    display: flex; justify-content: center; align-items: center;
    width: fit-content; max-width: 100%;
    margin: 8px auto; padding: 10px; border-radius: 12px;
    background: var(--input, #0f1115); border: 1px solid var(--line, #282b35);
}
.img-stage a { display: block; line-height: 0; max-width: 100%; }
.img-stage img { max-width: 100%; max-height: 70vh; width: auto; height: auto; border-radius: 8px; display: block; }

/* ===== Görsel yönetimi (admin) ===== */
.img-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.img-admin-card {
    position: relative; display: flex; flex-direction: column;
    background: var(--card, #1a1d23); border: 1px solid var(--line, #282b35);
    border-radius: 12px; overflow: hidden;
}
.img-admin-thumb { display: block; height: 150px; background: var(--input, #0f1115); }
.img-admin-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-admin-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.img-admin-title { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-admin-links { display: flex; gap: 6px; flex-wrap: wrap; }
.img-admin-links .outline-btn, .img-admin-links .copy-link { padding: 3px 8px; font-size: 11px; }
.img-admin-del { position: absolute; top: 8px; right: 8px; margin: 0; }

/* Paste editörü BBCode araç çubuğu */
.bb-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 8px 10px;
    background: var(--input, #0f1115);
    border: 1px solid var(--line, #282b35);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}
.bb-btn {
    min-width: 30px;
    padding: 4px 8px;
    background: var(--card, #1a1d23);
    border: 1px solid var(--line, #282b35);
    border-radius: 7px;
    color: var(--text-soft, #aab2ce);
    font-family: inherit;
    font-size: 12.5px;
    cursor: pointer;
    transition: all .12s ease;
}
.bb-btn:hover { border-color: var(--gold, #e9b208); color: var(--gold, #e9b208); }
.bb-sep { width: 1px; height: 18px; background: var(--line, #282b35); margin: 0 2px; }
.bb-color {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    background: var(--card, #1a1d23);
    border: 1px solid var(--line, #282b35);
    border-radius: 7px;
    color: var(--text-soft, #aab2ce);
    font-size: 12.5px;
    cursor: pointer;
}
.bb-color input[type="color"] {
    width: 22px; height: 20px;
    padding: 0; border: none; background: none; cursor: pointer;
}
.bb-toolbar + textarea { border-radius: 0 0 10px 10px !important; }

/* ===== Admin: hesap giriş / e-posta grupları ===== */
.acc-group {
    background: var(--input, #0f1115);
    border: 1px solid var(--line, #282b35);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
}
.acc-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line, #282b35);
}
.acc-group-head svg { width: 17px; height: 17px; flex-shrink: 0; }
.acc-group-head b { font-size: 13px; }
.acc-group-head .muted-small { width: 100%; }
.acc-group-login svg  { color: var(--gold, #e9b208); }
.acc-group-mail  svg  { color: var(--text-soft, #aab2ce); }
.acc-group .lic-grid { margin: 0; }

/* ===== Admin: sipariş filtre + sayfalama ===== */
.orders-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin: 4px 0 14px;
    padding: 12px 14px;
    background: var(--input, #0f1115);
    border: 1px solid var(--line, #282b35);
    border-radius: 12px;
}
.of-field { display: flex; flex-direction: column; gap: 4px; }
.of-field label { font-size: 11px; letter-spacing: .3px; color: var(--text-mute, #7d869f); }
.of-field input {
    padding: 8px 10px;
    background: var(--card, #1a1d23);
    border: 1px solid var(--line, #282b35);
    border-radius: 9px;
    color: var(--text, #ecf0ff);
    font-family: inherit; font-size: 13px; outline: none;
    color-scheme: dark;
}
.of-field input:focus { border-color: var(--gold, #e9b208); }
.of-actions { display: flex; gap: 8px; align-items: center; }
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
}
.pager-info { font-family: ui-monospace, monospace; color: var(--text-soft, #aab2ce); font-size: 13px; }
.outline-btn.is-disabled { opacity: .4; pointer-events: none; cursor: default; }

/* ===== Katalog v2: kontrol paneli ve oyun alanı birbirinden bağımsız ===== */
.catalog-page .order-wrap {
    width: min(100%, 1320px);
    max-width: 1320px;
    justify-content: flex-start;
    gap: 18px;
}
.catalog-page .brand-row { flex: 0 0 auto; }
.catalog-storefront { width: 100%; }
.catalog-controls {
    padding: 18px 20px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: color-mix(in srgb, var(--card-2) 90%, transparent);
    box-shadow: 0 20px 48px -42px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.018);
}
.catalog-controls .storefront-toolbar {
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}
.catalog-controls .game-search input {
    min-height: 48px;
    background: color-mix(in srgb, var(--input) 88%, #000 12%);
    border-color: color-mix(in srgb, var(--line) 82%, var(--text-mute) 18%);
}
.catalog-filter-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.catalog-filter {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: var(--text-soft);
    background: transparent;
    font: 700 12px/1 inherit;
    cursor: pointer;
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.catalog-filter svg { width: 14px; height: 14px; }
.catalog-filter:hover { color: var(--text); border-color: var(--line); transform: translateY(-1px); }
.catalog-filter.is-active {
    color: #1c1604;
    background: linear-gradient(135deg, var(--gold-2), var(--gold));
    border-color: rgba(var(--gold-rgb),.8);
    box-shadow: 0 8px 20px -13px rgba(var(--gold-rgb),.9);
}
.catalog-results {
    margin-top: 26px;
    padding: 0;
    border: 0;
    background: transparent;
}
.catalog-results-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}
.catalog-results-head .storefront-count { margin: 0; }
.catalog-results-head > span { color: var(--text-soft); font-size: 12px; }
.catalog-results .storefront-scroll-wrap { margin-top: 0; }
.catalog-results .game-scroll {
    height: auto;
    max-height: none;
    overflow: visible;
    padding: 0 1px 6px;
}
.catalog-results .game-scroll-rail { display: none; }
.catalog-results .game-grid.storefront-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 20px;
}

/* Büyük katalog performansı: ekran dışındaki kartların boya/layout maliyetini
   tarayıcı erteleyebilir. Sabit intrinsic ölçü scroll sıçramasını önler. */
.catalog-game {
    content-visibility: auto;
    contain-intrinsic-size: 230px 430px;
}
.catalog-load-sentinel {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-mute);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.catalog-load-sentinel.is-done { min-height: 42px; cursor: default; opacity: .72; }
.catalog-load-spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(var(--gold-rgb), .2);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: catalogLoadSpin .72s linear infinite;
    opacity: 0;
}
.catalog-load-sentinel.is-loading .catalog-load-spinner { opacity: 1; }
.catalog-load-sentinel.is-done .catalog-load-spinner { display: none; }
@keyframes catalogLoadSpin { to { transform: rotate(360deg); } }
.catalog-results .catalog-foot {
    display: flex;
    justify-content: center;
    margin: 24px 0 4px;
}

@media (min-height: 600px) {
    body.page-order.catalog-page {
        height: auto;
        min-height: 100vh;
        overflow-x: hidden;
        overflow-y: auto;
        align-items: stretch;
        padding-top: 22px;
        padding-bottom: 38px;
    }
    .catalog-page .order-wrap { min-height: 0; }
    .catalog-page .game-scroll-wrap { flex: none; min-height: 0; }
}
@media (max-width: 1120px) {
    .catalog-results .game-grid.storefront-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 880px) {
    .catalog-results .game-grid.storefront-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
}
@media (max-width: 620px) {
    .catalog-page .order-wrap { gap: 12px; }
    .catalog-controls { padding: 12px; border-radius: 14px; }
    .catalog-filter-row { margin-top: 10px; gap: 4px; }
    .catalog-filter { min-height: 34px; padding: 0 10px; font-size: 11px; }
    .catalog-results { margin-top: 18px; }
    .catalog-results-head { align-items: flex-start; margin-bottom: 12px; }
    .catalog-results-head > span { text-align: right; max-width: 130px; }
    .catalog-results .game-grid.storefront-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
}

/* ===== Admin: kalıcı OpenAI poster kuyruğu ===== */
.ai-extra-prompt {
    width: 100%; display: grid; gap: 6px; margin-bottom: 4px;
    color: var(--text-soft); font-size: 12px; font-weight: 700;
}
.ai-extra-prompt > span { color: var(--text); letter-spacing: .25px; }
.ai-extra-prompt textarea {
    width: 100%; min-height: 78px; resize: vertical; box-sizing: border-box;
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px;
    background: var(--input); color: var(--text); font: 500 13px/1.5 inherit; outline: none;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.ai-extra-prompt textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .12);
}
.ai-extra-prompt small { color: var(--text-mute); font-weight: 500; line-height: 1.45; }
.ai-reference-options { width: 100%; display: grid; gap: 8px; }
.ai-steam-reference { margin: 0; padding: 9px 11px; }
.ai-reference-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.ai-reference-upload .outline-btn { padding: 7px 10px; font-size: 11px; cursor: pointer; }
.ai-reference-upload .muted-small { max-width: 520px; overflow-wrap: anywhere; }
.ai-safe-bulk-controls {
    flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 7px 10px;
    align-items: center; padding: 10px; border: 1px solid rgba(255,105,120,.2); border-radius: 10px;
    background: rgba(255,105,120,.035);
}
.ai-safe-retry-btn { border-color: rgba(255,190,70,.45); color: var(--gold); }
.ai-safe-bulk-controls small { flex: 1 1 360px; color: var(--text-mute); font-size: 9.5px; line-height: 1.45; }
.bulk-ai-failed-only { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid rgba(255,92,110,.35); border-radius: 8px; color: #ff9aa6; font-size: 10px; font-weight: 800; cursor: pointer; }
.bulk-ai-failed-only input { accent-color: #ff5c6e; }
.bulk-ai-failed-only b { min-width: 19px; height: 19px; padding: 0 5px; display: inline-grid; place-items: center; border-radius: 999px; background: rgba(255,92,110,.15); }
.games-table tr.has-ai-failure { background: rgba(255,92,110,.025); }
.ai-failed-badge { display: inline-flex; margin-left: 7px; padding: 2px 5px; border: 1px solid rgba(255,92,110,.4); border-radius: 5px; color: #ff8997; font-size: 8px; font-weight: 900; letter-spacing: .35px; vertical-align: 1px; }
.games-table tr.has-retry-failure { background: rgba(75,170,255,.025); }
.games-table tr.has-ai-failure.has-retry-failure { background: linear-gradient(90deg, rgba(255,92,110,.03), rgba(75,170,255,.03)); }
.ai-retry-failed-badge { display: inline-flex; margin-left: 5px; padding: 2px 5px; border: 1px solid rgba(80,176,255,.48); border-radius: 5px; color: #72c4ff; background: rgba(55,145,235,.07); font-size: 8px; font-weight: 900; letter-spacing: .35px; vertical-align: 1px; }

.ai-queue-popup {
    position: fixed; z-index: 10050; top: 74px; right: 22px;
    width: min(410px, calc(100vw - 28px)); max-height: calc(100vh - 96px); overflow: auto;
    padding: 17px; border: 1px solid color-mix(in srgb, var(--gold) 34%, var(--line));
    border-radius: 16px; background: color-mix(in srgb, var(--card) 96%, #000 4%);
    color: var(--text); box-shadow: 0 24px 70px -22px rgba(0,0,0,.85), 0 0 32px -24px rgba(var(--gold-rgb),.75);
    animation: aiQueueIn .24s ease-out both;
}
.ai-queue-popup[hidden] { display: none; }
.ai-queue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ai-queue-head > div { display: grid; gap: 3px; min-width: 0; }
.ai-queue-kicker { color: var(--gold); font: 800 9px/1.2 ui-monospace, monospace; letter-spacing: 1.35px; }
.ai-queue-head strong { font-size: 14px; line-height: 1.35; }
.ai-queue-close {
    width: 29px; height: 29px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px;
    background: var(--input); color: var(--text-soft); font-size: 19px; cursor: pointer;
}
.ai-queue-meter { height: 8px; margin: 14px 0 8px; overflow: hidden; border-radius: 999px; background: var(--input); border: 1px solid var(--line); }
.ai-queue-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold-2), var(--gold)); box-shadow: 0 0 15px rgba(var(--gold-rgb),.55); transition: width .35s ease; }
.ai-queue-numbers { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--text-soft); font-size: 11px; }
.ai-queue-numbers b { color: var(--gold); font: 900 18px/1 ui-monospace, monospace; }
.ai-queue-current {
    display: flex; align-items: center; gap: 11px; min-height: 59px; margin-top: 13px; padding: 11px 12px;
    border: 1px solid var(--line); border-radius: 12px; background: var(--input);
}
.ai-queue-current > div { display: grid; min-width: 0; gap: 3px; }
.ai-queue-current small { color: var(--gold); font: 800 9px/1.2 ui-monospace, monospace; letter-spacing: .75px; }
.ai-queue-current b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.ai-queue-current em { color: var(--text-mute); font: 500 10px/1.2 ui-monospace, monospace; }
.ai-queue-spinner {
    width: 19px; height: 19px; flex: 0 0 auto; border: 2px solid var(--line); border-top-color: var(--gold);
    border-radius: 50%; animation: aiQueueSpin .75s linear infinite;
}
.ai-queue-list { display: grid; gap: 5px; max-height: 215px; overflow: auto; margin: 10px 0 0; padding: 0; list-style: none; }
.ai-queue-list li {
    display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 7px;
    min-height: 30px; padding: 5px 8px; border-radius: 8px; color: var(--text-soft); background: color-mix(in srgb, var(--input) 78%, transparent); font-size: 10px;
}
.ai-queue-list li.is-current { color: var(--text); background: rgba(var(--gold-rgb),.1); outline: 1px solid rgba(var(--gold-rgb),.28); }
.ai-queue-list li.is-empty { display: block; text-align: center; padding: 10px; }
.ai-queue-list li > span { color: var(--gold); font: 800 10px/1 ui-monospace, monospace; }
.ai-queue-list li > b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10.5px; }
.ai-queue-list li > em { color: var(--text-mute); font-style: normal; }
.ai-queue-error { margin-top: 9px; padding: 8px 10px; border: 1px solid rgba(255,105,105,.28); border-radius: 9px; background: rgba(255,70,70,.075); color: #ff9b9b; font-size: 10.5px; line-height: 1.45; word-break: break-word; }
.ai-queue-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; }
.ai-queue-action-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.ai-queue-actions .outline-btn { padding: 6px 10px; font-size: 10px; }
.ai-queue-actions .ai-queue-cancel { border-color: rgba(255,92,110,.45); color: #ff8997; }
.ai-queue-actions .ai-queue-cancel:hover { border-color: #ff5c6e; background: rgba(255,92,110,.1); }
.ai-queue-failures-toggle { border-color: rgba(255,92,110,.4) !important; color: #ff8997 !important; }
.ai-queue-failures-toggle.is-active { background: rgba(255,92,110,.13); border-color: #ff5c6e !important; }
.ai-queue-failures { max-height: 310px; overflow: auto; margin-top: 10px; }
.ai-queue-failures-head { margin-bottom: 7px; color: #ff8997; font-size: 9px; font-weight: 900; letter-spacing: .65px; }
.ai-queue-failures ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ai-queue-failures li { padding: 8px 9px; border: 1px solid rgba(255,92,110,.26); border-radius: 8px; background: rgba(255,92,110,.055); }
.ai-queue-failures li > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 7px; }
.ai-queue-failures li span { color: var(--gold); font-size: 9px; font-weight: 900; }
.ai-queue-failures li b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 10px; }
.ai-queue-failures li em { color: var(--text-mute); font-size: 8px; font-style: normal; }
.ai-queue-failures li p { margin: 6px 0 0; color: #ff9aa6; font: 9px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.ai-queue-retry-settings { width: 100%; margin-top: 9px; border-color: rgba(var(--gold-rgb),.42); color: var(--gold); font-size: 10px; }
.ai-queue-popup.show-failures .ai-queue-current,
.ai-queue-popup.show-failures > .ai-queue-list,
.ai-queue-popup.show-failures > .ai-queue-error { display: none; }
.ai-queue-actions > span { color: var(--text-mute); font-size: 9px; text-align: right; }
.ai-queue-popup.is-finished { border-color: rgba(var(--green-rgb),.45); }
.ai-queue-popup.is-finished .ai-queue-meter span { background: var(--green); }
.ai-queue-popup.is-paused .ai-queue-spinner { animation-play-state: paused; opacity: .55; }

/* DB-backed selected-cover optimization progress */
.cover-opt-queue {
    position: fixed; z-index: 10060; top: 74px; right: 22px;
    width: min(370px, calc(100vw - 28px)); max-height: calc(100vh - 96px); overflow: auto;
    padding: 16px; border: 1px solid rgba(97,207,255,.42); border-radius: 15px;
    background: color-mix(in srgb, var(--card) 96%, #000 4%); color: var(--text);
    box-shadow: 0 24px 70px -22px rgba(0,0,0,.86), 0 0 30px -24px rgba(97,207,255,.7);
    animation: aiQueueIn .24s ease-out both;
}
.cover-opt-queue[hidden] { display: none; }
.cover-opt-head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.cover-opt-head > div { display:grid; gap:3px; min-width:0; }
.cover-opt-head span { color:#72d3ff; font:900 9px/1.2 ui-monospace,monospace; letter-spacing:1.15px; }
.cover-opt-head strong { font-size:13px; line-height:1.35; }
.cover-opt-head button { width:28px; height:28px; flex:0 0 auto; border:1px solid var(--line); border-radius:8px; background:var(--input); color:var(--text-soft); font-size:18px; cursor:pointer; }
.cover-opt-meter { height:8px; margin:13px 0 8px; overflow:hidden; border:1px solid var(--line); border-radius:999px; background:var(--input); }
.cover-opt-meter span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#4ebeff,#65edcd); transition:width .35s ease; }
.cover-opt-numbers { display:flex; justify-content:space-between; gap:10px; color:var(--text-soft); font-size:10px; }
.cover-opt-numbers b { color:#72d3ff; font:900 17px/1 ui-monospace,monospace; }
.cover-opt-current { display:flex; align-items:center; gap:10px; min-height:56px; margin-top:11px; padding:10px; border:1px solid var(--line); border-radius:11px; background:var(--input); }
.cover-opt-current > div { display:grid; min-width:0; gap:3px; }
.cover-opt-current small { color:#72d3ff; font:800 8.5px/1.2 ui-monospace,monospace; letter-spacing:.55px; }
.cover-opt-current b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.cover-opt-list { display:grid; gap:5px; max-height:180px; overflow:auto; margin:9px 0 0; padding:0; list-style:none; }
.cover-opt-list:empty { display:none; }
.cover-opt-list li { display:grid; grid-template-columns:30px minmax(0,1fr) auto; gap:6px; align-items:center; padding:5px 7px; border-radius:7px; background:color-mix(in srgb,var(--input) 78%,transparent); color:var(--text-soft); font-size:9.5px; }
.cover-opt-list li.is-current { color:var(--text); outline:1px solid rgba(97,207,255,.27); background:rgba(97,207,255,.08); }
.cover-opt-list span { color:#72d3ff; font-weight:900; }
.cover-opt-list b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.cover-opt-list em { color:var(--text-mute); font-style:normal; }
.cover-opt-error { margin-top:9px; padding:8px 10px; border:1px solid rgba(255,105,105,.3); border-radius:9px; background:rgba(255,70,70,.075); color:#ff9b9b; font:10px/1.45 ui-monospace,monospace; overflow-wrap:anywhere; }
.cover-opt-foot { margin-top:10px; color:var(--text-mute); font-size:9px; text-align:right; }
.cover-opt-queue.is-finished { border-color:rgba(var(--green-rgb),.48); }
.cover-opt-queue.is-finished .cover-opt-meter span { background:var(--green); }

/* Ana üretimden bağımsız, en fazla tek istek çalıştıran retry lane popupı */
.ai-retry-queue-popup {
    position: fixed; z-index: 10049; top: 74px; right: 448px;
    width: min(360px, calc(100vw - 28px)); max-height: calc(100vh - 96px); overflow: auto;
    padding: 15px; border: 1px solid rgba(105,210,255,.36); border-radius: 15px;
    background: color-mix(in srgb, var(--card) 96%, #000 4%); color: var(--text);
    box-shadow: 0 22px 65px -24px rgba(0,0,0,.86), 0 0 30px -24px rgba(105,210,255,.65);
    animation: aiQueueIn .24s ease-out both;
}
.ai-retry-queue-popup[hidden] { display: none; }
.ai-retry-queue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ai-retry-queue-head > div { display: grid; gap: 3px; min-width: 0; }
.ai-retry-queue-head span { color: #76d4ff; font: 900 9px/1.2 ui-monospace, monospace; letter-spacing: 1.15px; }
.ai-retry-queue-head strong { font-size: 13px; }
.ai-retry-queue-head button { width: 27px; height: 27px; border: 1px solid var(--line); border-radius: 8px; background: var(--input); color: var(--text-soft); font-size: 18px; cursor: pointer; }
.ai-retry-queue-meter { height: 7px; margin: 12px 0 7px; overflow: hidden; border: 1px solid var(--line); border-radius: 999px; background: var(--input); }
.ai-retry-queue-meter span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#68cfff,#9d7cff); transition: width .35s ease; }
.ai-retry-queue-numbers { display: flex; justify-content: space-between; gap: 10px; color: var(--text-soft); font-size: 10px; }
.ai-retry-queue-numbers b { color: #76d4ff; font: 900 17px/1 ui-monospace, monospace; }
.ai-retry-queue-current { display: flex; align-items: center; gap: 10px; min-height: 56px; margin-top: 11px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--input); }
.ai-retry-queue-current > div { display: grid; min-width: 0; gap: 3px; }
.ai-retry-queue-current small { color: #76d4ff; font: 800 8.5px/1.2 ui-monospace, monospace; letter-spacing: .6px; }
.ai-retry-queue-current b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.ai-retry-queue-current em { color: var(--text-mute); font: 500 9px/1.2 ui-monospace, monospace; }
.ai-retry-queue-list { display: grid; gap: 5px; max-height: 155px; overflow: auto; margin: 9px 0 0; padding: 0; list-style: none; }
.ai-retry-queue-list li { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 6px; align-items: center; padding: 5px 7px; border-radius: 7px; background: color-mix(in srgb,var(--input) 78%,transparent); color: var(--text-soft); font-size: 9.5px; }
.ai-retry-queue-list li.is-empty { display: block; text-align: center; padding: 9px; }
.ai-retry-queue-list span { color: #76d4ff; font-weight: 900; }
.ai-retry-queue-list b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-retry-queue-list em { color: var(--text-mute); font-style: normal; }
.ai-retry-queue-error { margin-top: 8px; padding: 8px 9px; border: 1px solid rgba(255,105,105,.28); border-radius: 8px; background: rgba(255,70,70,.07); color: #ff9b9b; font-size: 9.5px; line-height: 1.4; overflow-wrap: anywhere; }
.ai-retry-queue-failures { max-height: 285px; overflow: auto; margin-top: 9px; }
.ai-retry-queue-failures-head { margin-bottom: 7px; color: #72c4ff; font-size: 8.5px; font-weight: 900; letter-spacing: .65px; }
.ai-retry-queue-failures ol { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.ai-retry-queue-failures li { padding: 8px 9px; border: 1px solid rgba(80,176,255,.28); border-radius: 8px; background: rgba(55,145,235,.055); }
.ai-retry-queue-failures li > div { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 7px; }
.ai-retry-queue-failures li span { color: #72c4ff; font-size: 9px; font-weight: 900; }
.ai-retry-queue-failures li b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 10px; }
.ai-retry-queue-failures li em { color: var(--text-mute); font-size: 8px; font-style: normal; }
.ai-retry-queue-failures li p { margin: 6px 0 0; color: #a9d9ff; font: 9px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; }
.ai-retry-queue-failures li.is-empty { text-align: center; color: var(--text-mute); }
.ai-retry-queue-retry-settings { width: 100%; margin-top: 9px; border-color: rgba(80,176,255,.42); color: #72c4ff; font-size: 9px; }
.ai-retry-failures-toggle { border-color: rgba(80,176,255,.42) !important; color: #72c4ff !important; }
.ai-retry-failures-toggle.is-active { border-color: #50b0ff !important; background: rgba(55,145,235,.12); }
.ai-retry-queue-popup.show-failures .ai-retry-queue-current,
.ai-retry-queue-popup.show-failures > .ai-retry-queue-list,
.ai-retry-queue-popup.show-failures > .ai-retry-queue-error { display: none; }
.ai-retry-queue-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.ai-retry-queue-actions > div { display: flex; flex-wrap: wrap; gap: 5px; }
.ai-retry-queue-actions .outline-btn { padding: 5px 8px; font-size: 9px; }
.ai-retry-queue-actions small { color: var(--text-mute); font-size: 8.5px; text-align: right; }
.ai-retry-queue-popup.is-finished { border-color: rgba(var(--green-rgb),.42); }
.ai-retry-queue-popup.is-finished .ai-retry-queue-meter span { background: var(--green); }
.ai-retry-queue-popup.is-paused .ai-queue-spinner { animation-play-state: paused; opacity: .55; }

body.ai-retry-open { overflow: hidden; }
.ai-retry-modal {
    position: fixed; inset: 0; z-index: 10120; display: grid; place-items: center;
    padding: 20px; overflow: auto; background: rgba(3,5,9,.82);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    opacity: 0; transition: opacity .17s ease;
}
.ai-retry-modal[hidden] { display: none; }
.ai-retry-modal.is-open { opacity: 1; }
.ai-retry-dialog {
    position: relative; width: min(620px, 100%); padding: 24px;
    border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--line)); border-radius: 18px;
    background: linear-gradient(155deg, color-mix(in srgb, var(--card) 97%, #000 3%), var(--card-2));
    color: var(--text); box-shadow: 0 32px 100px -28px rgba(0,0,0,.92), 0 0 35px -27px rgba(var(--gold-rgb),.72);
    transform: translateY(12px) scale(.985); transition: transform .2s cubic-bezier(.2,.8,.25,1);
}
.ai-retry-modal.is-open .ai-retry-dialog { transform: none; }
.ai-retry-close {
    position: absolute; top: 13px; right: 13px; width: 33px; height: 33px;
    border: 1px solid var(--line); border-radius: 9px; background: var(--input); color: var(--text-soft);
    font-size: 21px; line-height: 1; cursor: pointer;
}
.ai-retry-close:hover { color: var(--gold); border-color: rgba(var(--gold-rgb),.45); }
.ai-retry-kicker { color: var(--gold); font: 900 9px/1.2 ui-monospace, monospace; letter-spacing: 1.35px; }
.ai-retry-dialog h3 { margin: 7px 42px 5px 0; font-size: 20px; }
.ai-retry-dialog > p { margin: 0 0 15px; color: var(--text-soft); font-size: 12px; }
.ai-retry-summary {
    display: flex; align-items: center; gap: 9px; margin-bottom: 13px; padding: 10px 12px;
    border: 1px solid var(--line); border-radius: 11px; background: var(--input); color: var(--text-soft); font-size: 11px;
}
.ai-retry-summary b { min-width: 30px; color: var(--gold); font: 900 20px/1 ui-monospace, monospace; }
.ai-retry-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ai-retry-mode {
    display: flex; gap: 10px; min-width: 0; padding: 13px;
    border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.018); cursor: pointer;
    transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.ai-retry-mode:hover { transform: translateY(-1px); border-color: rgba(var(--gold-rgb),.35); }
.ai-retry-mode.is-selected { border-color: var(--gold); background: rgba(var(--gold-rgb),.075); box-shadow: 0 0 0 2px rgba(var(--gold-rgb),.08) inset; }
.ai-retry-mode input { margin: 2px 0 0; accent-color: var(--gold); }
.ai-retry-mode span { display: grid; gap: 5px; min-width: 0; }
.ai-retry-mode b { font-size: 12px; }
.ai-retry-mode small { color: var(--text-mute); font-size: 9.5px; line-height: 1.45; }
.ai-retry-prompt-label { display: block; margin: 16px 0 7px; color: var(--text-soft); font-size: 10px; font-weight: 800; letter-spacing: .35px; text-transform: uppercase; }
.ai-retry-dialog textarea {
    width: 100%; min-height: 94px; resize: vertical; padding: 11px 12px;
    border: 1px solid var(--line); border-radius: 11px; outline: 0;
    background: var(--input); color: var(--text); font: inherit; font-size: 12px; font-weight: 500; line-height: 1.5;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.ai-retry-dialog textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(var(--gold-rgb),.1); }
.ai-retry-queue-note { margin-top: 12px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-soft); font-size: 10px; line-height: 1.5; }
.ai-retry-queue-note.is-safe { border-color: rgba(52,211,153,.26); background: rgba(52,211,153,.055); color: #9de6ca; }
.ai-retry-queue-note.is-warning { border-color: rgba(255,92,110,.3); background: rgba(255,92,110,.065); color: #ff9aa6; }
.ai-retry-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ai-retry-actions button { min-width: 112px; }

@keyframes aiQueueSpin { to { transform: rotate(360deg); } }
@keyframes aiQueueIn { from { opacity: 0; transform: translateY(-8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (max-width: 620px) {
    .ai-queue-popup { top: 12px; right: 14px; width: calc(100vw - 28px); max-height: calc(100vh - 24px); }
    .cover-opt-queue { top: 12px; right: 14px; width: calc(100vw - 28px); max-height: calc(100vh - 24px); }
    .ai-retry-queue-popup { top: auto; right: 14px; bottom: 12px; width: calc(100vw - 28px); max-height: 46vh; }
    .ai-retry-modal { padding: 10px; place-items: start center; }
    .ai-retry-dialog { margin-top: 10px; padding: 20px 15px 16px; }
    .ai-retry-mode-grid { grid-template-columns: 1fr; }
    .ai-retry-actions { flex-direction: column-reverse; }
    .ai-retry-actions button { width: 100%; }
}
@media (min-width: 621px) and (max-width: 920px) {
    .ai-retry-queue-popup { top: auto; right: 22px; bottom: 18px; }
}
