/* ==========================================================================
   Versust Design System — thumbnail-studio uygulaması
   Koyu "ember" zemin + turuncu aksan, Orbitron/Space Grotesk/JetBrains Mono.
   ========================================================================== */

:root {
    --bg: #0A0705;
    --surface: #14100C;
    --surface-2: #1C150F;
    --surface-3: #241B13;

    --orange-300: #FFB37A;
    --orange-400: #FF8A3D;
    --orange-500: #FF5A1F;
    --orange-600: #E8420C;
    --orange-700: #C73206;

    --gold: var(--orange-500);
    --gold-light: var(--orange-300);
    --gold-deep: var(--orange-700);
    --gold-grad: linear-gradient(135deg, var(--gold), var(--gold-light));

    --wine: #FF5D5D;
    --wine-light: #FF8A8A;
    --success: #7CFFB2;

    --ink: #FBF3EC;
    --body: #C9B8A9;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);

    --radius: 8px;
    --radius-lg: 14px;
    --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --font-display: "Orbitron", sans-serif;
    --font-mono: "JetBrains Mono", monospace;

    --glow-accent: 0 0 40px rgba(255, 90, 31, 0.35);
    --glow-accent-strong: 0 0 80px rgba(255, 90, 31, 0.5);
    --ease-out: cubic-bezier(.16, 1, .3, 1);

    --bs-body-bg: var(--bg);
    --bs-body-color: var(--body);
    --bs-border-color: var(--border);
    --bs-primary: var(--gold);
    --bs-link-color: var(--gold-light);
    --bs-link-hover-color: var(--gold);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    font-family: var(--font);
    line-height: 1.55;
    min-height: 100vh;
    color: var(--body);
    background:
        radial-gradient(ellipse 900px 500px at 15% -10%, rgba(255,90,31,0.12), transparent 60%),
        radial-gradient(ellipse 700px 500px at 100% 10%, rgba(255,90,31,0.07), transparent 55%),
        var(--bg);
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, .display {
    color: var(--ink);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0 0 0.35em;
}

h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 5vw, 3.4rem); display: flex; align-items: center; gap: 16px; line-height: 1.05; }
h1 .icon { width: 0.7em; height: 0.7em; color: var(--gold); flex-shrink: 0; }
h2 { font-size: clamp(1.15rem, 2vw, 1.5rem); font-weight: 800; }
h3 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--gold-light); font-weight: 800; }

a { color: var(--gold-light); text-decoration: none; }
a:hover { color: var(--gold); }

.muted { color: var(--body); opacity: 0.8; font-size: 0.92rem; }

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

.app-main { opacity: 0; transform: translateY(6px); }
.app-main.is-ready { opacity: 1; transform: none; transition: opacity 220ms var(--ease-out), transform 220ms var(--ease-out); }

/* ==========================================================================
   Login — ember glow, parallaks his
   ========================================================================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: #050403;
}

.login-page::before,
.login-page::after {
    content: '';
    position: absolute;
    width: 62vw;
    height: 62vw;
    max-width: 900px;
    max-height: 900px;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}
.login-page::before {
    top: -22%;
    left: -14%;
    background: radial-gradient(circle, rgba(255,90,31,0.28), transparent 70%);
    animation: driftA 20s ease-in-out infinite alternate;
}
.login-page::after {
    bottom: -24%;
    right: -14%;
    background: radial-gradient(circle, rgba(255,138,61,0.22), transparent 70%);
    animation: driftB 24s ease-in-out infinite alternate;
}
@keyframes driftA { from { transform: translate(0,0) scale(1); } to { transform: translate(5%, 6%) scale(1.12); } }
@keyframes driftB { from { transform: translate(0,0) scale(1); } to { transform: translate(-6%, -4%) scale(1.1); } }

#login-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

.login-card {
    position: relative;
    z-index: 2;
    width: min(380px, 90vw);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.login-card .monogram-wrap {
    opacity: 0;
    transform: scale(0.8);
    animation: monogramIn 600ms var(--ease-out) 100ms forwards;
    margin-bottom: 3.2rem;
}
.login-card .monogram-wrap svg { animation: glowPulse 3.4s ease-in-out 700ms infinite; }
@keyframes monogramIn { to { opacity: 1; transform: scale(1); } }
@keyframes glowPulse {
    0%, 100% { filter: drop-shadow(0 0 6px rgba(255,90,31,0.35)) drop-shadow(0 0 18px rgba(255,90,31,0.14)); }
    50% { filter: drop-shadow(0 0 22px rgba(255,179,122,0.8)) drop-shadow(0 0 54px rgba(255,90,31,0.45)); }
}

.login-field { width: 100%; margin-bottom: 2rem; position: relative; }
.login-field input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border-strong);
    color: var(--ink);
    font-family: var(--font);
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 14px 2px;
    text-align: center;
    outline: none;
    transition: border-color 180ms var(--ease-out), filter 180ms var(--ease-out);
}
.login-field input:focus {
    border-color: var(--gold-light);
    filter: drop-shadow(0 6px 14px rgba(255,138,61,0.35));
}

.login-card.shake .login-field input {
    animation: shakeField 420ms ease;
    border-color: var(--wine-light);
}
@keyframes shakeField {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(4px); }
}

.login-submit {
    background: var(--gold-grad);
    border: none;
    color: #1A0A00;
    border-radius: 999px;
    width: 60px;
    height: 60px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 0.5rem;
    box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, var(--glow-accent);
    transition: box-shadow 180ms var(--ease-out), filter 180ms var(--ease-out);
}
.login-submit:hover { filter: brightness(1.08); box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, var(--glow-accent-strong); }
.login-submit:active { filter: brightness(0.92); }
.login-submit svg { width: 22px; height: 22px; }

/* ==========================================================================
   App shell — büyük bold üst navigasyon (sidebar yok)
   ========================================================================== */
.topnav {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 22px clamp(20px, 4vw, 48px);
    background: rgba(10, 7, 5, 0.82);
    backdrop-filter: var(--blur-glass, blur(20px));
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.topnav-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); flex-shrink: 0; }
.topnav-brand-word { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; letter-spacing: 0.01em; }

/* Tabs (design system: pill grup, aktif sekme dolgu) — üst navigasyon bu kalıpla */
.topnav-links {
    display: flex;
    gap: 4px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    overflow-x: auto;
    scrollbar-width: none;
    flex: 1;
    max-width: fit-content;
    margin: 0 auto;
}
.topnav-links::-webkit-scrollbar { display: none; }
.topnav-link {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--body);
    padding: 8px 18px;
    border-radius: 999px;
    white-space: nowrap;
    transition: color 180ms var(--ease-out), background 180ms var(--ease-out);
}
.topnav-link:hover { color: var(--ink); }
.topnav-link.active { color: #1A0A00; background: var(--gold-grad); font-weight: 700; }

.topnav-logout { color: var(--body); display: inline-flex; padding: 6px; border-radius: var(--radius); flex-shrink: 0; transition: color 150ms var(--ease-out), background 150ms var(--ease-out); }
.topnav-logout:hover { color: var(--wine-light); background: var(--surface); }

.container { max-width: 1120px; margin: 0 auto; padding: 48px 28px 100px; width: 100%; }

/* ==========================================================================
   Reusable UI
   ========================================================================== */
.breadcrumb { color: var(--body); font-size: 0.82rem; margin-bottom: 20px; letter-spacing: 0.02em; font-weight: 600; }
.breadcrumb a { color: var(--body); }
.breadcrumb a:hover { color: var(--gold-light); }

.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}
.head-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.card:hover {
    border-color: var(--gold);
    transform: translateY(-3px);
    color: var(--ink);
    box-shadow: var(--glow-accent);
}
.card h2 { margin: 0 0 8px; }
.card p { margin: 0; color: var(--body); font-size: 0.9rem; }

.card-wrap { position: relative; }
.card-delete { position: absolute; top: 14px; right: 14px; z-index: 2; }

/* ---------- kategori kartları: otomatik ikon + renk ---------- */
.category-card { position: relative; overflow: hidden; }
.category-card::before {
    content: '';
    position: absolute; top: -40%; left: -20%;
    width: 70%; height: 140%;
    background: radial-gradient(circle, var(--cat-color), transparent 70%);
    opacity: 0.14;
    filter: blur(10px);
    transition: opacity 180ms var(--ease-out);
    pointer-events: none;
}
.category-card:hover::before { opacity: 0.24; }
.category-card:hover { border-color: var(--cat-color); box-shadow: 0 0 40px color-mix(in srgb, var(--cat-color) 35%, transparent); }
.category-icon { position: relative; color: var(--cat-color); margin-bottom: 16px; }
.category-card:hover .category-icon { transform: scale(1.05); transition: transform 180ms var(--ease-out); }

/* ---------- birincil CTA'lar: sabit ember glow, sıçramasız ---------- */
.btn-flashy {
    position: relative;
    border: none;
    color: var(--text-on-accent, #1A0A00);
    font-weight: 800;
    background-image: var(--gold-grad);
    box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, var(--glow-accent);
    transition: box-shadow 200ms var(--ease-out), filter 200ms var(--ease-out);
}
.btn-flashy.tone-mega {
    font-weight: 900;
    letter-spacing: 0.02em;
}
.btn-flashy:hover { filter: brightness(1.06); box-shadow: 0 1px 0 rgba(255,255,255,0.5) inset, var(--glow-accent-strong); }

.channel-card { position: relative; min-height: 190px; padding: 0; overflow: hidden; display: flex; align-items: flex-end; }
.card-bg-rotator { position: absolute; inset: 0; }
.card-bg-rotator img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    filter: brightness(0.42) saturate(0.85) contrast(0.95);
    transition: opacity 1400ms ease;
}
.card-bg-rotator img.active { opacity: 1; }
/* Görsellerin üstünde tekdüze koyu bir baskı + alt bantta ekstra karartma, thumbnail ne kadar
   parlak olursa olsun kanal adı ve rozetler her zaman net okunsun diye. */
.channel-card::after {
    content: '';
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(10,7,5,0.55) 0%, rgba(10,7,5,0.4) 40%, rgba(10,7,5,0.6) 65%, rgba(10,7,5,0.96) 100%);
    z-index: 0;
}
.channel-card .card-content { position: relative; z-index: 1; padding: 18px 20px; width: 100%; }
.channel-card .card-content h2 {
    display: inline-block;
    background: rgba(10,7,5,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 5px 12px;
    border-radius: var(--radius);
    text-shadow: none;
}

.tag { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 5px 13px; border-radius: 999px; font-family: var(--font-mono); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; border: 1px solid var(--border); }
.tag .icon { width: 13px; height: 13px; }
.tag-ok { color: var(--success); border-color: rgba(124,255,178,.3); background: rgba(124,255,178,.1); }
.tag-warn { color: var(--gold-light); border-color: rgba(255,90,31,.3); background: rgba(255,90,31,.1); }

.empty {
    color: var(--body);
    padding: 32px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border);
    font-size: 0.95rem;
}

/* ---------- pill-shaped, teknik butonlar ---------- */
.btn {
    background: var(--surface-2);
    color: var(--ink);
    border: 1px solid var(--border-strong);
    padding: 12px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
}
.btn:hover { border-color: var(--gold); color: var(--ink); }
.btn:active { filter: brightness(0.94); }
.btn.primary {
    background: var(--gold-grad);
    border-color: transparent;
    color: #1A0A00;
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, var(--glow-accent);
}
.btn.primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,0.45) inset, var(--glow-accent-strong); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 22px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.panel.hidden { display: none; }

label { display: block; margin-bottom: 18px; font-size: 0.88rem; color: var(--body); font-weight: 600; }
input[type=text], input[type=url], input[type=password], input[type=email], textarea, select {
    width: 100%;
    margin-top: 8px;
    padding: 13px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 0.96rem;
    font-family: inherit;
    transition: border-color 150ms var(--ease-out);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--gold); }
textarea { resize: vertical; }

.inline-form { display: flex; gap: 10px; margin-bottom: 20px; }
.inline-form input { margin-top: 0; }

.ref-photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; max-width: 560px; }
.ref-photo-item { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.ref-photo-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; display: block; }

.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.thumb-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out);
    animation: thumbIn 480ms var(--ease-out) backwards;
}
@keyframes thumbIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: none; }
}
.thumb-item:hover { border-color: var(--gold); box-shadow: var(--glow-accent); z-index: 1; }
.thumb-item img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.thumb-remove {
    position: absolute; top: 6px; right: 6px;
    background: rgba(10,7,5,.8); color: var(--ink); border: 1px solid var(--border);
    width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 13px;
}

/* ---------- sonuç ekranı ---------- */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}
.results-header h2 { margin-bottom: 6px; }
.results-summary-line { color: var(--body); font-size: 0.92rem; max-width: 52ch; }

.result-channel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    overflow: hidden;
    transition: border-color 180ms var(--ease-out), transform 320ms var(--ease-out), box-shadow 250ms var(--ease-out), opacity 550ms ease;
}
.result-channel:hover { border-color: var(--border-strong); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.4); }

.reveal { opacity: 0; transform: translateY(24px); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal.is-visible:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

.result-channel-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}
.result-channel-avatar {
    width: 42px; height: 42px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid var(--border);
    background: var(--surface-2);
}
.result-channel-name { margin: 0; font-size: 1.05rem; font-weight: 800; color: var(--ink); flex: 1; min-width: 0; }

.variant-switch { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.variant-switch-label { font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--body); font-weight: 600; }
.variant-tabs { display: flex; background: var(--surface-2); border-radius: 999px; padding: 3px; gap: 2px; }
.variant-tab {
    width: 28px; height: 28px;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--body);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 150ms var(--ease-out), color 150ms var(--ease-out);
}
.variant-tab:hover:not(.active) { color: var(--ink); }
.variant-tab.active { background: var(--gold-grad); color: #1A0A00; }

.result-channel-body { padding: 22px 24px 4px; }
.result-channel-body .prompt-text {
    background: none;
    border: none;
    padding: 0;
    margin-bottom: 0;
    max-width: 68ch;
    font-size: 15px;
    line-height: 1.9;
}
.result-channel-footer { display: flex; justify-content: flex-end; padding: 16px 24px 22px; }

/* --- Geçmiş: bölüm (episode) kartı — kanal/varyasyon sekmeli tek kutu --- */
.episode-card { margin-bottom: 22px; }
.episode-card-head { flex-direction: column; align-items: stretch; gap: 14px; }
.episode-card-head-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.episode-card .bento-cat { font-family: var(--font-mono); color: var(--gold-light); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.episode-card .bento-title { font-size: 1.15rem; font-weight: 800; color: var(--ink); margin: 8px 0 2px; line-height: 1.25; }
.episode-card .bento-meta { color: var(--body); font-size: 0.8rem; margin: 0; }
.episode-card-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.channel-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.channel-tab {
    border: 1px solid var(--border-strong);
    background: var(--surface-2);
    color: var(--body);
    font-weight: 600;
    font-size: 0.82rem;
    padding: 7px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 180ms var(--ease-out);
}
.channel-tab:hover:not(.active) { border-color: var(--gold); color: var(--ink); }
.channel-tab.active { background: var(--gold-grad); border-color: transparent; color: #1A0A00; }
.episode-card.filtered-out { display: none; }

.prompt-text {
    background: var(--surface-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    font-size: 14.5px;
    line-height: 1.85;
    color: var(--ink);
    margin-bottom: 14px;
}
.prompt-text p { margin: 0 0 10px; }
.prompt-text p:last-child { margin-bottom: 0; }

pre { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); padding: 14px; border-radius: var(--radius); font-family: var(--font-mono); font-size: 13px; }

.wizard-step { animation: wizardStepIn 260ms var(--ease-out); }
@keyframes wizardStepIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

.wizard-progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin-bottom: 10px; }
.wizard-progress-fill { height: 100%; background: var(--gold-grad); border-radius: 999px; box-shadow: var(--glow-accent); transition: width 260ms var(--ease-out); }
.wizard-step-label { font-family: var(--font-mono); font-size: 0.68rem; color: var(--body); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; margin-bottom: 24px; }

.wizard-question { font-size: clamp(1.35rem, 2.8vw, 1.9rem); font-weight: 900; color: var(--ink); margin-bottom: 10px; letter-spacing: -0.02em; line-height: 1.15; }
.wizard-hint { color: var(--body); font-size: 0.92rem; margin: 0 0 20px; font-weight: 500; }
.wizard-choices { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-lg { padding: 18px 32px; font-size: 1rem; }
#wizard input[type=text], #wizard textarea { font-size: 1.05rem; }

.result-image-wrap { line-height: 0; background: var(--surface-3); }
.result-image { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }

.channel-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.channel-tile {
    position: relative;
    height: 110px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background-color: var(--surface-2);
    background-size: cover;
    background-position: center;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 0;
    transition: border-color 180ms var(--ease-out);
}
.channel-tile::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(10,7,5,0.1) 30%, rgba(10,7,5,0.9) 100%);
}
.channel-tile-name {
    position: relative;
    z-index: 1;
    color: var(--ink);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 10px;
    text-align: left;
    width: 100%;
}
.channel-tile-check {
    position: absolute;
    top: 8px; right: 8px;
    z-index: 1;
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6);
    background: rgba(0,0,0,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; color: transparent;
    transition: all 150ms var(--ease-out);
}
.channel-tile.selected { border-color: var(--gold); box-shadow: var(--glow-accent); }
.channel-tile.selected .channel-tile-check { background: var(--gold-grad); border-color: transparent; color: #1A0A00; }

.color-swatches { display: inline-flex; gap: 6px; margin-left: 10px; vertical-align: middle; }
.color-swatch {
    display: inline-block;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid var(--surface-3);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: transform 150ms var(--ease-out);
}
.color-swatch:hover { transform: scale(1.2); }

/* ---------- ayarlar: toplu liste ---------- */
.bulk-list { display: flex; flex-direction: column; gap: 14px; }
.bulk-category { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.bulk-category-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bulk-category-head strong { color: var(--ink); font-size: 0.95rem; }
.bulk-channels { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; padding-left: 12px; border-left: 2px solid var(--border); }
.bulk-channel-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.85rem; }
.bulk-delete-btn {
    background: transparent; border: 1px solid var(--border); color: var(--body);
    width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 13px; flex-shrink: 0;
    transition: color 150ms var(--ease-out), border-color 150ms var(--ease-out);
}
.bulk-delete-btn:hover { color: var(--wine-light); border-color: var(--wine-light); }

/* ---------- ayarlar: işlem günlüğü ---------- */
.log-list { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow-y: auto; }
.log-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; padding: 9px 4px; border-bottom: 1px solid var(--border); font-size: 0.82rem; align-items: baseline; }
.log-type { font-family: var(--font-mono); color: var(--gold-light); font-weight: 600; text-transform: uppercase; font-size: 0.65rem; letter-spacing: 0.06em; }
.log-message { color: var(--body); }
.log-time { font-family: var(--font-mono); color: var(--body); opacity: 0.65; font-size: 0.7rem; white-space: nowrap; }
.log-row-error .log-message { color: var(--wine-light); }
.log-row-error .log-type { color: var(--wine-light); }
@media (max-width: 600px) { .log-row { grid-template-columns: 1fr; gap: 2px; } }

.style-dl { margin: 16px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 10px 20px; }
.style-dl dt { font-family: var(--font-mono); color: var(--gold-light); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; white-space: nowrap; }
.style-dl dd { margin: 0; color: var(--body); font-size: 0.88rem; }
@media (max-width: 560px) { .style-dl { grid-template-columns: 1fr; gap: 4px; } .style-dl dt { margin-top: 8px; } }
details summary { cursor: pointer; color: var(--body); font-size: 0.84rem; margin-top: 12px; font-weight: 600; }

dialog {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    color: var(--ink);
    padding: 30px;
    width: min(440px, 90vw);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 40px 80px -30px rgba(0,0,0,0.9);
}
dialog.dialog-lg { width: min(640px, 94vw); }
dialog::backdrop { background: rgba(0,0,0,.75); }
.dlg-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 10px; }

.error { color: var(--wine-light); font-size: 0.9rem; }

/* ---------- galeri filtre çubuğu ---------- */
.filter-bar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar input[type=text] { flex: 1; min-width: 220px; margin-top: 0; }
.filter-bar select { min-width: 180px; margin-top: 0; }
.bento-item.filtered-out { display: none; }

/* ---------- bento gallery ---------- */
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(150px, auto); gap: 16px; }
.bento-item {
    grid-column: span 2;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 180ms var(--ease-out), box-shadow 180ms var(--ease-out), transform 180ms var(--ease-out);
    width: 100%;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.bento-item:hover { border-color: var(--gold); transform: translateY(-3px); box-shadow: var(--glow-accent); }
.bento-item.span-4 { grid-column: span 4; }
.bento-item .bento-cat { font-family: var(--font-mono); color: var(--gold-light); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.bento-item .bento-title { font-size: 1.08rem; font-weight: 800; color: var(--ink); margin: 8px 0 2px; line-height: 1.25; }
.bento-item .bento-meta { color: var(--body); font-size: 0.76rem; margin: 0 0 8px; }
.bento-item .bento-date { font-family: var(--font-mono); color: var(--body); opacity: 0.65; font-size: 0.7rem; margin-top: 14px; }
.clamp {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--body);
    font-size: 0.86rem;
    margin: 10px 0 0;
}
.bento-thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); margin-top: 10px; border: 1px solid var(--border); }

/* ---------- veri/istatistik kartları (StatCard) ---------- */
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    min-width: 160px;
    flex: 1;
}
.stat-card-label { font-family: var(--font-mono); font-size: 0.7rem; color: var(--body); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 8px; }
.stat-card-value { font-family: var(--font-display); font-weight: 800; font-size: 1.7rem; color: var(--ink); }
.stat-card-delta { font-size: 0.85rem; color: var(--success); margin-top: 4px; }

@media (max-width: 720px) {
    .bento { grid-template-columns: repeat(2, 1fr); }
    .bento-item { grid-column: span 2; }
}

@media (max-width: 640px) {
    .container { padding: 32px 18px 80px; }
    .topnav { padding: 16px 18px; }
    .topnav-links { justify-content: flex-start; }
}
