:root {
  --primary-color: #e50914;
  --primary-hover: #bd0000;
  --background-color: #141414;
  --background-elevated: #1a1a1a;
  --surface-color: #1f1f1f;
  --surface-soft: #232323;
  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --border-color: rgba(255, 255, 255, 0.12);
  --border-radius: 6px;
  --header-height: 72px;
  --container-width: 1240px;
  --transition-speed: 0.25s;
  --shadow-strong: 0 16px 36px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 8% -6%, rgba(229, 9, 20, 0.24), transparent 30%),
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.07), transparent 24%),
    var(--background-color);
  -webkit-font-smoothing: antialiased;
}

body.is-modal-open,
body.is-busy {
  overflow: hidden;
}

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

button,
input,
select {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-height);
  background: rgba(20, 20, 20, 0.94);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.42);
}

.nav-inner {
  width: min(var(--container-width), calc(100% - 28px));
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 16px;
}

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}

.logo-wordmark {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--primary-color);
  text-transform: uppercase;
}

.logo small {
  font-size: 0.78rem;
  font-weight: 700;
  color: #f7b2b6;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.nav-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.nav-links-static {
  display: flex;
  gap: 8px;
}

.nav-link-pill {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.76rem;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  white-space: nowrap;
}

.server-control {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  column-gap: 10px;
  row-gap: 2px;
  min-width: 210px;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface-color);
}

.server-caption {
  color: var(--text-secondary);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.server-hint {
  color: #ff9da3;
  font-size: 0.67rem;
  font-weight: 600;
}

.server-control select {
  grid-column: 2;
  grid-row: 1 / span 2;
  color: var(--text-primary);
  border: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  max-width: 110px;
}

.search-wrap {
  min-width: min(340px, 40vw);
  display: flex;
  align-items: center;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.search-wrap input {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-primary);
  padding: 10px 12px;
  min-height: 42px;
  outline: none;
}

.search-wrap input::placeholder {
  color: #868686;
}

.search-wrap button {
  border: none;
  border-left: 1px solid var(--border-color);
  width: 42px;
  height: 42px;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
}

.mobile-menu-btn {
  display: none;
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: transparent;
}

.mobile-menu-btn span {
  width: 18px;
  height: 2px;
  background: #fff;
  display: block;
  margin: 4px auto;
}

.navbar.is-detail .nav-actions {
  display: none;
}

.app-shell {
  width: min(var(--container-width), calc(100% - 28px));
  margin: 18px auto 36px;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: clamp(300px, 58vh, 560px);
  margin-bottom: 22px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-strong);
}

.hero-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  cursor: pointer;
}

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

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.04);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.84) 0%, rgba(0, 0, 0, 0.45) 52%, rgba(0, 0, 0, 0.08) 100%);
}

.hero-content {
  position: absolute;
  left: min(4vw, 40px);
  bottom: 38px;
  width: min(560px, 84%);
  z-index: 2;
}

.hero-content h3 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
}

.hero-content p {
  margin-top: 12px;
  color: #d3d3d3;
  font-size: clamp(0.88rem, 1.3vw, 1rem);
  max-width: 95%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.hero-dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.hero-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
}

.hero-dot.is-active {
  background: var(--primary-color);
}

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

.panel-head h3 {
  margin: 0;
  font-size: 1.36rem;
  font-weight: 700;
  border-left: 4px solid var(--primary-color);
  padding-left: 12px;
}

.panel-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}

.history-panel,
.catalog-panel {
  margin-bottom: 26px;
}

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

.history-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed var(--border-color);
  border-radius: var(--border-radius);
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.02);
}

.history-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: var(--surface-color);
  cursor: pointer;
  transition: transform var(--transition-speed), border-color var(--transition-speed);
}

.history-card:hover {
  transform: translateY(-2px);
  border-color: rgba(229, 9, 20, 0.5);
}

.history-card img {
  width: 56px;
  height: 82px;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 auto;
}

.history-card-body h4 {
  margin: 0;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.history-card-body p {
  margin-top: 6px;
  margin-bottom: 0;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.category-tabs {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 2px;
}

.category-tabs::-webkit-scrollbar {
  height: 5px;
}

.category-tabs::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.category-tabs button {
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--surface-color);
  color: var(--text-secondary);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 0.84rem;
  transition: all var(--transition-speed);
}

.category-tabs button:hover {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--text-primary);
}

.category-tabs button.is-active {
  color: white;
  border-color: transparent;
  background: var(--primary-color);
}

.error-box {
  margin-bottom: 14px;
  padding: 11px 12px;
  border: 1px solid rgba(229, 9, 20, 0.45);
  border-radius: var(--border-radius);
  background: rgba(229, 9, 20, 0.12);
  color: #ffd5d8;
}

.error-box.is-hidden {
  display: none;
}

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

.skeleton-grid {
  margin-bottom: 14px;
}

.skeleton {
  aspect-ratio: 2 / 3;
  border-radius: var(--border-radius);
  background: linear-gradient(110deg, #232323 8%, #2a2a2a 18%, #232323 33%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer {
  to {
    background-position-x: -200%;
  }
}

.card {
  border-radius: var(--border-radius);
  overflow: hidden;
  background: var(--surface-color);
  cursor: pointer;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4);
}

.card img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
}

.card-body {
  padding: 10px;
  background: linear-gradient(180deg, rgba(31, 31, 31, 0.9), rgba(19, 19, 19, 0.95));
}

.card-body h4 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-body p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.paging-wrap {
  margin-top: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-secondary,
.btn-ghost,
.provider-choice-btn {
  border: none;
  border-radius: var(--border-radius);
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 600;
  transition: all var(--transition-speed);
}

.btn-secondary {
  background: var(--primary-color);
  color: white;
}

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

.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

.append-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

.append-loading.is-hidden {
  display: none;
}

.append-loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  animation: pulse 0.8s ease-in-out infinite alternate;
}

@keyframes pulse {
  from {
    transform: scale(0.8);
    opacity: 0.65;
  }
  to {
    transform: scale(1.2);
    opacity: 1;
  }
}

#pagingMeta {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.84rem;
}

#scrollSentinel {
  width: 100%;
  height: 2px;
}

.detail-top {
  margin-bottom: 14px;
}

.watch-container {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 26px;
}

.video-section {
  flex: 1;
  min-width: 0;
}

.player-panel {
  padding: 14px;
  border-radius: var(--border-radius);
  background: #000;
  border: 1px solid var(--border-color);
}

.player-panel video {
  width: 100%;
  max-height: min(72vh, 680px);
  border-radius: 4px;
  background: #000;
}

.player-panel.is-portrait video {
  max-height: min(82vh, 860px);
}

.player-panel.is-landscape video {
  aspect-ratio: 16 / 9;
}

.episode-toolbar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

#episodePosition {
  color: var(--text-secondary);
  font-size: 0.88rem;
  min-width: 120px;
  text-align: center;
}

.episode-sidebar {
  width: 310px;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  background: var(--surface-color);
  padding: 14px;
  display: flex;
  flex-direction: column;
  max-height: min(72vh, 680px);
}

.player-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.player-head h3 {
  margin: 0;
  font-size: 1rem;
}

.quality-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 0.78rem;
}

.quality-control select {
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 5px 6px;
  background: #2b2b2b;
  color: var(--text-primary);
}

.episode-list {
  display: grid;
  gap: 8px;
}

.episode-list.sidebar-list {
  grid-template-columns: 1fr;
  overflow-y: auto;
  padding-right: 4px;
}

.episode-btn {
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  padding: 11px 10px;
  border-radius: 4px;
  text-align: left;
  cursor: pointer;
  font-size: 0.86rem;
  min-height: 42px;
}

.episode-btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-primary);
}

.episode-btn.is-active {
  background: var(--primary-color);
  color: #fff;
}

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

.detail-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.detail-poster {
  width: 240px;
  border-radius: var(--border-radius);
  object-fit: cover;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

.detail-content {
  flex: 1;
}

#detailHeading {
  margin: 0;
  font-size: clamp(1.6rem, 3.2vw, 2.6rem);
  line-height: 1.1;
}

.detail-meta {
  margin: 10px 0 14px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.detail-description {
  margin: 0;
  color: #d8d8d8;
  line-height: 1.6;
}

.tag-list {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  font-size: 0.78rem;
  color: #f1f1f1;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 10px;
}

.provider-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 20px;
}

.provider-modal.is-hidden {
  display: none;
}

.provider-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(5px);
}

.provider-modal-card {
  position: relative;
  width: min(720px, 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: linear-gradient(180deg, #252525, #171717);
  padding: 20px;
  box-shadow: var(--shadow-strong);
}

.provider-modal-kicker {
  margin: 0;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  color: #ff9ca2;
  font-weight: 700;
}

.provider-modal-card h2 {
  margin: 8px 0 10px;
  font-size: clamp(1.24rem, 2.5vw, 1.9rem);
}

.provider-modal-desc {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.provider-modal-options {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-choice-btn {
  background: var(--surface-soft);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.provider-choice-btn:hover {
  border-color: rgba(255, 255, 255, 0.28);
}

.provider-choice-btn.is-active,
.donation-now-btn {
  background: var(--primary-color);
  border-color: transparent;
  color: #fff;
}

.provider-modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.donation-modal-actions {
  justify-content: flex-start;
}

.global-loading {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 20px;
}

.global-loading.is-hidden {
  display: none;
}

.global-loading-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
}

.global-loading-card {
  position: relative;
  width: min(300px, 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #1b1b1b;
  padding: 16px;
  text-align: center;
}

.loading-line {
  position: absolute;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, transparent 0%, var(--primary-color) 50%, transparent 100%);
  animation: loading-scan 1.1s linear infinite;
}

.loading-orbit {
  width: 74px;
  height: 74px;
  margin: 10px auto;
  position: relative;
}

.loading-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
}

.ring-one {
  border-top-color: var(--primary-color);
  border-right-color: rgba(229, 9, 20, 0.44);
  animation: spin 1s linear infinite;
}

.ring-two {
  inset: 10px;
  border-bottom-color: rgba(255, 255, 255, 0.7);
  border-left-color: rgba(255, 255, 255, 0.2);
  animation: spin-reverse 1.3s linear infinite;
}

.loading-core {
  position: absolute;
  inset: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff6f76, #e50914);
}

.loading-title {
  margin: 0;
  color: #efefef;
  font-size: 0.9rem;
}

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

@keyframes spin-reverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@keyframes loading-scan {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

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

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #383838;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4f4f4f;
}

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

  .card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

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

  .card-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .nav-links-static {
    display: none;
  }

  .search-wrap {
    min-width: 260px;
  }

  .watch-container {
    flex-direction: column;
  }

  .episode-sidebar {
    width: 100%;
    max-height: 320px;
  }
}

@media (max-width: 820px) {
  :root {
    --header-height: 64px;
  }

  .navbar {
    padding-top: env(safe-area-inset-top);
  }

  .nav-inner {
    gap: 10px;
  }

  .mobile-menu-btn {
    display: inline-block;
  }

  .logo {
    gap: 6px;
  }

  .logo-wordmark {
    font-size: 1.25rem;
    letter-spacing: 0.01em;
  }

  .logo small {
    font-size: 0.64rem;
    letter-spacing: 0.06em;
  }

  .nav-actions {
    display: none;
    position: absolute;
    top: calc(var(--header-height) - 1px);
    left: 0;
    right: 0;
    background: #161616;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px 14px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    max-height: min(72vh, 480px);
    overflow-y: auto;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
  }

  .navbar.is-open .nav-actions {
    display: flex;
  }

  .server-control,
  .search-wrap {
    width: 100%;
    min-width: 0;
  }

  .server-control {
    min-height: 46px;
  }

  .search-wrap input {
    font-size: 0.94rem;
  }

  .search-wrap button {
    width: 46px;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .panel-head h3 {
    font-size: 1.18rem;
    padding-left: 10px;
  }

  .panel-head p {
    font-size: 0.8rem;
  }

  .detail-layout {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

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

  #detailHeading {
    font-size: 1.42rem;
    line-height: 1.2;
  }

  .detail-meta {
    margin: 8px 0 10px;
    font-size: 0.86rem;
  }

  .detail-description {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .tag-list {
    justify-content: flex-start;
  }

  .watch-container {
    gap: 12px;
    margin-bottom: 18px;
  }

  .player-panel {
    padding: 10px;
  }

  .player-panel video {
    max-height: 58vh;
  }

  .episode-toolbar {
    justify-content: space-between;
  }

  .episode-toolbar .btn-ghost {
    min-width: 86px;
    min-height: 40px;
  }

  #episodePosition {
    font-size: 0.82rem;
    min-width: 98px;
  }

  .episode-sidebar {
    padding: 10px;
    max-height: 44vh;
  }

  .player-head h3 {
    font-size: 0.94rem;
  }

  .quality-control {
    gap: 6px;
  }

  .quality-control span {
    display: none;
  }

  .quality-control select {
    min-height: 34px;
  }

  .paging-wrap {
    justify-content: space-between;
    gap: 8px;
  }

  .btn-secondary {
    min-height: 40px;
    padding: 9px 12px;
  }
}

@media (max-width: 520px) {
  .app-shell,
  .nav-inner {
    width: calc(100% - 20px);
  }

  .hero-content {
    left: 14px;
    bottom: 34px;
    width: calc(100% - 28px);
  }

  .hero-slider {
    height: 50vh;
    min-height: 280px;
    margin-bottom: 16px;
  }

  .hero-content h3 {
    font-size: 1.9rem;
  }

  .hero-content p {
    max-width: 100%;
    font-size: 0.85rem;
    margin-top: 8px;
    -webkit-line-clamp: 4;
  }

  .history-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .history-card {
    padding: 8px;
    gap: 9px;
  }

  .history-card img {
    width: 48px;
    height: 72px;
  }

  .history-card-body h4 {
    font-size: 0.86rem;
  }

  .history-card-body p {
    font-size: 0.75rem;
  }

  .card-body {
    padding: 8px;
  }

  .card-body h4 {
    white-space: normal;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    min-height: 2.4em;
    font-size: 0.84rem;
  }

  .card-body p {
    font-size: 0.73rem;
    margin-top: 4px;
  }

  .category-tabs button {
    padding: 7px 11px;
    font-size: 0.78rem;
  }

  .detail-top .btn-ghost {
    width: 100%;
    min-height: 40px;
  }

  .provider-modal-card {
    padding: 16px;
  }

  .provider-modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .provider-modal-actions .btn-ghost,
  .provider-modal-actions .provider-choice-btn {
    width: 100%;
    min-height: 42px;
  }
}

@media (max-width: 380px) {
  .logo-wordmark {
    font-size: 1.1rem;
  }

  .logo small {
    display: none;
  }

  .hero-content h3 {
    font-size: 1.56rem;
  }

  .card-grid {
    grid-template-columns: 1fr 1fr;
  }

  .episode-toolbar .btn-ghost {
    min-width: 74px;
    padding: 8px 10px;
  }
}
