:root {
  --bg: #0a0a0b;
  --bg-elevated: #141416;
  --panel: #1a1a1e;
  --border: #2a2a30;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --accent: #dc2626;
  --accent-dim: #991b1b;
  --glow: rgba(220, 38, 38, 0.35);
  --ok: #22c55e;
  --radius: 6px;
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

.admin-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100vh;
}

.admin-menu-toggle {
  display: none;
  position: fixed;
  top: 0.85rem;
  left: 0.85rem;
  z-index: 80;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(20, 20, 22, 0.92);
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.admin-menu-toggle span {
  display: block;
  width: 16px;
  height: 2px;
  background: #f4f4f5;
  border-radius: 2px;
}

.admin-sidebar-backdrop {
  display: none;
}

.admin-sidebar {
  background: linear-gradient(180deg, #141416 0%, #0c0c0e 100%);
  border-right: 1px solid var(--border);
  padding: 1.35rem 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-sidebar h1 {
  font-size: 1.2rem;
  letter-spacing: 0.14em;
  margin: 0;
  font-weight: 800;
  text-shadow: 0 0 24px var(--glow);
}

.sidebar-tag {
  margin: 0.2rem 0 1.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #f87171;
  font-weight: 700;
}

.admin-nav a {
  display: block;
  padding: 0.62rem 0.8rem;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 0.28rem;
  font-size: 0.9rem;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: rgba(220, 38, 38, 0.14);
  color: var(--text);
}

.admin-main {
  padding: 1.25rem 1.5rem 3rem;
  overflow-x: auto;
  background:
    radial-gradient(1200px 420px at 10% -10%, rgba(220, 38, 38, 0.08), transparent 55%),
    var(--bg);
}

@media (max-width: 900px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .admin-menu-toggle {
    display: flex;
  }
  .admin-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 70;
  }
  .admin-sidebar-backdrop[hidden] {
    display: none;
  }
  .admin-sidebar {
    display: none;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 75;
    min-height: 100vh;
  }
  .admin-layout.nav-open .admin-sidebar {
    display: flex;
  }
  .admin-main {
    padding-top: 4.2rem;
  }
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.admin-header h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
}

.header-meta {
  margin: 0.25rem 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.catalog-publish-status {
  margin: 0;
  max-width: 16rem;
}

.btn {
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

label {
  display: block;
  font-size: 0.75rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0c0c0e;
  color: var(--text);
  font: inherit;
  margin-bottom: 0.75rem;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 700px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  z-index: 1;
}

/* İçerik düzenleyici katalogun üzerine binsin */
#tab-catalog #editor {
  position: relative;
  z-index: 4;
  margin-bottom: 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th,
td {
  padding: 0.65rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: #0f0f12;
  color: var(--muted);
  font-weight: 600;
}

tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-pro {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.badge-free {
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
}

.badge-ban {
  background: rgba(239, 68, 68, 0.16);
  color: #fca5a5;
}

.badge-wait {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}

.badge-ok {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

tr.user-unverified td {
  background: rgba(245, 158, 11, 0.07);
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.login-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-box {
  width: 100%;
  max-width: 400px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.75rem;
}

.login-box h1 {
  margin: 0 0 0.25rem;
  font-size: 1.25rem;
}

.login-box p {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 1.25rem;
}

.hidden {
  display: none !important;
}

.msg {
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.msg-error {
  background: rgba(220, 38, 38, 0.15);
  color: #fca5a5;
}

.msg-ok {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
}

.row-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.row-actions .btn {
  padding: 0.3rem 0.5rem;
  font-size: 0.75rem;
}

.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: -0.35rem 0 0.5rem;
  line-height: 1.35;
}

.cat-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #0c0c0e;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 3rem;
}

.cat-picker-empty {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.cat-pick-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  font-size: 0.85rem;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.cat-pick-item input {
  width: auto !important;
  margin: 0 !important;
  accent-color: var(--accent);
}

.cat-pick-item:hover {
  border-color: #52525b;
}

.cat-pick-item.is-on {
  border-color: rgba(220, 38, 38, 0.55);
  background: rgba(220, 38, 38, 0.12);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2);
}

.cat-pick-item .cat-pick-id {
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
}

.hero-picker-ui {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.hero-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.hero-order-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0c0c0e;
  overflow: hidden;
}

.hero-order-empty {
  margin: 0;
  padding: 0.85rem 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.hero-order-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.hero-order-item:last-child {
  border-bottom: none;
}

.hero-order-num {
  flex: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.hero-order-text {
  flex: 1;
  min-width: 0;
}

.hero-order-text strong {
  display: block;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-order-text code {
  font-size: 0.65rem;
  color: var(--muted);
}

.hero-order-actions {
  display: flex;
  gap: 0.25rem;
  flex-shrink: 0;
}

.hero-order-actions .btn {
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  min-width: 2rem;
}

.hero-pool-grid {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-height: 280px;
  overflow-y: auto;
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #0c0c0e;
}

.hero-pool-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.45rem 0.55rem;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: background 0.12s, border-color 0.12s;
}

.hero-pool-row:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
}

.hero-pool-row-select {
  align-items: center;
  padding: 0.55rem 0.65rem;
}

.hero-pool-row-select.is-selected {
  border-color: rgba(220, 38, 38, 0.38);
  background: rgba(220, 38, 38, 0.1);
}

.most-select-left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.most-select-text {
  min-width: 0;
}

.most-select-check {
  width: 16px !important;
  height: 16px;
  margin: 0 !important;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.most-select-tag {
  flex-shrink: 0;
  min-width: 2.1rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #a1a1aa;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  background: rgba(255, 255, 255, 0.03);
}

.most-select-tag.is-on {
  color: #fca5a5;
  border-color: rgba(220, 38, 38, 0.45);
  background: rgba(220, 38, 38, 0.16);
}

.hero-pool-meta {
  min-width: 0;
  flex: 1;
}

.hero-pool-meta strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hero-pool-meta span {
  font-size: 0.65rem;
  color: var(--muted);
}

.hero-pool-empty {
  margin: 0;
  padding: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.episode-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem;
  background: #0b0b0d;
}

.episode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.episode-title {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.login-box .login-kicker {
  margin: 0 0 0.15rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f87171;
  font-weight: 800;
}

.login-back {
  margin-top: 1rem;
  font-size: 0.82rem;
}

.login-back a {
  color: #fca5a5;
}

.check-row {
  display: flex !important;
  align-items: center;
  gap: 0.5rem;
  text-transform: none !important;
  letter-spacing: 0 !important;
  font-size: 0.9rem !important;
  color: var(--text) !important;
  margin: 0.35rem 0 0.75rem;
}

.check-row input {
  width: auto !important;
  margin: 0 !important;
  accent-color: var(--accent);
}

.section-note {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.85rem;
}

.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.catalog-toolbar input[type="search"] {
  flex: 1;
  min-width: 180px;
  margin: 0;
}

.catalog-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 52rem;
}

.catalog-lead strong {
  color: #fecaca;
  font-weight: 700;
}

.catalog-board {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.cat-row {
  min-width: 0;
}

.cat-row-hero {
  padding: 1rem 1rem 1.1rem;
  border: 1px solid rgba(220, 38, 38, 0.45);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(220, 38, 38, 0.16), rgba(220, 38, 38, 0.04) 42%, transparent),
    var(--bg-elevated);
  box-shadow: 0 0 40px rgba(220, 38, 38, 0.12);
}

.cat-row-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin-bottom: 0.7rem;
}

.cat-row-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.cat-row-count {
  font-size: 0.78rem;
  color: var(--muted);
}

.cat-row-hint {
  width: 100%;
  margin: 0;
  font-size: 0.78rem;
  color: #fca5a5;
}

.cat-row-scroll {
  display: flex;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.35rem 0.15rem 0.65rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.cat-row-scroll::-webkit-scrollbar {
  height: 6px;
}

.cat-row-scroll::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.cat-row-empty {
  margin: 0;
  padding: 1.1rem 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.acard {
  flex: 0 0 auto;
  width: 220px;
  scroll-snap-align: start;
  border-radius: 8px;
  overflow: visible;
  background: var(--panel);
  border: 1px solid transparent;
  position: relative;
  user-select: none;
}

.cat-row-hero .acard {
  width: 280px;
  cursor: grab;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  touch-action: none;
}

.cat-row-sort .acard {
  cursor: grab;
  touch-action: none;
}

.acard.is-dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.acard.is-drop {
  box-shadow: 0 0 0 2px #dc2626;
}

.acard-media {
  position: relative;
  border-radius: 8px 8px 0 0;
  overflow: hidden;
}

.acard-poster {
  aspect-ratio: 16 / 9;
  object-fit: cover;
  width: 100%;
  height: auto;
  display: block;
  background: #27272a;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.acard-menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 10, 11, 0.78);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  padding: 0;
}

.acard-menu-btn span {
  display: block;
  width: 14px;
  height: 2px;
  background: #f4f4f5;
  border-radius: 2px;
}

.acard-menu-btn:hover,
.acard-menu-btn[aria-expanded="true"] {
  background: rgba(220, 38, 38, 0.92);
  border-color: rgba(255, 255, 255, 0.28);
}

.acard-body {
  padding: 0.55rem 0.6rem 0.65rem;
}

.acard-title {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.15em;
}

.acard-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}

.acard-dur {
  font-size: 0.7rem;
  color: var(--muted);
}

.acard-plus {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.16);
  border-radius: 4px;
  padding: 0.08rem 0.32rem;
}

.acard-menu {
  position: fixed;
  z-index: 200;
  min-width: 220px;
  max-width: min(280px, calc(100vw - 16px));
  padding: 0.4rem 0;
  background: #141416;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
}

.acard-menu[hidden] {
  display: none !important;
}

.acard-menu-label {
  padding: 0.35rem 0.85rem 0.2rem;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.acard-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 0;
  padding: 0.48rem 0.85rem;
  font-size: 0.88rem;
}

.acard-menu button:hover,
.acard-menu button.is-on {
  background: rgba(220, 38, 38, 0.16);
}

.acard-menu button.is-on::after {
  content: " ✓";
  color: #86efac;
}

.acard-menu-sep {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0;
}

.acard-menu .is-danger {
  color: #fca5a5;
}

.editor-card {
  border-color: rgba(220, 38, 38, 0.28);
}

.episode-card {
  margin: 0.5rem 0 0.75rem;
  padding: 0.85rem;
}

.cat-pick-item input[type="radio"] {
  width: auto !important;
  margin: 0 !important;
  accent-color: var(--accent);
}

.comments-feed {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  max-width: 820px;
}

.comment-mod-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.95rem 1rem 1rem;
}

.comment-mod-card.is-hearted {
  border-color: rgba(248, 113, 113, 0.45);
}

.comment-mod-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 0.8rem;
  margin-bottom: 0.4rem;
}

.comment-mod-video {
  color: #fecaca;
  font-weight: 800;
  text-decoration: none;
}

.comment-mod-video:hover {
  text-decoration: underline;
}

.comment-mod-date {
  color: var(--muted);
  font-size: 0.78rem;
}

.comment-mod-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  font-size: 0.88rem;
}

.comment-mod-meta .badge {
  display: inline-block;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
  border: 1px solid rgba(250, 204, 21, 0.35);
}

.comment-mod-meta .badge-heart {
  background: rgba(220, 38, 38, 0.18);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.45);
}

.comment-mod-text {
  margin: 0 0 0.7rem;
  white-space: pre-wrap;
  line-height: 1.45;
}

.comment-mod-replies {
  margin: 0 0 0.75rem;
  padding: 0.55rem 0.7rem;
  border-left: 2px solid rgba(220, 38, 38, 0.45);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.comment-mod-reply p {
  margin: 0.2rem 0 0;
  color: #e4e4e7;
  font-size: 0.9rem;
}

.comment-mod-reply strong {
  margin-right: 0.4rem;
}

.comment-mod-actions,
.comment-mod-replybox {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: flex-end;
}

.comment-mod-replybox {
  margin-top: 0.7rem;
}

.comment-mod-input {
  flex: 1;
  min-width: 180px;
  margin: 0 !important;
}
