/* ==========================================================================
   UGC PORTFÖY — ana stil
   Koyu tema · mor vurgu · büyük video grid · dikey modal oynatıcı
   ========================================================================== */

:root {
    /* Yüzeyler */
    --bg: #0a0a0b;
    --bg-2: #101013;
    --surface: #16161a;
    --surface-2: #1e1e24;
    --line: rgba(255, 255, 255, .075);
    --line-2: rgba(255, 255, 255, .12);

    /* Metin */
    --text: #ffffff;
    --muted: #a8a8b3;
    --muted-2: #74747f;

    /* Vurgu */
    --accent: #8b5cf6;
    --accent-hi: #a78bfa;
    --accent-dim: rgba(139, 92, 246, .16);
    --accent-line: rgba(139, 92, 246, .45);

    /* Biçim */
    --radius: 14px;
    --radius-lg: 18px;
    --shadow: 0 16px 40px -20px rgba(0, 0, 0, .85);
    --shadow-lg: 0 40px 90px -30px rgba(0, 0, 0, .95);

    /* Kart oranı — referans kare ölçüde.
       Daha dikey kartlar isterseniz: 4 / 5  ya da  9 / 16 yazın. */
    --card-ratio: 1 / 1;

    --header-h: 66px;
    --shell: 1280px;
    --pad: 28px;

    --ease: cubic-bezier(.22, .61, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Başlık alanının arkasında çok hafif bir aydınlanma.
   position: absolute kullanılır (fixed değil): sayfayla birlikte kayar,
   böylece her kaydırma karesinde yeniden boyanmaz. */
body::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 420px;
    background: radial-gradient(70% 100% at 50% 0%, rgba(139, 92, 246, .075), transparent 72%);
    pointer-events: none;
    z-index: 0;
}

img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.card-play svg, .player-bigplay svg, #btn-play svg, .card-star svg { fill: currentColor; stroke: none; }

::selection { background: var(--accent); color: #fff; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
    z-index: 100; background: var(--accent); color: #fff;
    padding: 10px 18px; border-radius: 0 0 10px 10px;
    text-decoration: none; font-weight: 600; transition: top .2s var(--ease);
}
.skip-link:focus { top: 0; }

:focus-visible { outline: 2px solid var(--accent-hi); outline-offset: 2px; }

/* ==========================================================================
   Üst bar — sol marka, sağ arama. Menü yok.
   ========================================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    /* Sabit (sticky) bir öge üzerinde backdrop-filter, her kaydırma
       karesinde bulanıklığın yeniden hesaplanmasına yol açıyor.
       Koyu temada düz, yüksek opaklıklı zemin aynı görünümü veriyor. */
    background: #0b0b0d;
    border-bottom: 1px solid var(--line);
}

.header-inner {
    max-width: var(--shell);
    margin: 0 auto;
    min-height: var(--header-h);
    padding: 12px var(--pad);
    display: flex;
    align-items: center;
    gap: 20px;
}

.brand {
    display: block;
    text-decoration: none;
    color: var(--text);
    flex: 0 0 auto;
}

.brand-title {
    display: block;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .02em;
    line-height: 1.1;
}

/* "UGC" mor, kalanı beyaz */
.brand-accent { color: var(--accent); }

.brand-sub {
    display: block;
    margin-top: 3px;
    font-size: 9.5px;
    font-weight: 600;
    letter-spacing: .3em;
    color: var(--muted-2);
}

/* --- Arama --- */

.search {
    position: relative;
    margin-left: auto;
    flex: 0 1 320px;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 14px;
    width: 16px;
    height: 16px;
    color: var(--muted-2);
    pointer-events: none;
}

.search input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 40px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
    -webkit-appearance: none;
    appearance: none;
}

.search input::placeholder { color: var(--muted-2); }
.search input::-webkit-search-cancel-button { display: none; }

.search input:focus {
    outline: none;
    background: var(--surface-2);
    border-color: var(--accent-line);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, .13);
}

.search-clear {
    position: absolute;
    right: 8px;
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border: 0; border-radius: 8px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background .15s var(--ease), color .15s var(--ease);
}
.search-clear:hover { background: var(--surface-2); color: var(--text); }
.search-clear svg { width: 14px; height: 14px; }

/* ==========================================================================
   Başlık alanı
   ========================================================================== */

main { position: relative; z-index: 1; }

.hero {
    max-width: 660px;
    margin: 0 auto;
    padding: 52px var(--pad) 26px;
    text-align: center;
}

.hero-title {
    margin: 0;
    font-size: clamp(28px, 4.6vw, 44px);
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.1;
    color: #fff;
}

.hero-text {
    margin: 12px auto 0;
    max-width: 520px;
    color: var(--muted);
    font-size: clamp(13.5px, 1.5vw, 15px);
    line-height: 1.6;
}

/* ==========================================================================
   Kategori filtreleri — ortalanmış
   ========================================================================== */

.filters {
    position: relative;
    z-index: 20;
    padding: 6px 0 26px;
}

.filters-track {
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 var(--pad);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
}

.chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: color .16s var(--ease), border-color .16s var(--ease), background .16s var(--ease);
}

.chip:hover {
    color: #fff;
    background: rgba(139, 92, 246, .12);
    border-color: var(--accent-line);
}

.chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.chip.is-active:hover { background: #7c4df3; }

/* ==========================================================================
   Video grid
   ========================================================================== */

.grid {
    max-width: var(--shell);
    margin: 0 auto;
    padding: 0 var(--pad) 44px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px 18px;
}

.card { min-width: 0; }

/* Kartın tamamı tek bir buton — her yeri tıklanabilir */
.card-btn {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    aspect-ratio: var(--card-ratio);
    cursor: pointer;
    text-align: left;
    transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
    -webkit-tap-highlight-color: transparent;
}

@supports not (aspect-ratio: 1 / 1) {
    .card-btn { height: 0; padding-bottom: 100%; }
}

.card-img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--surface-2);
}

/* Kapak görseli olmayan kartlar — CSS ile üretilir, ek istek oluşmaz.
   Tonlar video id'sine göre değişir, grid monoton görünmez. */
.card-fallback::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(60% 45% at 50% 32%, rgba(139, 92, 246, .22), transparent 70%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 52px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 52px);
}

.card-fallback.tone-0 { background: linear-gradient(160deg, #2a1a4a, #0c0c11); }
.card-fallback.tone-1 { background: linear-gradient(160deg, #1c1440, #0f0b1a); }
.card-fallback.tone-2 { background: linear-gradient(160deg, #3a1d50, #0d0c13); }
.card-fallback.tone-3 { background: linear-gradient(160deg, #241a52, #0a0a0f); }
.card-fallback.tone-4 { background: linear-gradient(160deg, #402159, #111015); }
.card-fallback.tone-5 { background: linear-gradient(160deg, #1a1638, #0b0b10); }

/* Alt tarafta metni okunur kılan koyu degrade */
.card-shade {
    position: absolute;
    inset: auto 0 0 0;
    height: 58%;
    background: linear-gradient(180deg, rgba(6, 6, 8, 0) 0%, rgba(6, 6, 8, .58) 55%, rgba(6, 6, 8, .92) 100%);
    pointer-events: none;
}

.card-btn:hover {
    transform: scale(1.02);
    border-color: var(--accent-line);
    box-shadow: var(--shadow);
    z-index: 2;
}

/* Görsel büyütme yalnızca fare üzerindeyken uygulanır; sürekli bir
   transform bırakılmaz ki kartlar boşuna katman oluşturmasın. */
.card-btn:hover .card-img { transform: scale(1.03); }
.card-btn:hover img.card-img { transition: transform .35s var(--ease); }

/* Ortadaki play butonu */
.card-play {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 54px; height: 54px;
    display: grid; place-items: center;
    border-radius: 50%;
    /* backdrop-filter kullanılmaz: her kartta bir bulanıklık katmanı
       oluşturmak kaydırmayı belirgin şekilde yavaşlatıyor. */
    background: rgba(10, 10, 14, .62);
    border: 1px solid rgba(255, 255, 255, .26);
    color: #fff;
    transition: background .22s var(--ease), border-color .22s var(--ease), transform .22s var(--ease);
    z-index: 2;
}

.card-play svg { width: 19px; height: 19px; margin-left: 2px; }

.card-btn:hover .card-play,
.card-btn:focus-visible .card-play {
    background: var(--accent);
    border-color: var(--accent-hi);
    transform: translate(-50%, -50%) scale(1.05);
}

/* Öne çıkan işareti */
.card-star {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 3;
    width: 26px; height: 26px;
    display: grid; place-items: center;
    border-radius: 8px;
    background: rgba(139, 92, 246, .9);
    color: #fff;
    box-shadow: 0 4px 14px -4px rgba(0, 0, 0, .8);
}
.card-star svg { width: 14px; height: 14px; }

/* Etiket + başlık — görselin üzerinde, sol altta */
.card-info {
    position: absolute;
    inset: auto 0 0 0;
    z-index: 2;
    display: block;
    padding: 12px 13px 13px;
}

.card-tag {
    display: inline-block;
    max-width: 100%;
    padding: 3px 9px;
    margin-bottom: 7px;
    border-radius: 7px;
    /* Kart başına bulanıklık yok — düz yarı saydam zemin yeterli okunurluk verir */
    background: rgba(93, 55, 190, .72);
    border: 1px solid rgba(167, 139, 250, .45);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: #ede9ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
}

.card-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .5);
}

/* ==========================================================================
   Boş durum
   ========================================================================== */

.empty {
    max-width: 380px;
    margin: 24px auto 80px;
    padding: 0 var(--pad);
    text-align: center;
    color: var(--muted);
}
.empty svg { width: 40px; height: 40px; margin: 0 auto 14px; color: var(--muted-2); }
.empty-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }
.empty-text { margin: 6px 0 0; font-size: 14px; }

/* ==========================================================================
   Daha fazla
   ========================================================================== */

.load-more-wrap {
    display: grid;
    place-items: center;
    padding: 0 var(--pad) 72px;
    min-height: 34px;
}

.load-more {
    height: 40px;
    padding: 0 24px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .18s var(--ease), border-color .18s var(--ease);
}
.load-more:hover { background: rgba(139, 92, 246, .14); border-color: var(--accent-line); }
.load-more:disabled { opacity: .5; cursor: default; }

.spinner {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .14);
    border-top-color: var(--accent);
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==========================================================================
   Modal video oynatıcı
   ========================================================================== */

.modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: grid;
    place-items: center;
    padding: 26px;
}
.modal[hidden] { display: none; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(4, 4, 6, .9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    animation: fade .2s var(--ease) both;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.modal-body {
    position: relative;
    z-index: 1;
    animation: pop .24s var(--ease) both;
}
@keyframes pop {
    from { opacity: 0; transform: translateY(10px) scale(.975); }
    to   { opacity: 1; transform: none; }
}

/* Dikey 9:16 oynatıcı paneli */
.player {
    position: relative;
    aspect-ratio: 9 / 16;
    height: min(84dvh, 760px);
    max-width: calc(100vw - 52px);
    background: #000;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

@supports not (aspect-ratio: 9 / 16) {
    .player { width: 420px; height: 747px; }
}

/* Video kırpılmaz, panele sığar */
.player video {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
}

.player:fullscreen,
.player:-webkit-full-screen {
    width: 100vw; height: 100vh;
    max-width: none;
    aspect-ratio: auto;
    border: 0; border-radius: 0;
}

/* Harici oynatıcı (YouTube / Vimeo) */
.player-embed {
    position: absolute;
    inset: 0;
    background: #000;
    z-index: 2;
}
.player-embed[hidden] { display: none; }

.player-embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Harici kaynakta kendi kontrol çubuğumuz gösterilmez; üst şerit
   (başlık + kapat) her zaman görünür kalır. */
.player.is-embed .player-top {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto;
    /* iframe üstünde okunabilir kalması için biraz daha koyu */
    background: linear-gradient(180deg, rgba(0, 0, 0, .82), transparent);
}
.player.is-embed .player-title { padding-right: 4px; }

/* Video dosyası olmayan demo kartları */
.player-missing {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 4px;
    padding: 34px;
    text-align: center;
    background: linear-gradient(165deg, #171233, #0a0a0f);
    color: var(--muted);
}
.player-missing[hidden] { display: none; }
.player-missing svg { width: 40px; height: 40px; margin-bottom: 10px; color: var(--accent-hi); }
.player-missing p { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.player-missing span { font-size: 13px; max-width: 260px; line-height: 1.55; }

/* --- Üst şerit: başlık + kapat --- */

/* Üst şerit (başlık + kapat) her katmanın üstünde durur.
   Katman sırası: embed 2 · büyük play 3 · yükleniyor 4 · kontroller 5 · üst şerit 6 */
.player-top {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 6;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 12px 26px;
    background: linear-gradient(180deg, rgba(0, 0, 0, .72), transparent);
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}

.player-title {
    flex: 1 1 auto;
    min-width: 0;
    padding-top: 6px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.35;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modal-close {
    flex: 0 0 auto;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 9px;
    background: rgba(18, 18, 22, .72);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    cursor: pointer;
    transition: background .16s var(--ease), border-color .16s var(--ease);
}
.modal-close:hover { background: var(--accent); border-color: var(--accent); }
.modal-close svg { width: 15px; height: 15px; }

/* Büyük play butonu */
.player-bigplay {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 66px; height: 66px;
    display: grid; place-items: center;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 50%;
    background: rgba(139, 92, 246, .92);
    color: #fff;
    cursor: pointer;
    z-index: 3;
    transition: transform .2s var(--ease), background .2s var(--ease);
    box-shadow: 0 12px 34px -10px rgba(0, 0, 0, .9);
}
.player-bigplay svg { width: 25px; height: 25px; margin-left: 3px; }
.player-bigplay:hover { transform: translate(-50%, -50%) scale(1.05); background: var(--accent); }
.player-bigplay[hidden] { display: none; }

.player-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 14px;
    background: rgba(0, 0, 0, .34);
    z-index: 4;
    /* Yalnızca bilgi amaçlı bir katman: tıklamaları ASLA yakalamamalı.
       Aksi hâlde video ara belleğe alınırken kapatma (X) butonunun üstünü
       kapatıyor ve kullanıcı modalı kapatamıyordu. */
    pointer-events: none;
}
.player-loading[hidden] { display: none; }

/* Uzun süren ara belleğe almada bilgi metni */
.player-loading::after {
    content: "";
    max-width: 240px;
    padding: 0 20px;
    text-align: center;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--muted);
}
.player-loading.is-slow::after {
    content: "Video yükleniyor… Dosya büyükse ilk açılış biraz sürebilir.";
}

/* --- Kontroller --- */

.controls {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    z-index: 5;
    padding: 34px 12px 12px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55) 40%, rgba(0, 0, 0, .88));
    transition: opacity .25s var(--ease), transform .25s var(--ease);
}

/* Oynarken ve fare hareketsizken kontroller kaybolur */
.player.is-idle .controls,
.player.is-idle .player-top {
    opacity: 0;
    pointer-events: none;
}
.player.is-idle .controls { transform: translateY(6px); }
.player.is-idle .player-top { transform: translateY(-6px); }

/* İlerleme çubuğu */
.progress {
    position: relative;
    height: 16px;
    margin: 0 2px 2px;
    display: flex;
    align-items: center;
    cursor: pointer;
    touch-action: none;
}

.progress::before {
    content: "";
    position: absolute;
    left: 0; right: 0;
    height: 4px;
    border-radius: 99px;
    background: rgba(255, 255, 255, .24);
}

.progress-buffer {
    position: absolute;
    left: 0;
    height: 4px;
    width: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, .3);
}

.progress-played {
    position: absolute;
    left: 0;
    height: 4px;
    width: 0;
    border-radius: 99px;
    background: var(--accent);
}

.progress-knob {
    position: absolute;
    right: -6px; top: 50%;
    transform: translateY(-50%) scale(0);
    width: 12px; height: 12px;
    border-radius: 50%;
    background: #fff;
    transition: transform .16s var(--ease);
}
.progress:hover .progress-knob,
.progress:focus-visible .progress-knob,
.progress.is-dragging .progress-knob { transform: translateY(-50%) scale(1); }

.controls-row {
    display: flex;
    align-items: center;
    gap: 2px;
}

.ctrl {
    width: 34px; height: 34px;
    display: grid; place-items: center;
    flex: 0 0 auto;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #fff;
    cursor: pointer;
    transition: background .15s var(--ease);
}
.ctrl:hover { background: rgba(255, 255, 255, .14); }
.ctrl svg { width: 17px; height: 17px; }
.ctrl svg[hidden] { display: none; }

.volume { display: flex; align-items: center; }

.volume-slider {
    width: 0;
    opacity: 0;
    height: 4px;
    margin: 0;
    accent-color: var(--accent);
    background: rgba(255, 255, 255, .24);
    border-radius: 99px;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: width .22s var(--ease), opacity .22s var(--ease), margin .22s var(--ease);
}
.volume:hover .volume-slider,
.volume:focus-within .volume-slider { width: 62px; opacity: 1; margin: 0 6px 0 2px; }

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 11px; height: 11px;
    border-radius: 50%;
    background: #fff;
    border: 0;
}
.volume-slider::-moz-range-thumb {
    width: 11px; height: 11px;
    border-radius: 50%;
    background: #fff;
    border: 0;
}

.time {
    padding: 0 8px;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: rgba(255, 255, 255, .9);
    white-space: nowrap;
}

.controls-spacer { flex: 1 1 auto; }

/* Oynatma hızı menüsü */
.speed { position: relative; }

.speed-menu {
    position: absolute;
    bottom: calc(100% + 8px);
    right: 0;
    min-width: 116px;
    padding: 6px;
    border: 1px solid var(--line-2);
    border-radius: 11px;
    background: rgba(20, 20, 25, .97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    display: grid;
    gap: 2px;
}
.speed-menu[hidden] { display: none; }

.speed-menu button {
    width: 100%;
    padding: 7px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background .14s var(--ease), color .14s var(--ease);
}
.speed-menu button:hover { background: rgba(255, 255, 255, .09); color: #fff; }
.speed-menu button.is-on { background: var(--accent); color: #fff; }

body.modal-open { overflow: hidden; }

/* ==========================================================================
   Duyarlı düzen
   ========================================================================== */

/* Çok geniş ekran — 5 sütun */
@media (min-width: 1620px) {
    :root { --shell: 1560px; }
    .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Tablet — 3 sütun */
@media (max-width: 1080px) {
    .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Küçük tablet — 2 sütun */
@media (max-width: 820px) {
    :root { --pad: 20px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Telefon — 2 sütun, arama header altında tam genişlik,
   kategoriler yatay kaydırmalı */
@media (max-width: 700px) {
    :root { --header-h: 60px; --pad: 16px; }

    .header-inner {
        flex-wrap: wrap;
        gap: 11px 14px;
        padding: 11px var(--pad);
    }

    .search { flex: 1 1 100%; margin-left: 0; }
    .search input { height: 42px; }

    .hero { padding: 30px var(--pad) 20px; }
    .hero-text { margin-top: 10px; }

    .filters { padding: 2px 0 20px; }

    /* Mobilde ortalamak yerine kaydırmalı şerit */
    .filters-track {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
        /* Kenarlarda kesilme hissi olmasın */
        padding-bottom: 2px;
    }
    .filters-track::-webkit-scrollbar { display: none; }
    .chip { scroll-snap-align: start; height: 34px; padding: 0 15px; font-size: 13px; }

    .grid { gap: 14px 12px; padding-bottom: 32px; }

    .card-play { width: 44px; height: 44px; }
    .card-play svg { width: 16px; height: 16px; }
    .card-info { padding: 10px 11px 11px; }
    .card-title { font-size: 12.5px; }
    .card-tag { font-size: 10px; padding: 2px 8px; margin-bottom: 6px; }

    /* Dokunmatikte scale yerine sabit kalsın, kaydırma sırasında titremesin */
    .card-btn:hover { transform: none; box-shadow: none; }

    /* Modal tam ekran.
       100vw yerine 100% kullanılır: vw kaydırma çubuğu payını da sayar ve
       bazı tarayıcılarda birkaç piksel taşma/boşluk oluşturur. */
    .modal { padding: 0; }
    .modal-body { width: 100%; height: 100%; }

    .player {
        width: 100%;
        height: 100dvh;
        max-width: none;
        aspect-ratio: auto;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .player video { object-fit: contain; }

    .player-top { padding: 14px 14px 30px; }
    .player-title { font-size: 13px; }
    .controls { padding: 34px 10px calc(12px + env(safe-area-inset-bottom)); }
    .volume-slider { width: 54px; opacity: 1; margin: 0 6px 0 2px; }
    .load-more-wrap { padding-bottom: 56px; }
}

/* Çok küçük ekran — tek sütun.
   360-390px yaygın telefon genişlikleridir, orada 2 sütun korunur. */
@media (max-width: 344px) {
    .grid { grid-template-columns: minmax(0, 1fr); }
    .hero-title { font-size: 25px; }
}

/* Dokunmatik cihazlarda hover efektlerini kapat */
@media (hover: none) {
    .card-btn:hover { transform: none; box-shadow: none; border-color: var(--line); }
    .card-btn:hover .card-play { background: rgba(10, 10, 14, .52); border-color: rgba(255, 255, 255, .26); transform: translate(-50%, -50%); }
    .chip:hover { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
    .volume-slider { width: 54px; opacity: 1; margin: 0 6px 0 2px; }
}

/* Hareket azaltma tercihi */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
