/* Premium tema katmanı: sitenin style.css dosyasından SONRA yüklenir */
html.tm-theme, html.tm-theme body { background: var(--bg); color: var(--text); font-family: var(--tm-font); }
html.tm-theme ::selection { background: var(--accent); color: var(--tm-on-accent); }
html.tm-theme ::-webkit-scrollbar-track { background: var(--bg); }
html.tm-theme ::-webkit-scrollbar-thumb { background: var(--bg-elev); }
html.tm-theme ::-webkit-scrollbar-thumb:hover { background: var(--accent); }
.tm-theme a:hover { color: var(--accent); }

/* Header */
.tm-theme .site-header { background: var(--tm-hdr-bg); border-bottom: var(--tm-hdr-border, 1px solid var(--border)); box-shadow: var(--tm-hdr-shadow, none); }
.tm-theme .logo { font-family: var(--tm-font-head); color: var(--tm-logo-color, var(--text)); font-size: var(--tm-logo-size, 22px); letter-spacing: var(--tm-logo-ls, -.5px); text-transform: var(--tm-logo-case, none); font-weight: var(--tm-logo-weight, 800); }
.tm-theme .logo span { color: var(--accent); }
.tm-theme .search-bar input { background: var(--tm-input-bg, var(--bg-elev)); color: var(--text); border: var(--tm-input-border, 1px solid transparent); border-radius: var(--tm-pill, 20px); }
.tm-theme .search-bar input::placeholder { color: var(--text-muted); }
.tm-theme .search-bar button { color: var(--text-dim); }
.tm-theme .btn-pill { border-radius: var(--tm-pill, 20px); color: var(--tm-hdr-text, var(--text)); border-color: var(--tm-btn-border, var(--border)); }
.tm-theme .btn-pill.primary, .tm-theme .btn-pill.primary:hover { color: var(--tm-on-accent); background: var(--accent); border-color: var(--accent); }
.tm-theme .btn-pill.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

/* Kategori menüsü */
.tm-theme .nav-bar { background: var(--tm-nav-bg, var(--bg-card)); border-bottom: var(--tm-nav-border, 1px solid var(--border)); }
.tm-theme .nav-inner a { border-radius: var(--tm-pill-sm, var(--radius)); color: var(--tm-nav-text, var(--text-dim)); text-transform: var(--tm-nav-case, none); letter-spacing: var(--tm-nav-ls, 0); }
.tm-theme .nav-inner a:hover, .tm-theme .nav-inner a.active { background: var(--tm-nav-hover-bg, var(--bg-elev)); color: var(--tm-nav-hover-text, var(--accent)); }

/* Başlıklar ve sekmeler */
.tm-theme .section-title { border-bottom: var(--tm-section-border, 1px solid var(--border)); }
.tm-theme .section-title h2 { font-family: var(--tm-font-head); color: var(--tm-heading, var(--text)); font-size: var(--tm-h2-size, 18px); text-transform: var(--tm-h2-case, none); letter-spacing: var(--tm-h2-ls, -.2px); }
.tm-theme .section-title .sort-tabs a { border-radius: var(--tm-pill-sm, var(--radius)); }
.tm-theme .section-title .sort-tabs a.active, .tm-theme .pagination .active { color: var(--tm-on-accent); background: var(--accent); }
.tm-theme .empty-state h3 { color: var(--text); }

/* Video kartları */
.tm-theme .video-card { background: var(--tm-card-bg, transparent); border: var(--tm-card-border, 0); border-radius: var(--tm-card-radius, var(--radius)); box-shadow: var(--tm-shadow, none); transition: transform .25s, box-shadow .25s, border-color .25s, background-color .25s; }
.tm-theme .video-card:hover { transform: var(--tm-h-transform, translateY(-2px)); box-shadow: var(--tm-shadow-hover, var(--tm-shadow, none)); }
.tm-theme .video-card .thumb-wrap { border-radius: var(--tm-thumb-radius, var(--radius)); }
.tm-theme .video-card .info { padding: var(--tm-card-pad, 10px 2px 0); }
.tm-theme .video-card .info .title { color: var(--tm-title, var(--text)); font-family: var(--tm-font-card, inherit); font-weight: var(--tm-title-weight, 600); }
.tm-theme .video-card:hover .info .title { color: var(--tm-title-hover, var(--accent)); }
.tm-theme .video-card .badge-duration { background: var(--tm-badge-bg, rgba(0,0,0,.85)); color: var(--tm-badge-text, #fff); border-radius: var(--tm-badge-radius, 3px); }
.tm-theme .video-card .badge-hd { background: var(--accent); color: var(--tm-on-accent); border-radius: var(--tm-badge-radius, 3px); }
.tm-theme .video-card .play-overlay .play-icon { background: var(--accent); color: var(--tm-on-accent); border-radius: var(--tm-play-radius, 50%); box-shadow: var(--tm-play-shadow, none); }
.tm-theme .video-card .play-overlay svg { fill: var(--tm-on-accent); }
.tm-theme .video-card .info .meta .source { color: var(--accent); }

/* Kategori kartları */
.tm-theme .category-card { background: #000; border: var(--tm-card-border, 0); border-radius: var(--tm-card-radius, var(--radius)); }
.tm-theme .category-card .label h3 { font-family: var(--tm-font-head); color: #fff; text-transform: var(--tm-h2-case, none); text-shadow: 0 2px 12px rgba(0,0,0,.6); }
.tm-theme .category-card .label .count { color: var(--accent); }
.tm-theme .category-card:hover { box-shadow: 0 0 0 2px var(--accent); }

/* Video sayfası (oynatıcının boyutuna dokunulmaz) */
.tm-theme .player-wrap { border-radius: var(--tm-card-radius, var(--radius)); box-shadow: var(--tm-player-shadow, none); border: var(--tm-card-border, 0); }
.tm-theme .video-info h1 { font-family: var(--tm-font-head); color: var(--tm-heading, var(--text)); text-transform: var(--tm-h1-case, none); }
.tm-theme .video-meta-row { border-bottom-color: var(--border); }
.tm-theme .action-btn { background: var(--bg-elev); color: var(--text); border-radius: var(--tm-pill, 20px); }
.tm-theme .action-btn:hover, .tm-theme .tag-pills a:hover { background: var(--accent); color: var(--tm-on-accent); }
.tm-theme .tag-pills a { background: var(--bg-elev); border-radius: var(--tm-pill, 14px); }
.tm-theme .sidebar h3 { font-family: var(--tm-font-head); color: var(--accent); }
.tm-theme .sidebar-ad { background: var(--bg-card); }
.tm-theme .related-video { border-bottom-color: var(--border); }
.tm-theme .related-video .rt { border-radius: var(--tm-thumb-radius, 4px); }
.tm-theme .related-video:hover .rtitle { color: var(--accent); }

/* Sayfalama */
.tm-theme .pagination a, .tm-theme .pagination span { background: var(--bg-card); border-color: var(--border); border-radius: var(--tm-pill-sm, var(--radius)); }

/* Footer */
.tm-theme .site-footer { background: var(--tm-foot-bg, var(--tm-hdr-bg)); border-top: var(--tm-foot-border, 1px solid var(--border)); }
.tm-theme .footer-col h4 { font-family: var(--tm-font-head); color: var(--accent); }
.tm-theme .footer-warning { background: color-mix(in srgb, var(--accent) 8%, transparent); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.tm-theme .footer-bottom { border-top-color: var(--border); }

/* Yaş doğrulama kutusu */
.tm-theme .age-gate-box { background: var(--bg-card); border-color: var(--border); border-radius: var(--tm-card-radius, var(--radius)); }
.tm-theme .age-gate-box h2 { font-family: var(--tm-font-head); color: var(--accent); }
.tm-theme .age-gate-yes { background: var(--accent); color: var(--tm-on-accent); }
.tm-theme .age-gate-no { background: var(--bg-elev); }

/* Bilgi sayfaları (page.php içindeki sabit renkler) */
.tm-theme article h1 { color: var(--tm-heading, var(--text)) !important; font-family: var(--tm-font-head); }
.tm-theme article h3, .tm-theme article a, .tm-theme article code { color: var(--accent) !important; }

/* ===== Düzenler ===== */
.tm-layout-dense .video-grid { grid-template-columns: repeat(auto-fill, minmax(185px, 1fr)); gap: 14px 10px; }
.tm-layout-dense .video-card .info .title { font-size: 13px; min-height: 34px; }
.tm-layout-dense .category-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

.tm-layout-large .video-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px 20px; }
.tm-layout-large .video-card .info .title { font-size: 15.5px; }
.tm-layout-large .category-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }

.tm-layout-showcase .video-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
@media (min-width: 900px) {
    .tm-layout-showcase .video-grid > .video-card:first-child { grid-column: span 2; grid-row: span 2; }
    .tm-layout-showcase .video-grid > .video-card:first-child .info .title { font-family: var(--tm-font-head); font-size: 22px; min-height: 0; -webkit-line-clamp: 2; }
    .tm-layout-showcase .video-grid > .video-card:first-child .play-overlay { opacity: 1; background: rgba(0,0,0,.15); }
    .tm-layout-showcase .video-grid > .video-card:first-child .play-icon { width: 76px; height: 76px; transform: scale(1); }
}

@media (min-width: 1100px) {
    .tm-layout-sidebar .nav-bar { position: fixed; left: 0; top: var(--header-h); bottom: 0; width: 220px; overflow-y: auto; border-bottom: 0; border-right: 1px solid var(--border); z-index: 90; }
    .tm-layout-sidebar .nav-inner { flex-direction: column; align-items: stretch; height: auto; padding: 16px 12px; gap: 2px; }
    .tm-layout-sidebar .nav-inner a { padding: 10px 14px; }
    .tm-layout-sidebar .container { max-width: none; margin-left: 220px; padding-left: 28px; padding-right: 28px; }
    .tm-layout-sidebar .banner-slot, .tm-layout-sidebar .site-footer { margin-left: 220px; }
    .tm-layout-sidebar .header-inner { max-width: none; }
}

@media (max-width: 640px) {
    .tm-theme .video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px 8px; }
    .tm-layout-large .video-grid { grid-template-columns: 1fr; }
    .tm-theme .logo { font-size: 18px; letter-spacing: 0; flex-shrink: 0; }
    .tm-theme .header-inner { justify-content: flex-start !important; gap: 8px; padding: 0 10px; }
    .tm-theme .search-bar { min-width: 0; }
    .tm-theme .header-actions { flex-shrink: 0; gap: 4px; }
    .tm-theme .btn-pill { padding: 6px 9px; font-size: 11px; }
    .tm-theme .btn-pill:not(.primary) { display: none; }
}
