:root {
  --bg: #08080c;
  --bg-card: #12121a;
  --bg-hover: #1a1a26;
  --bg-input: #14141e;
  --text: #f0f0f5;
  --text-muted: #8a8a9a;
  --text-dim: #505060;
  --accent: #e63946;
  --accent-hover: #d32f3f;
  --accent-glow: rgba(230, 57, 70, 0.15);
  --border: #1e1e2a;
  --border-hover: #2a2a3a;
  --radius: 10px;
  --radius-lg: 16px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --max-width: 1280px;
  --nav-height: 60px;
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(
      ellipse at 20% 0%,
      rgba(230, 57, 70, 0.04) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse at 80% 100%,
      rgba(230, 57, 70, 0.03) 0%,
      transparent 50%
    );
}

::selection {
  background: var(--accent);
  color: var(--text);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

input,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  outline: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

input::placeholder {
  color: var(--text-dim);
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(8, 8, 12, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 24px;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--accent);
  flex-shrink: 0;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  transition: color var(--transition);
}

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius);
}

.nav-toggle:hover {
  background: var(--bg-hover);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: all 0.2s ease;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 960px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(18, 18, 26, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 6px 0;
    gap: 0;
    z-index: 150;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 13px 20px;
    font-size: 14px;
    width: 100%;
    border-left: 3px solid transparent;
    transition: all var(--transition);
  }

  .nav-links a:hover {
    background: var(--bg-hover);
    color: var(--text);
  }

  .nav-links a:active {
    border-left-color: var(--accent);
  }
}

.nav-search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-search input {
  width: 240px;
  font-size: 14px;
  padding: 6px 12px;
}

.nav-search button {
  background: var(--accent);
  color: var(--text);
  padding: 6px 16px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-search button:hover {
  background: var(--accent-hover);
}

.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: calc(var(--nav-height) + 24px) 24px 48px;
}

.section {
  margin-bottom: 40px;
}

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

.section-title {
  font-size: 18px;
  font-weight: 600;
}

.section-link {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

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

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

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

.card {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition:
    transform var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
  text-decoration: none;
}

.card:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.card:active {
  transform: translateY(-2px);
}

.card-image {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--bg-hover);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image img {
  transform: scale(1.08);
}

.card-score {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(8px);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-format {
  position: absolute;
  top: 8px;
  right: 8px;
  background: var(--accent);
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.card-ep {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
}

.card-body {
  padding: 12px;
}

.card-title {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.episodes-title {
  font-size: 16px;
  font-weight: 600;
}

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

.ep-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

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

.ep-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.ep-btn-watched {
  color: var(--accent);
  border-color: var(--accent);
}

.ep-btn-current {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

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

.btn-primary:active {
  transform: translateY(0);
}

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

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text);
  background: var(--bg-hover);
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.btn-danger:hover {
  background: var(--accent);
  color: var(--text);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 12px;
  border-radius: 6px;
}

.player-container {
  max-width: 900px;
  margin: 0 auto;
}

.player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.player-wrapper iframe,
.player-wrapper video {
  width: 100%;
  height: 100%;
  border: none;
}

.episode-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  background: rgba(8, 8, 12, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 10px 26px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  pointer-events: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.5);
}

.watch-countdown {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  margin-bottom: 16px;
  background: rgba(96, 165, 250, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius);
  text-align: center;
}

.watch-countdown-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #60a5fa;
}

.watch-countdown-timer {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.player-wrapper .loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.player-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.player-info > div:first-child {
  min-width: 0;
  overflow: hidden;
}

.player-title {
  display: block;
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-episode {
  font-size: 14px;
  color: var(--text-muted);
}

.player-nav {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.player-source-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.player-source-btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all var(--transition);
}

.player-source-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.player-source-btn-active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(230, 57, 70, 0.08);
}

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.empty-text {
  font-size: 14px;
  margin-bottom: 16px;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: var(--radius);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

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

.page-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.filters {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 8px;
  transition: all var(--transition);
}

.history-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.history-thumb {
  width: 60px;
  aspect-ratio: 3 / 4;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg-hover);
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-ep {
  font-size: 13px;
  color: var(--text-muted);
}

.history-time {
  font-size: 12px;
  color: var(--text-dim);
}

.history-actions {
  flex-shrink: 0;
}

.continue-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: 32px;
}

.about {
  max-width: 720px;
  margin: 0 auto;
}

.about-text {
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 8px;
}

.about-subtitle {
  font-size: 16px;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 12px;
}

.about-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.about-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.about-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

.about-connect {
  display: grid;
  gap: 14px;
}

.about-discord {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-width: 0;
}

.about-discord-banner {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
}

.about-discord-icon {
  position: absolute;
  top: 88px;
  left: 24px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 4px solid var(--bg-card);
  background: var(--bg-card);
}

.about-discord-body {
  padding: 44px 24px 24px;
}

.about-discord-name {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 2px;
}

.about-discord-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.about-sep {
  opacity: 0.5;
}

.about-online {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.presence-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}

.about-discord-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 16px;
}

.about-discord .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  font-size: 13px;
}

.about-discord .btn:hover,
.about-discord .btn:active {
  background: var(--accent);
  box-shadow: none;
  transform: none;
}

.about-card-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.about-row {
  flex: 1;
  min-height: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  text-align: center;
  min-width: 0;
}

.about-row svg,
.about-row img {
  flex-shrink: 0;
}

.about-row img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.about-social-logo {
  filter: brightness(0) invert(1);
}

.about-card-text {
  min-width: 0;
}

.about-link-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.about-link-text {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.continue-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 4px;
}

.scroll-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.scroll-row::-webkit-scrollbar {
  height: 4px;
}

.scroll-row::-webkit-scrollbar-track {
  background: transparent;
}

.scroll-row::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.scroll-row .card {
  min-width: 160px;
  max-width: 160px;
  flex-shrink: 0;
}

.embed-error {
  padding: 10px 14px;
  background: rgba(230, 57, 70, 0.08);
  border: 1px solid rgba(230, 57, 70, 0.2);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 12px;
}

.next-ep-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(96, 165, 250, 0.06);
  border: 1px solid rgba(96, 165, 250, 0.2);
  border-radius: var(--radius);
  margin-bottom: 14px;
}

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

.next-ep-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #60a5fa;
  font-weight: 600;
  margin-bottom: 2px;
}

.next-ep-title {
  font-size: 14px;
  color: var(--text);
}

.next-ep-title strong {
  color: #60a5fa;
}

.next-ep-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.player-unavailable {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  height: 100%;
  padding: 32px 24px;
  background: var(--bg);
}

.unavailable-icon {
  color: var(--text-dim);
  margin-bottom: 16px;
  opacity: 0.8;
}

.unavailable-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.unavailable-countdown {
  font-size: 22px;
  font-weight: 700;
  color: #60a5fa;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.unavailable-text {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 420px;
  line-height: 1.6;
}

.player-lang-toggle {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  width: fit-content;
}

.lang-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.lang-btn-active {
  background: var(--accent);
  color: var(--text);
}

.player-url-input {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.player-url-input input {
  flex: 1;
  font-size: 13px;
}

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

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

.watchlist-progress {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
}

.wl-remove-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(8, 8, 12, 0.8);
  backdrop-filter: blur(8px);
  color: var(--accent);
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 6px;
  font-size: 10px;
  padding: 3px 8px;
  z-index: 2;
  transition: all var(--transition);
}

.wl-remove-btn:hover {
  background: var(--accent);
  color: var(--text);
  border-color: var(--accent);
}

.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-size: 14px;
}

.detail-hero {
  position: relative;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-top: calc((var(--nav-height) + 24px) * -1);
  padding-top: var(--nav-height);
  min-height: 420px;
  overflow: hidden;
  margin-bottom: 32px;
  display: flex;
  align-items: flex-end;
}

.detail-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  opacity: 0.25;
}

.detail-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.3) 0%,
    rgba(10, 10, 10, 0.9) 70%,
    var(--bg) 100%
  );
}

.detail-hero-content {
  position: relative;
  padding: 32px 24px;
  display: flex;
  gap: 24px;
  align-items: flex-end;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
}

.detail-hero-cover {
  width: 160px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.detail-hero-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.detail-hero-info {
  flex: 1;
  min-width: 0;
  padding-bottom: 8px;
}

.detail-hero-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 4px;
}

.detail-hero-alt-title {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.detail-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.detail-hero-tags span {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.detail-hero-tags .tag-accent {
  color: var(--accent);
  border-color: rgba(230, 57, 70, 0.3);
  background: rgba(230, 57, 70, 0.08);
}

.detail-hero-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 640px;
  margin-bottom: 16px;
}

.detail-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-body {
  padding-bottom: 40px;
}

.detail-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.detail-stat {
  flex: 1;
  min-width: 100px;
  padding: 14px 18px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.detail-stat:last-child {
  border-right: none;
}

.detail-stat-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-dim);
  margin-bottom: 4px;
  font-weight: 600;
}

.detail-stat-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.detail-stat-value.accent {
  color: var(--accent);
}

.detail-stat-value.green {
  color: #4ade80;
}

.detail-stat-value.blue {
  color: #60a5fa;
}

.detail-section {
  margin-bottom: 32px;
}

.detail-section-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.detail-synopsis.expandable {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  cursor: pointer;
}

.detail-synopsis.expanded {
  display: block;
  -webkit-line-clamp: unset;
}

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

.ep-progress-bar {
  flex: 1;
  height: 4px;
  background: var(--bg-hover);
  border-radius: 2px;
  overflow: hidden;
}

.ep-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  border-radius: 2px;
  transition: width 0.5s ease;
}

.ep-progress-text {
  white-space: nowrap;
  font-weight: 500;
}

.ep-btn-aired {
  color: var(--text-muted);
  border-color: var(--border);
}

.ep-btn-aired:hover {
  border-color: var(--accent);
  color: var(--text);
}

.ep-btn-upcoming {
  color: var(--text-dim);
  border-color: transparent;
  background: var(--bg);
  cursor: default;
  opacity: 0.5;
}

.ep-btn-upcoming:hover {
  border-color: transparent;
  color: var(--text-dim);
  transform: none;
  box-shadow: none;
}

.ep-btn-today {
  border-color: #4ade80;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.06);
  animation: pulse-border 2s ease-in-out infinite;
}

@keyframes pulse-border {
  0%,
  100% {
    border-color: #4ade80;
  }
  50% {
    border-color: rgba(74, 222, 128, 0.3);
  }
}

.ep-air-date {
  font-size: 10px;
  color: var(--text-dim);
  text-align: center;
  margin-top: 2px;
  line-height: 1.2;
}

.ep-air-date.upcoming-date {
  color: #60a5fa;
}

.ep-air-date.today-date {
  color: #4ade80;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 8px;
  border-radius: 6px;
}

.status-badge.finished {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border: 1px solid rgba(74, 222, 128, 0.15);
}

.status-badge.airing {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.15);
}

.status-badge.upcoming {
  color: #facc15;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid rgba(250, 204, 21, 0.15);
}

.status-badge.dim {
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
}

.related-section .scroll-row .card {
  min-width: 150px;
  max-width: 150px;
}

.related-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(8, 8, 12, 0.75);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
}

.hero-slideshow {
  position: relative;
  width: calc(100% + 48px);
  margin-left: -24px;
  margin-top: calc((var(--nav-height) + 24px) * -1);
  padding-top: var(--nav-height);
  height: 460px;
  overflow: hidden;
  margin-bottom: 40px;
  touch-action: pan-y;
}

.hero-slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.6s ease,
    visibility 0.6s ease;
}

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

.hero-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 25%;
  opacity: 0.85;
  transition: transform 7s ease;
}

.hero-slide.active .hero-slide-bg {
  transform: scale(1.06);
}

.hero-slide-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 10, 10, 0.35) 0%,
    rgba(10, 10, 10, 0.88) 65%,
    var(--bg) 100%
  );
}

.hero-slide-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  align-items: flex-end;
  gap: 20px;
}

.hero-rank {
  font-size: 150px;
  font-weight: 800;
  line-height: 0.75;
  font-style: italic;
  letter-spacing: -6px;
  color: var(--accent);
  opacity: 0.9;
  flex-shrink: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.7);
  margin-bottom: -10px;
}

.hero-slide-main {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex: 1;
  min-width: 0;
}

.hero-slide-cover {
  width: 130px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.hero-slide-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.hero-slide-info {
  flex: 1;
  min-width: 0;
  padding-bottom: 6px;
}

.hero-slide-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #4ade80;
  margin-bottom: 8px;
}

.hero-slide-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.hero-slide-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 10px;
}

.hero-slide-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.hero-slide-tags span {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  white-space: nowrap;
}

.hero-slide-tags .tag-accent {
  color: var(--accent);
  border-color: rgba(230, 57, 70, 0.3);
  background: rgba(230, 57, 70, 0.08);
}

.hero-slide-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 620px;
  margin-bottom: 10px;
}

.hero-slide-meta {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.hero-slide-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 20;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(8, 8, 12, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition:
    opacity var(--transition),
    border-color var(--transition),
    color var(--transition),
    transform var(--transition);
}

.hero-slideshow:hover .hero-arrow {
  opacity: 1;
}

.hero-arrow:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-50%) scale(1.08);
}

.hero-arrow.prev {
  left: 16px;
}

.hero-arrow.next {
  right: 16px;
}

.hero-dots {
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all var(--transition);
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.4);
}

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

@media (max-width: 768px) {
  .hero-slideshow {
    width: calc(100% + 24px);
    margin-left: -12px;
    margin-top: 0;
    padding-top: 0;
    height: 420px;
  }

  .hero-slide {
    align-items: flex-start;
  }

  .hero-slide-content {
    height: 100%;
    padding: 24px 16px;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
  }

  .hero-rank {
    position: absolute;
    top: 24px;
    left: 16px;
    z-index: 3;
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
    font-style: normal;
    letter-spacing: 0;
    margin: 0;
    opacity: 1;
    color: #fff;
    background: var(--accent);
    padding: 5px 10px;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5);
    text-shadow: none;
  }

  .hero-slide-overlay {
    background: linear-gradient(
      180deg,
      rgba(10, 10, 10, 0.42) 0%,
      rgba(10, 10, 10, 0.6) 60%,
      var(--bg) 100%
    );
  }

  .hero-slide-main {
    width: 100%;
    gap: 16px;
    align-items: center;
  }

  .hero-slide-cover {
    width: 92px;
  }

  .hero-slide-info {
    min-width: 0;
  }

  .hero-slide-badge {
    height: 15px;
    overflow: hidden;
  }

  .hero-slide-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 44px;
    font-size: 18px;
    margin-bottom: 8px;
  }

  .hero-slide-tags {
    flex-wrap: wrap;
    overflow: hidden;
    min-height: 22px;
    max-height: 66px;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 8px;
  }

  .hero-slide-desc {
    height: 39px;
    font-size: 12px;
    margin-bottom: 8px;
  }

  .hero-slide-meta {
    height: 15px;
    white-space: nowrap;
    overflow: hidden;
    font-size: 11px;
    margin-bottom: 10px;
  }

  .hero-slide-actions {
    gap: 8px;
  }

  .hero-arrow {
    display: none;
  }

  .hero-dots {
    bottom: 12px;
  }

  .detail-hero {
    width: calc(100% + 24px);
    margin-left: -12px;
    min-height: 360px;
  }

  .detail-hero-content {
    padding: 24px 12px;
    flex-direction: column;
    align-items: flex-start;
  }

  .detail-hero-cover {
    width: 100px;
    border-radius: var(--radius);
  }

  .detail-hero-title {
    font-size: 22px;
  }

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

  .detail-stat {
    min-width: 0;
    padding: 12px 10px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .detail-stat:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .detail-stat:last-child {
    border-bottom: none;
  }

  .detail-stat-label {
    font-size: 9px;
  }

  .detail-stat-value {
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 0 12px;
    gap: 12px;
  }

  .nav-search input {
    width: 140px;
  }

  .main {
    padding: calc(var(--nav-height) + 16px) 12px 32px;
  }

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

  .player-info {
    flex-direction: column;
    align-items: flex-start;
  }

  .continue-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .lang-btn {
    padding: 5px 12px;
    font-size: 12px;
  }
}

@media (min-width: 769px) {
  .about-connect {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .nav-search {
    margin-left: auto;
    flex: 1;
    min-width: 0;
  }

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

  .nav-search button {
    flex-shrink: 0;
  }

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

  .card-body {
    padding: 6px;
  }

  .card-title {
    font-size: 12px;
  }

  .btn {
    padding: 6px 14px;
    font-size: 13px;
  }

  .btn-sm {
    padding: 4px 10px;
    font-size: 11px;
  }
}
