:root,
:root[data-theme="dark"] {
  --bg: #0b0b12;
  --bg-elev: #13131d;
  --card: #181826;
  --card-hover: #20202e;
  --border: #26263a;
  --border-strong: #353549;
  --text: #f1f1f5;
  --muted: #9797a8;
  --muted-2: #6c6c80;
  --accent: #ff3d71;
  --accent-2: #ff7a9b;
  --accent-glow: rgba(255, 61, 113, 0.35);
  --success: #22c55e;
  --warning: #f59e0b;
  --sidebar-w: 240px;
  --topbar-h: 64px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.3);
  --topbar-bg: rgba(11, 11, 18, 0.85);
  --hero-overlay: rgba(11, 11, 18, 0.95);
  --body-bg-radial-1: rgba(255, 61, 113, 0.08);
  --body-bg-radial-2: rgba(99, 102, 241, 0.08);
}

:root[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-elev: #ffffff;
  --card: #ffffff;
  --card-hover: #f1f2f7;
  --border: #e5e7ee;
  --border-strong: #cfd1dc;
  --text: #1a1a22;
  --muted: #5e5e70;
  --muted-2: #8d8d9f;
  --accent: #e11d48;
  --accent-2: #be123c;
  --accent-glow: rgba(225, 29, 72, 0.2);
  --success: #16a34a;
  --warning: #d97706;
  --shadow-lg: 0 12px 40px rgba(18, 18, 40, 0.12);
  --shadow-md: 0 4px 16px rgba(18, 18, 40, 0.08);
  --topbar-bg: rgba(255, 255, 255, 0.85);
  --hero-overlay: rgba(247, 247, 251, 0.95);
  --body-bg-radial-1: rgba(225, 29, 72, 0.08);
  --body-bg-radial-2: rgba(79, 70, 229, 0.06);
}

:root {
  color-scheme: dark;
}

:root[data-theme="light"] {
  color-scheme: light;
}

.topbar, .sidebar, .main, .anime-card, .btn, .search, .server-btn, .genre-chip, body, .icon-btn, .nav-link, .ep-list-item, .player-toolbar, .quality-group, .badge {
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background:
    radial-gradient(circle at 10% -10%, var(--body-bg-radial-1), transparent 40%),
    radial-gradient(circle at 90% 0%, var(--body-bg-radial-2), transparent 40%),
    var(--bg);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  cursor: pointer;
}

input {
  background: none;
  border: none;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  outline: none;
}

/* ============ Topbar ============ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1600px;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  padding: 8px;
  border-radius: 8px;
  color: var(--text);
}

.menu-toggle:hover { background: var(--card); }

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.logo-img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
  flex-shrink: 0;
  background: var(--card);
}

.logo-accent {
  color: var(--accent);
}

.search {
  position: relative;
  flex: 1;
  max-width: 520px;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 6px 0 16px;
  height: 42px;
  transition: border-color 0.15s, background 0.15s;
}

.search:focus-within {
  border-color: var(--accent);
  background: var(--bg-elev);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-icon {
  color: var(--muted);
  flex-shrink: 0;
}

.search input {
  flex: 1;
  height: 100%;
  padding: 0;
  min-width: 0;
}

.search input::placeholder { color: var(--muted-2); }
.search input::-webkit-search-cancel-button { display: none; }

.search-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  transition: all 0.15s;
  flex-shrink: 0;
}

.search-clear:hover {
  background: var(--card-hover);
  color: var(--text);
}

.search-btn {
  height: 30px;
  padding: 0 16px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  transition: background 0.15s;
  flex-shrink: 0;
}

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

/* Search suggestions dropdown */
.search-suggest {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 420px;
  overflow-y: auto;
  z-index: 50;
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 4px;
  transition: background 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
}

.suggest-item:hover, .suggest-item.active {
  background: var(--card);
}

.suggest-poster {
  width: 44px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--card);
}

.suggest-body {
  flex: 1;
  min-width: 0;
}

.suggest-title {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggest-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.suggest-footer {
  padding: 10px 16px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  text-align: center;
  cursor: pointer;
  transition: color 0.15s;
}

.suggest-footer:hover { color: var(--accent); }

.suggest-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.suggest-state .mini-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}

/* Mobile search overlay */
.mobile-search {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-h);
  z-index: 21;
  background: var(--topbar-bg, var(--bg-elev));
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  animation: slideDown 0.22s ease-out;
}

.mobile-search[hidden] {
  display: none !important;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.search-inline {
  flex: 1;
  max-width: none;
  margin: 0;
  width: auto;
}

.search-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.search-close:hover,
.search-close:focus-visible {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.search-mobile-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.search-mobile-btn:hover,
.search-mobile-btn:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.search-mobile-btn:active { transform: scale(0.94); }

/* Mobile suggest dropdown */
.mobile-search .search-suggest {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--topbar-h));
  border-radius: 0;
  border-left: 0;
  border-right: 0;
  margin-top: 0;
}

/* ============ Sidebar ============ */
.sidebar {
  position: fixed;
  top: var(--topbar-h);
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  overflow-y: auto;
  z-index: 30;
  display: flex;
  flex-direction: column;
}

.sidebar-nav {
  flex: 1;
}

.nav-section + .nav-section { margin-top: 20px; }

.nav-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 12px 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.15s, color 0.15s;
}

.nav-link:hover {
  background: var(--card);
  color: var(--text);
}

.nav-link.active {
  background: linear-gradient(90deg, var(--accent-glow), transparent);
  color: var(--text);
  position: relative;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.sidebar-footer {
  padding: 16px 12px 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--muted);
}

.sidebar-footer a { color: var(--accent); }
.sidebar-footer .muted { color: var(--muted-2); margin-top: 4px; }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 25;
}

/* ============ Main ============ */
.main {
  margin-left: var(--sidebar-w);
  padding: 32px 28px 64px;
  min-height: calc(100vh - var(--topbar-h));
  max-width: 1600px;
}

/* ============ Hero ============ */
.hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 40px;
  aspect-ratio: 21 / 9;
  max-height: 480px;
  background: var(--card);
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.5s;
  display: flex;
  align-items: flex-end;
}

.hero-slide.active { opacity: 1; }

.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-image: var(--bg-img);
  filter: blur(1px) brightness(0.6);
  transform: scale(1.05);
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(11, 11, 18, 0.95) 0%, rgba(11, 11, 18, 0.3) 60%, transparent 100%);
}

/* Hero content keeps light text regardless of theme (bg is dark overlay) */
.hero-content, .hero-content * {
  color: #f1f1f5 !important;
}
.hero-content .hero-meta span,
.hero-content .btn-ghost { color: rgba(241,241,245,0.85) !important; }

.hero-content {
  position: relative;
  z-index: 1;
  padding: 32px;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  align-self: flex-start;
}

.hero-title {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

.hero-dots {
  position: absolute;
  bottom: 16px;
  right: 20px;
  display: flex;
  gap: 6px;
  z-index: 2;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: all 0.2s;
  cursor: pointer;
}

.hero-dot.active {
  background: var(--accent);
  width: 24px;
  border-radius: 4px;
}

/* ============ Buttons ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
  border: 1px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ============ Sections ============ */
.section {
  margin-bottom: 40px;
}

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

.section-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  width: 4px;
  height: 20px;
  background: var(--accent);
  border-radius: 2px;
}

.section-link {
  font-size: 13px;
  color: var(--muted);
  transition: color 0.15s;
}

.section-link:hover { color: var(--accent); }

/* ============ Anime grid ============ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 20px 16px;
}

.grid-sm {
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px 12px;
}

.anime-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
  display: flex;
  flex-direction: column;
  position: relative;
}

.anime-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  background: var(--card-hover);
}

.anime-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #000;
}

.anime-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.anime-card:hover .anime-poster img {
  transform: scale(1.05);
}

.anime-poster-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: #fff;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  z-index: 2;
  backdrop-filter: blur(4px);
}

.anime-poster-score {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #ffd84d;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 3px;
  backdrop-filter: blur(4px);
}

.anime-poster-type {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
  backdrop-filter: blur(4px);
}

.anime-body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.anime-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
}

.anime-meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.anime-meta .status {
  color: var(--accent-2);
  font-weight: 600;
}

/* ============ Detail page ============ */
.detail-hero {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 32px;
  color: #f1f1f5;
}

.detail-hero .detail-synopsis { color: rgba(241, 241, 245, 0.8); }
.detail-hero .detail-japanese { color: rgba(241, 241, 245, 0.7); }
.detail-hero .stat label { color: rgba(241, 241, 245, 0.55); }
.detail-hero .stat .value { color: #f1f1f5; }
.detail-hero .badge { color: #f1f1f5; border-color: rgba(255, 255, 255, 0.15); }

/* Buttons inside the hero: hero has dark overlay regardless of theme, so force light-on-dark */
.detail-hero .btn-outline {
  color: #f1f1f5;
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
.detail-hero .btn-outline:hover {
  color: #fff;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.12);
}
.detail-hero .fav-btn-lg {
  color: #f1f1f5;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.06);
}
.detail-hero .fav-btn-lg:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: var(--accent);
}
.detail-hero .fav-btn-lg.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.detail-hero .fav-btn-lg.active:hover { background: var(--accent-2); }

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(24px) brightness(0.4);
  transform: scale(1.1);
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,11,18,0.6) 0%, rgba(11,11,18,0.9) 100%);
}

.detail-hero-content {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 32px;
  padding: 32px;
  align-items: start;
}

.detail-poster {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 2/3;
  box-shadow: var(--shadow-lg);
  background: var(--card);
}

.detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-info h1 {
  font-family: 'Poppins', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 8px;
}

.detail-japanese {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 16px;
}

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

.badge.accent {
  background: var(--accent-glow);
  color: var(--accent-2);
  border-color: var(--accent);
}

.badge.gold {
  background: rgba(255, 216, 77, 0.15);
  color: #ffd84d;
  border-color: rgba(255, 216, 77, 0.3);
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.stat label {
  display: block;
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

.stat .value {
  font-size: 14px;
  font-weight: 600;
}

.detail-synopsis {
  color: var(--muted);
  line-height: 1.7;
  font-size: 14px;
}

.detail-synopsis p + p { margin-top: 10px; }

.detail-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}

/* Episode list */
.episodes-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.episodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.ep-btn {
  padding: 12px 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  transition: all 0.15s;
  text-align: center;
}

.ep-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

/* ============ Watch page ============ */
.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
}

.player-wrap iframe,
.player-wrap video {
  width: 100%;
  height: 100%;
  border: 0;
}

.player-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 16px;
}

.watch-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  margin: 16px 0 4px;
  line-height: 1.25;
}

.watch-meta {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.watch-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.server-panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}

.server-panel h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.quality-group {
  margin-bottom: 12px;
}

.quality-label {
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
  font-weight: 700;
}

.server-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.server-item {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--card);
  transition: border-color 0.15s;
}

.server-item:hover { border-color: var(--accent); }

.server-btn {
  padding: 6px 12px;
  background: transparent;
  border: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s;
}

.server-btn:hover { color: var(--text); }

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

.server-newtab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--border);
  color: var(--muted);
  transition: all 0.15s;
  cursor: pointer;
}

.server-newtab:hover {
  background: var(--card-hover);
  color: var(--accent);
}

.server-hint {
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 12px;
}

/* Player toolbar */
.player-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  flex-wrap: wrap;
}

.player-toolbar-left,
.player-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

.player-toolbar-left {
  font-weight: 600;
  color: var(--text);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  transition: all 0.15s;
  cursor: pointer;
}

.btn-icon:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* when toolbar is directly above player, blend borders */
.player-toolbar + .player-wrap {
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: 0;
}

.player-hint {
  font-size: 12px;
  color: var(--muted);
  padding: 10px 12px;
  margin-bottom: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
}

.player-hint strong { color: var(--warning); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  padding: 10px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 100;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.watch-sidebar {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  max-height: calc(100vh - var(--topbar-h) - 32px);
  overflow-y: auto;
}

.watch-sidebar h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.ep-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ep-list-item {
  padding: 10px 12px;
  background: var(--card);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ep-list-item:hover {
  background: var(--card-hover);
}

.ep-list-item.active {
  background: var(--accent);
  color: #fff;
}

/* ============ Schedule ============ */
.schedule-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.schedule-tab {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: var(--card);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.15s;
}

.schedule-tab:hover { color: var(--text); }

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

/* Genres list */
.genre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.genre-chip {
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  transition: all 0.15s;
}

.genre-chip:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent-2);
  transform: translateY(-2px);
}

/* ============ Pagination ============ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 32px;
}

.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  color: var(--muted);
  transition: all 0.15s;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--text);
}

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

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

/* ============ Loader / states ============ */
.loader-full {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 0;
  width: 100%;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-hover) 50%, var(--card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--radius);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty, .error-state {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
}

.error-state {
  color: #ff6b6b;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Page header */
.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.page-header p {
  color: var(--muted);
  font-size: 14px;
}

.breadcrumb {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}

.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { color: var(--muted-2); }

/* ============ Responsive ============ */
/* ============ Favorite button on card ============ */
.fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #fff;
  border: 0;
  z-index: 2;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, color 0.15s;
  opacity: 0;
}

.anime-card:hover .fav-btn { opacity: 1; }

/* always visible on touch devices */
@media (hover: none) {
  .fav-btn { opacity: 1; background: rgba(0, 0, 0, 0.45); }
}

.fav-btn:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--accent);
  transform: scale(1.08);
}

.fav-btn.active {
  opacity: 1;
  background: var(--accent);
  color: #fff;
  animation: favPop 0.4s ease;
}

.fav-btn.active svg { fill: currentColor; }

@keyframes favPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* Large fav button on detail page */
.fav-btn-lg {
  position: static;
  width: auto;
  height: auto;
  border-radius: 8px;
  opacity: 1;
  padding: 10px 16px;
  background: transparent;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fav-btn-lg .fav-label-remove { display: none; }
.fav-btn-lg.active .fav-label-add { display: none; }
.fav-btn-lg.active .fav-label-remove { display: inline; }

.fav-btn-lg.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.fav-btn-lg.active svg { fill: currentColor; }

.fav-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.fav-actions .btn { padding: 8px 14px; font-size: 13px; }

/* ============ Theme toggle + icon button ============ */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }

[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* Nav badge for favorite count */
.nav-link {
  position: relative;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  min-width: 22px;
  text-align: center;
}

/* ============ Light mode tweaks ============ */
[data-theme="light"] .skeleton {
  background: linear-gradient(90deg, #eef0f6 0%, #e0e3eb 50%, #eef0f6 100%);
}

[data-theme="light"] .anime-poster-badge,
[data-theme="light"] .anime-poster-score,
[data-theme="light"] .anime-poster-type {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
}

[data-theme="light"] .topbar { box-shadow: 0 1px 3px rgba(18, 18, 40, 0.04); }

[data-theme="light"] .player-wrap { background: #1a1a22; }

[data-theme="light"] .player-hint {
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.25);
}

[data-theme="light"] .ep-list-item.active {
  background: var(--accent);
  color: #fff;
}

/* ============ Responsive ============ */
@media (max-width: 1280px) {
  .watch-layout {
    grid-template-columns: 1fr 280px;
  }
}

@media (max-width: 1024px) {
  .watch-layout {
    grid-template-columns: 1fr;
  }
  .watch-sidebar {
    position: static;
    max-height: 400px;
  }
  .topbar-inner { gap: 10px; }
  .search { max-width: 360px; }
  .detail-hero-content { gap: 24px; }
}

@media (max-width: 768px) {
  :root {
    --topbar-h: 58px;
  }

  .menu-toggle { display: inline-flex; }
  .topbar-inner > .search { display: none; }
  /* sticky search bar replaces the mobile icon — icon hidden now */
  .search-mobile-btn { display: none; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-overlay.open { display: block; }

  .main {
    margin-left: 0;
    padding: 20px 16px 48px;
  }

  .hero { aspect-ratio: 16 / 11; min-height: 320px; }
  .hero-content { padding: 20px; gap: 10px; }
  .hero-title { font-size: 1.4rem; }
  .hero-meta { font-size: 12px; }
  .hero-synopsis { -webkit-line-clamp: 2; line-clamp: 2; font-size: 13px; }

  .grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px 10px;
  }

  .anime-title { font-size: 12px; }
  .icon-btn { width: 38px; height: 38px; }

  .detail-hero-content {
    grid-template-columns: 1fr;
    padding: 20px;
    gap: 20px;
  }

  .detail-poster {
    max-width: 180px;
    margin: 0 auto;
  }

  .detail-info { text-align: center; }
  .detail-badges { justify-content: center; }
  .detail-actions { justify-content: center; }
  .detail-stats { grid-template-columns: repeat(2, 1fr); }

  .episodes-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }

  .section-title { font-size: 1.1rem; }
  .page-header h1 { font-size: 1.4rem; }

  /* Watch page */
  .player-toolbar { padding: 8px; }
  .btn-icon { padding: 8px 10px; }
  .btn-icon span { display: none; }
  .player-toolbar-right .btn-icon { width: 38px; padding: 0; justify-content: center; }
  .watch-title { font-size: 1.1rem; }
  .watch-nav { flex-wrap: wrap; }
  .watch-nav .btn { flex: 1 1 calc(50% - 4px); justify-content: center; font-size: 13px; padding: 10px 12px; }
}

@media (max-width: 600px) {
  .detail-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .detail-actions { flex-direction: column; }
  .detail-actions .btn { width: 100%; justify-content: center; }
  .fav-actions .btn { flex: 1 1 calc(50% - 4px); }

  .schedule-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .schedule-tab { flex-shrink: 0; }

  .quality-group { padding: 10px; }
  .server-item { font-size: 11px; }
  .server-btn { padding: 8px 10px; }

  .ep-list { max-height: 360px; }

  /* Bigger touch targets for nav links */
  .nav-link { padding: 12px 14px; font-size: 14px; }
}

@media (max-width: 480px) {
  .main { padding: 16px 12px 40px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
  .anime-card { font-size: 12px; }
  .anime-title { font-size: 12px; min-height: 2.4em; }
  .anime-meta { font-size: 10px; }
  .anime-poster-badge, .anime-poster-score, .anime-poster-type { font-size: 9px; padding: 3px 6px; }
  .hero-actions .btn { padding: 8px 12px; font-size: 12px; }
  .hero-actions { flex-wrap: wrap; }
  .hero-title { font-size: 1.2rem; }
  .hero-synopsis { display: none; }
  .hero-content { padding: 14px; }

  .topbar-inner { padding: 0 12px; gap: 8px; }
  .logo-text { font-size: 16px; }
  .icon-btn { width: 36px; height: 36px; }

  /* Watch */
  .player-hint { font-size: 11px; padding: 8px 10px; }
  .quality-label { font-size: 11px; }
  .watch-nav .btn { font-size: 12px; padding: 9px 10px; }
}

@media (max-width: 380px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .episodes-grid { grid-template-columns: repeat(3, 1fr); }
}



/* ============ Welcome Modal ============ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeIn 0.25s ease;
}

.modal-backdrop[hidden] {
  display: none !important;
}

/* ============ Sticky search bar (mobile) ============ */
.sticky-search {
  position: sticky;
  top: var(--topbar-h);
  z-index: 18;
  padding: 8px 12px;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* Desktop: hide sticky search bar (desktop already has topbar search) */
@media (min-width: 769px) {
  .sticky-search { display: none; }
}

.search-sticky-form {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  max-width: none;
  width: 100%;
}

.search-sticky-form input[type="search"] {
  flex: 1;
  min-width: 0;
}

.sticky-search .search-suggest {
  position: absolute;
  top: calc(100% + 1px);
  left: 0;
  right: 0;
  margin: 0;
  max-height: calc(100vh - var(--topbar-h) - 56px - 12px);
  border-radius: 0 0 var(--radius) var(--radius);
  border-left: 0;
  border-right: 0;
}

[data-theme="light"] .sticky-search {
  box-shadow: 0 4px 14px rgba(18, 18, 40, 0.08);
  border-bottom-color: var(--border);
}

/* ============ API status banner ============ */
.api-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(90deg, #ff8a4c, #ff3d71);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(255, 61, 113, 0.35);
  animation: slideDown 0.3s ease;
}

.api-banner button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: #fff;
  border: 0;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.api-banner button:hover { background: rgba(0, 0, 0, 0.45); }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal {
  position: relative;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  cursor: pointer;
  z-index: 5;
  transition: transform 0.15s, background 0.15s, color 0.15s;
}

[data-theme="light"] .modal-close {
  background: rgba(255, 255, 255, 0.92);
  color: #333;
  border-color: rgba(0, 0, 0, 0.1);
}

.modal-close:hover,
.modal-close:focus-visible {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(1.06);
  outline: none;
}

.modal-close:active { transform: scale(0.94); }

.welcome-modal { padding: 0; }

.welcome-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px 24px 8px;
  background: linear-gradient(135deg, var(--accent-glow) 0%, transparent 100%);
  border-radius: 16px 16px 0 0;
}

.welcome-logo {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}

.welcome-greet h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
}

.welcome-greet p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 2px;
}

.welcome-greet strong { color: var(--accent); }

.welcome-emoji {
  display: inline-block;
  font-size: 18px;
  margin-right: 4px;
  animation: wave 1.2s ease infinite;
  transform-origin: 70% 70%;
}

@keyframes wave {
  0%, 60%, 100% { transform: rotate(0deg); }
  10%, 30% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.welcome-body {
  padding: 16px 24px;
  font-size: 14px;
  color: var(--text);
}

.welcome-body > p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 16px;
}

.welcome-card {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  align-items: flex-start;
}

.welcome-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--text);
}

.welcome-card p {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.welcome-card-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1;
}

.welcome-card-info {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.06);
}

.welcome-card-warn {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.08);
}

.welcome-card-warn strong { color: var(--warning); }

.welcome-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  margin-top: 8px;
  user-select: none;
}

.welcome-checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px 24px;
}

.welcome-tg-btn {
  background: linear-gradient(135deg, #229ED9 0%, #0088cc 100%);
  border: 0;
  color: #fff !important;
  font-weight: 700;
  padding: 12px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 10px;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 6px 16px rgba(0, 136, 204, 0.35);
}

.welcome-tg-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 136, 204, 0.45);
}

.welcome-actions .btn-ghost {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.welcome-actions .btn-ghost:hover,
.welcome-actions .btn-ghost:focus-visible {
  background: var(--card-hover);
  color: var(--accent);
  border-color: var(--accent);
  outline: none;
}

.welcome-actions .btn-ghost:active { transform: scale(0.98); }

@media (max-width: 480px) {
  .welcome-header { padding: 20px 18px 6px; gap: 12px; }
  .welcome-logo { width: 52px; height: 52px; }
  .welcome-greet h2 { font-size: 1.2rem; }
  .welcome-body { padding: 14px 18px; font-size: 13px; }
  .welcome-actions { padding: 14px 18px 20px; }
}
