:root {
  --bg: #0b0d13;
  --bg-elev: #141824;
  --bg-elev-2: #1c2233;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #e11d48;
  --accent-soft: rgba(225, 29, 72, 0.16);
  --accent-hover: #f43f5e;
  --amber: #fbbf24;
  --emerald: #10b981;
  --blue: #3b82f6;
  --slate: #64748b;
  --radius: 16px;
  --radius-sm: 10px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --nav-height: 68px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overscroll-behavior-y: none;
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

.hidden {
  display: none !important;
}

.app-shell {
  max-width: 820px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ==================== TOP BAR ==================== */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(12px + var(--safe-top)) 16px 12px;
  background: rgba(11, 13, 19, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-icon {
  font-size: 24px;
  line-height: 1;
}

.brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sync-subtitle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.sync-dot.cloud {
  background: var(--emerald);
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.7);
}

.sync-dot.demo {
  background: var(--amber);
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 6px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--bg-elev);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: transform 0.12s ease, background 0.15s ease;
}

.profile-pill:active {
  transform: scale(0.96);
}

.avatar-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
  flex: 1;
  padding: 14px 16px calc(var(--nav-height) + var(--safe-bottom) + 24px);
}

.tab-panel {
  display: none;
  animation: fadeIn 0.18s ease;
}

.tab-panel.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==================== CONTROLS & INPUTS ==================== */
.controls-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  opacity: 0.7;
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 0.15s;
}

.search-input-wrap input:focus {
  border-color: var(--accent);
}

.filter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.segmented {
  display: inline-flex;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.seg-btn.active {
  background: var(--bg-elev-2);
  color: var(--text);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.sort-select {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
}

.chips-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.chips-scroll::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.chip.active {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: #fff;
}

.chip-count {
  font-size: 11px;
  opacity: 0.85;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 999px;
}

/* ==================== POSTER GRID ==================== */
.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

@media (min-width: 560px) {
  .media-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
}

@media (min-width: 780px) {
  .media-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.media-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.media-card:active {
  transform: scale(0.97);
}

.media-card:hover {
  border-color: var(--border-strong);
}

.poster-box {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: linear-gradient(145deg, #1b2030, #10131d);
  overflow: hidden;
}

.poster-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.poster-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  gap: 8px;
}

.poster-fallback span {
  font-size: 30px;
}

.card-badges-top {
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge-watchlist { background: rgba(59, 130, 246, 0.85); color: #fff; }
.badge-watching { background: rgba(245, 158, 11, 0.9); color: #111; }
.badge-watched { background: rgba(16, 185, 129, 0.88); color: #fff; }
.badge-dropped { background: rgba(100, 116, 139, 0.88); color: #fff; }
.badge-dark { background: rgba(11, 13, 19, 0.78); color: #f8fafc; border: 1px solid rgba(255, 255, 255, 0.14); }

.card-info {
  padding: 10px 10px 11px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--amber);
  font-weight: 700;
}

.note-indicator {
  font-size: 11px;
  color: var(--text-muted);
}

/* ==================== DISCOVER / SEARCH ==================== */
.discover-header {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.grow {
  flex: 1;
}

.info-banner {
  background: var(--bg-elev);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
}

.info-banner p {
  margin: 4px 0 0;
  color: var(--text-muted);
  line-height: 1.45;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.section-heading-row h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.discover-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.discover-item {
  display: flex;
  gap: 12px;
  padding: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  align-items: center;
}

.discover-thumb {
  width: 60px;
  height: 90px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-elev-2);
  flex-shrink: 0;
}

.discover-thumb-placeholder {
  width: 60px;
  height: 90px;
  border-radius: 10px;
  background: var(--bg-elev-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.discover-meta {
  flex: 1;
  min-width: 0;
}

.discover-meta h3 {
  margin: 0 0 4px;
  font-size: 15px;
  line-height: 1.25;
}

.discover-sub {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.discover-overview {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* ==================== PICKER (NE İZLESEK) ==================== */
.picker-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 20px;
  text-align: center;
}

.picker-emoji {
  font-size: 34px;
}

.picker-header h2 {
  margin: 6px 0 4px;
  font-size: 21px;
}

.picker-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.picker-filters {
  margin: 18px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
}

.picker-stage {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 14px 0 18px;
}

.picker-placeholder {
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.picker-placeholder span {
  font-size: 48px;
  opacity: 0.7;
}

.picker-winner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: popIn 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.picker-winner img {
  width: 165px;
  height: 245px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  border: 2px solid var(--accent);
}

.picker-winner h3 {
  margin: 0;
  font-size: 20px;
}

.picker-winner-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

@keyframes popIn {
  from { transform: scale(0.88); opacity: 0.4; }
  to { transform: scale(1); opacity: 1; }
}

/* ==================== SETTINGS ==================== */
.settings-section {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}

.settings-section h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.muted-text {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

@media (min-width: 560px) {
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat-box {
  background: var(--bg-elev-2);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.stat-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.members-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.member-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px 6px 7px;
  border-radius: 999px;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.member-chip.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ==================== FORMS & BUTTONS ==================== */
.stack-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.inline-form {
  display: flex;
  gap: 8px;
}

.inline-form input {
  flex: 1;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field span {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

input[type='text'],
input[type='email'],
input[type='password'],
input[type='url'],
select,
textarea {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 11px;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-elev-2);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn-sm {
  padding: 7px 11px;
  font-size: 12px;
  border-radius: 9px;
}

.btn-lg {
  padding: 14px 20px;
  font-size: 16px;
}

.full-width {
  width: 100%;
}

.btn-row {
  display: flex;
  gap: 8px;
}

.icon-btn {
  background: var(--bg-elev-2);
  border: none;
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
}

/* ==================== BOTTOM NAV ==================== */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 820px;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 10px calc(8px + var(--safe-bottom));
  background: rgba(14, 17, 25, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 0;
  cursor: pointer;
  transition: color 0.15s;
}

.nav-icon {
  font-size: 20px;
  line-height: 1.1;
}

.nav-btn.active {
  color: #fb7185;
}

/* ==================== MODALS & DETAIL SHEET ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 22px 22px 0 0;
  padding: 22px 20px calc(22px + var(--safe-bottom));
}

@media (min-width: 640px) {
  .modal-card {
    border-radius: 22px;
    padding: 22px;
  }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-head h2,
.modal-card h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.detail-sheet {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 92dvh;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 24px 24px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 640px) {
  .detail-sheet {
    border-radius: 24px;
  }
}

.sheet-close {
  position: sticky;
  top: 12px;
  float: right;
  margin: 12px 12px -44px 0;
  z-index: 5;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(11, 13, 19, 0.78);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.detail-hero {
  position: relative;
  padding: 22px 18px 16px;
  background-size: cover;
  background-position: center;
}

.detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 13, 19, 0.55) 0%, var(--bg-elev) 100%);
}

.detail-hero-content {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-end;
  padding-top: 26px;
}

.detail-poster {
  width: 102px;
  height: 152px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  flex-shrink: 0;
  background: var(--bg-elev-2);
}

.detail-title-wrap {
  min-width: 0;
}

.detail-title-wrap h2 {
  margin: 0 0 6px;
  font-size: 20px;
  line-height: 1.2;
  word-break: break-word;
}

.detail-sub {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

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

.tag {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
}

.tag-provider {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.detail-content {
  padding: 6px 18px calc(26px + var(--safe-bottom));
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.detail-overview {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: #cbd5e1;
}

.detail-block h3 {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

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

@media (min-width: 440px) {
  .status-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.status-opt {
  padding: 10px 8px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.status-opt.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #fff;
}

/* Dizi Bölüm Listesi & Tik Takibi */
.card-progress-track {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: rgba(11, 13, 19, 0.72);
}

.card-progress-fill {
  height: 100%;
  background: var(--emerald);
  transition: width 0.25s ease;
}

.ep-summary-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.ep-summary-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.ep-summary-top strong {
  color: var(--text);
}

.ep-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--bg-elev-2);
  overflow: hidden;
  margin-bottom: 10px;
}

.ep-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width 0.25s ease;
}

.ep-next-btn {
  width: 100%;
  max-width: 100%;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  white-space: normal;
  text-align: left;
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 10px 13px;
}

.ep-next-btn span:first-child {
  flex: 1;
  min-width: 0;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.ep-next-btn span:last-child {
  flex-shrink: 0;
  white-space: nowrap;
}

.ep-next-btn:hover {
  background: rgba(16, 185, 129, 0.22);
}

.season-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.season-tabs::-webkit-scrollbar {
  display: none;
}

.season-tab {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.season-tab.active {
  background: var(--bg-elev-2);
  border-color: var(--accent);
  color: #fff;
}

.season-tab.done {
  border-color: rgba(16, 185, 129, 0.45);
}

.season-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.link-btn {
  background: none;
  border: none;
  color: #fb7185;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 2px;
}

.episode-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 330px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

.ep-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}

.ep-row.watched {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.22);
}

.ep-row.watched .ep-name {
  color: var(--text-muted);
  text-decoration: line-through;
  text-decoration-color: rgba(148, 163, 184, 0.5);
}

.ep-row-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.ep-num {
  min-width: 34px;
  height: 28px;
  border-radius: 8px;
  background: var(--bg-elev-2);
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.ep-row.watched .ep-num {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
}

.ep-info {
  flex: 1;
  min-width: 0;
  overflow: hidden;
}

.ep-name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.ep-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.ep-check-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: var(--bg-elev);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.ep-check-btn:active {
  transform: scale(0.9);
}

.ep-check-btn.checked {
  background: var(--emerald);
  border-color: var(--emerald);
  color: #06281c;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.45);
}

.ep-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  color: var(--text-muted);
  font-size: 13px;
}

/* Puanlama */
.ratings-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.person-rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  font-size: 13px;
}

.rating-buttons {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

@media (min-width: 440px) {
  .rating-buttons {
    grid-template-columns: repeat(10, 1fr);
  }
}

.rate-btn {
  padding: 9px 0;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.rate-btn.active {
  background: var(--amber);
  color: #111;
  border-color: var(--amber);
}

/* Notlar */
.note-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.note-form-row {
  display: flex;
  gap: 8px;
}

.note-tag-input {
  width: 110px !important;
  flex-shrink: 0;
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 11px 12px;
}

.note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 12px;
}

.note-author {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
}

.note-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.note-ep-tag {
  background: var(--accent-soft);
  color: #fda4af;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 11px;
}

.note-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.note-del-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px 4px;
  font-size: 13px;
}

.note-del-btn:hover {
  color: #f87171;
}

/* Profile Grid */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.profile-choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
}

.profile-choice.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Empty & Spinner & Toast */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-emoji {
  font-size: 42px;
  margin-bottom: 8px;
}

.empty-state h3 {
  margin: 0 0 6px;
  color: var(--text);
}

.empty-state p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.5;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 16px);
  transform: translateX(-50%);
  z-index: 90;
  background: #1f2937;
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-strong);
  max-width: 90vw;
  text-align: center;
}

/* ==================== LOCK SCREEN ==================== */
.lock-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: radial-gradient(circle at top, #1f1224 0%, var(--bg) 65%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lock-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 24px;
  padding: 28px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

.lock-card.shake {
  animation: shake 0.35s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.lock-icon {
  font-size: 38px;
  margin-bottom: 8px;
}

.lock-card h1 {
  margin: 0 0 6px;
  font-size: 21px;
}

.lock-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lock-input-wrap input {
  padding-right: 44px;
  font-size: 15px;
}

.lock-eye-btn {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 6px;
  opacity: 0.75;
}

.lock-error {
  color: #fca5a5;
  font-size: 13px;
  font-weight: 600;
}
