:root {
  color-scheme: dark;
  --bg: #090b10;
  --surface: #121722;
  --surface-2: #1b2230;
  --text: #f7f8fb;
  --muted: #aeb7c8;
  --line: rgba(255, 255, 255, 0.12);
  --accent: #e94141;
  --accent-2: #10b981;
  --gold: #f0b84a;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

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

button,
input,
select {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 64px);
  background: rgba(9, 11, 16, 0.84);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 30px);
  color: var(--muted);
  font-size: 0.95rem;
}

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

.ghost-button,
.filter-button,
.side-button,
.plan-button,
.primary-button,
.secondary-button,
.close-button,
.watch-button,
.delete-button {
  cursor: pointer;
  border: 0;
}

.ghost-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.hero {
  position: relative;
  min-height: 82vh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 11, 16, 0.96), rgba(9, 11, 16, 0.54) 46%, rgba(9, 11, 16, 0.2)),
    linear-gradient(0deg, var(--bg), rgba(9, 11, 16, 0) 45%),
    url("https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=1800&q=80")
      center / cover;
  transform: scale(1.02);
}

.hero-content {
  position: relative;
  width: min(760px, 100%);
  padding: clamp(96px, 14vw, 180px) clamp(18px, 5vw, 64px) 96px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section h2,
.modal h2 {
  margin: 0;
  letter-spacing: 0;
}

.hero h1 {
  font-size: clamp(4rem, 12vw, 8.5rem);
  line-height: 0.86;
}

.hero p:not(.eyebrow) {
  max-width: 650px;
  margin: 24px 0 0;
  color: #dbe1ed;
  font-size: clamp(1rem, 2vw, 1.25rem);
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-radius: 8px;
  font-weight: 800;
}

.primary-button {
  background: var(--accent);
  color: white;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #0d1119;
}

.metrics div {
  min-height: 116px;
  padding: 28px clamp(18px, 4vw, 46px);
  border-right: 1px solid var(--line);
}

.metrics div:last-child {
  border-right: 0;
}

.metrics strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3rem);
}

.metrics span {
  color: var(--muted);
}

.section {
  padding: 84px clamp(18px, 5vw, 64px);
}

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 520px);
  gap: 48px;
  align-items: end;
}

.section h2 {
  max-width: 760px;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
}

.intro > p,
.section-heading > p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-mode {
  display: flex;
  gap: 8px;
}

.filter-button {
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
}

.filter-button.active {
  background: white;
  color: #0d1119;
}

.access-simulator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.simulator-label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.86rem;
}

.access-simulator strong {
  font-size: 1.15rem;
}

.simulator-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.title-card {
  position: relative;
  min-height: 410px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.title-card img {
  width: 100%;
  height: 100%;
  min-height: 410px;
  object-fit: cover;
  display: block;
  filter: saturate(0.95);
}

.title-card-content {
  position: absolute;
  inset: auto 0 0;
  padding: 22px;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.92), rgba(0, 0, 0, 0));
}

.title-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.pill {
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.14);
  color: #eef2f7;
  font-size: 0.72rem;
  font-weight: 800;
}

.title-card h3,
.plan-card h3,
.activity-list h3 {
  margin: 0;
}

.title-card h3 {
  font-size: 1.35rem;
}

.title-card p {
  min-height: 48px;
  margin: 8px 0 0;
  color: #cbd3df;
  line-height: 1.5;
}

.watch-button {
  width: 100%;
  min-height: 40px;
  margin-top: 14px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font-weight: 900;
}

.delete-button {
  width: 100%;
  min-height: 38px;
  margin-top: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fecaca;
  font-weight: 800;
}

.plans-section {
  background: #0d1119;
}

.admin-section {
  background: #090b10;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(280px, 520px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.admin-status,
.admin-form,
.admin-manager,
.admin-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-status,
.admin-manager-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 18px;
}

.admin-form {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.admin-form h3,
.admin-title-item h3 {
  margin: 0;
}

.admin-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.admin-form input,
.admin-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #090b10;
  color: var(--text);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.admin-manager {
  padding: 24px;
}

.admin-manager-head {
  margin: 0 0 16px;
  padding: 0;
}

.admin-title-list {
  display: grid;
  gap: 12px;
  max-height: 420px;
  overflow: auto;
}

.admin-title-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f141d;
}

.admin-title-item img {
  width: 64px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.admin-title-item p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-preview {
  margin-top: 18px;
  padding: 18px;
  color: var(--muted);
}

.admin-preview-card {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}

.admin-preview-card img {
  width: 120px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.admin-preview-card h3 {
  margin: 0 0 8px;
  color: var(--text);
}

.admin-preview-card p {
  margin: 0 0 12px;
  line-height: 1.55;
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.plan-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.plan-card.featured {
  background: linear-gradient(180deg, #231a1a, #121722);
  border-color: rgba(233, 65, 65, 0.62);
}

.plan-label {
  color: var(--gold);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-card h3 {
  margin-top: 14px;
  font-size: 2rem;
}

.price {
  margin: 12px 0 22px;
  font-size: 2.4rem;
  font-weight: 900;
}

.price span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

.plan-card ul {
  display: grid;
  gap: 12px;
  min-height: 104px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.plan-card li::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 10px;
  border-radius: 99px;
  background: var(--accent-2);
}

.plan-button {
  width: 100%;
  min-height: 46px;
  border-radius: 8px;
  background: white;
  color: #10131a;
  font-weight: 900;
}

.management {
  padding-bottom: 110px;
}

.dashboard {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 440px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.dashboard-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: #0f141d;
}

.dashboard-sidebar strong {
  margin-bottom: 12px;
}

.side-button {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 8px;
  text-align: left;
  background: transparent;
  color: var(--muted);
}

.side-button.active,
.side-button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.dashboard-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 24px;
}

.revenue-panel,
.activity-list {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101722;
}

.revenue-panel span {
  color: var(--muted);
}

.revenue-panel strong {
  display: block;
  margin-top: 14px;
  font-size: clamp(2.1rem, 5vw, 4rem);
}

.revenue-panel p,
.activity-list p {
  color: var(--muted);
}

.chart {
  display: flex;
  align-items: end;
  gap: 14px;
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px) 0 0 / 100% 25%,
    #101722;
}

.chart span {
  flex: 1;
  min-width: 22px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, var(--accent), #f59e0b);
}

.activity-list {
  grid-column: 1 / -1;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px clamp(18px, 5vw, 64px);
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.modal {
  width: min(450px, calc(100% - 36px));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0;
  background: var(--surface);
  color: var(--text);
}

.modal::backdrop {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
}

.modal-content {
  position: relative;
  display: grid;
  gap: 16px;
  padding: 30px;
}

.modal label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.modal input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: #090b10;
  color: var(--text);
}

.checkout-note,
.player-note {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #090b10;
  color: var(--muted);
  line-height: 1.55;
}

.player-modal {
  width: min(820px, calc(100% - 36px));
}

.player-content {
  gap: 18px;
}

.video-frame {
  display: grid;
  place-items: center;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(233, 65, 65, 0.18), rgba(16, 185, 129, 0.12)),
    #05070b;
}

.video-frame iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-placeholder {
  padding: 30px;
  text-align: center;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.video-placeholder strong {
  color: var(--text);
  font-weight: 800;
}

.access-denied {
  color: #fecaca;
}

.access-granted {
  color: #bbf7d0;
}

.close-button {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.full {
  width: 100%;
}

@media (max-width: 980px) {
  .metrics,
  .catalog-grid,
  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .intro,
  .admin-layout,
  .dashboard,
  .dashboard-main {
    grid-template-columns: 1fr;
  }

  .dashboard-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 680px) {
  .topbar {
    align-items: flex-start;
  }

  .nav-links {
    display: none;
  }

  .hero {
    min-height: 76vh;
  }

  .hero-content {
    padding-bottom: 64px;
  }

  .metrics,
  .catalog-grid,
  .plan-grid {
    grid-template-columns: 1fr;
  }

  .metrics div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .section-heading,
  .access-simulator,
  .admin-status,
  .admin-title-item,
  .footer {
    display: grid;
  }

  .simulator-actions {
    justify-content: flex-start;
  }

  .form-row,
  .admin-preview-card {
    grid-template-columns: 1fr;
  }

  .title-card,
  .title-card img {
    min-height: 360px;
  }
}
