:root {
  --bg: #05070b;
  --bg-soft: #10141b;
  --panel: #171d25;
  --panel-alt: #111827;
  --primary: #e50914;
  --primary-soft: #ff4656;
  --text: #f3f4f6;
  --muted: #a1a1aa;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(180deg, #07090d 0%, #0d1117 100%);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(8, 10, 15, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 78px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: white;
}

.logo span {
  color: var(--primary-soft);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted);
  font-size: 0.96rem;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: white;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notification-menu {
  position: relative;
}

.notification-toggle {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 8px;
  display: inline-grid;
  place-items: center;
}

.notification-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.72rem;
}

.notification-panel {
  position: absolute;
  z-index: 50;
  top: calc(100% + 12px);
  right: 0;
  width: min(390px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  overflow: auto;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #101722;
  box-shadow: var(--shadow);
}

.notification-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.notification-panel-heading h2 {
  margin: 0;
  font-size: 1.1rem;
}

.text-button {
  padding: 4px 0;
  border: 0;
  color: #ff9aa2;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
}

.browser-notification-button {
  width: 100%;
  margin: 12px 0;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  display: block;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
  cursor: pointer;
}

.notification-item.unread {
  border-color: rgba(229, 9, 20, 0.48);
  background: rgba(229, 9, 20, 0.08);
}

.notification-item strong,
.notification-item span,
.notification-item small {
  display: block;
}

.notification-item span {
  margin-top: 5px;
  line-height: 1.45;
}

.notification-item small {
  margin-top: 5px;
  color: var(--muted);
}

.notification-empty {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 0.9rem;
}

.menu-toggle,
.mobile-nav {
  display: none;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav {
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 14px;
}

.mobile-nav a {
  padding: 8px 12px;
  color: #d8dee8;
  border: 1px solid var(--border);
  border-radius: 999px;
}

.search-box {
  min-width: 220px;
}

.search-box input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: white;
  padding: 11px 18px;
}

.search-box input::placeholder {
  color: var(--muted);
}

.btn {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-soft) 100%);
  color: white;
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border);
  color: white;
}

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(5, 7, 11, 0.9) 0%, rgba(5, 7, 11, 0.4) 40%, rgba(5, 7, 11, 0.8) 100%),
    url("https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=1400&q=80") center/cover no-repeat;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.4));
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 30px;
  padding: 48px 0 64px;
}

.hero-copy {
  max-width: 620px;
}

.eyebrow {
  display: inline-block;
  background: rgba(229, 9, 20, 0.15);
  border: 1px solid rgba(229, 9, 20, 0.4);
  color: #f69ca3;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.4rem, 4vw, 5rem);
  line-height: 1.02;
}

.hero-copy p {
  color: #d8dee8;
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 560px;
  margin: 18px 0 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: #d1d5db;
  font-size: 0.94rem;
}

.hero-card {
  display: flex;
  justify-content: center;
}

.poster {
  position: relative;
  width: min(100%, 360px);
  min-height: 500px;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.82)),
    url("https://images.unsplash.com/photo-1536440136628-849c177e76a1?auto=format&fit=crop&w=800&q=80") center/cover no-repeat;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.poster-large {
  min-height: 430px;
}

.poster-title {
  position: absolute;
  left: 22px;
  bottom: 22px;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.content-section {
  padding: 42px 0;
}

.muted-section {
  background: rgba(255, 255, 255, 0.015);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
}

.section-head a {
  color: #d9dfe9;
  font-weight: 600;
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.category-filters,
.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.category-filter,
.category-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 14px;
  color: #e5e7eb;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.category-filter.active,
.category-link:hover,
.category-link:focus-visible {
  border-color: rgba(229, 9, 20, 0.7);
  background: rgba(229, 9, 20, 0.16);
  color: white;
}

.movie-card {
  padding: 0;
  background: rgba(17, 24, 39, 0.7);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.movie-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.movie-poster {
  position: relative;
  height: 260px;
  background-size: cover;
  background-position: center;
}

.movie-info {
  padding: 14px 14px 18px;
}

.movie-topline {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  margin-bottom: 8px;
}

.movie-info h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.movie-description {
  color: #c3cad4;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 14px;
  min-height: 60px;
}

.movie-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.small-btn {
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
}

.small-btn.primary {
  background: var(--primary);
  color: white;
}

.small-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: white;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
}

.plan-card {
  background: rgba(17, 24, 39, 0.9);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  position: relative;
}

.plan-card.featured {
  border-color: rgba(229, 9, 20, 0.8);
  box-shadow: var(--shadow);
}

.plan-card h3 {
  margin: 0 0 8px;
}

.plan-price {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin-bottom: 14px;
}

.plan-price strong {
  font-size: 2rem;
}

.plan-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  color: #d8dee8;
  display: grid;
  gap: 8px;
}

.plan-card button {
  width: 100%;
}

.account-panel {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px;
}

.account-wrapper {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
}

.account-box,
.profile-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.account-box h3,
.profile-card h3 {
  margin-top: 0;
}

.wallet-balance {
  font-size: 2rem;
  font-weight: 800;
  color: #fbbf24;
  margin: 10px 0;
}

.account-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.account-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #d7dce6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(34, 197, 94, 0.15);
  color: #8ef0a1;
}

.status-pill.pending {
  background: rgba(245, 158, 11, 0.12);
  color: #f7d26a;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.payment-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.payment-card {
  background: rgba(17, 24, 39, 0.8);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
}

.stack-form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 8px;
  color: #dce4ee;
  font-weight: 600;
}

input,
select {
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}

.payment-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
  line-height: 1.6;
  color: #d9dfeb;
}

.payment-destination {
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.06);
  color: #f7d26a;
  line-height: 1.55;
}

.payment-destination:empty {
  display: none;
}

.payment-destination strong {
  color: white;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.7);
  z-index: 60;
}

.modal.hidden,
.hidden {
  display: none !important;
}

.auth-form.hidden-form {
  display: none;
}

.modal-card {
  position: relative;
  width: min(480px, calc(100% - 24px));
  background: #101722;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.close-modal {
  position: absolute;
  right: 14px;
  top: 10px;
  font-size: 2rem;
  line-height: 1;
  background: transparent;
  color: white;
  border: none;
  cursor: pointer;
}

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.tab {
  padding: 9px 12px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: white;
  cursor: pointer;
}

.tab.active {
  background: linear-gradient(135deg, var(--primary) 0%, #b91c1c 100%);
}

.auth-form {
  display: grid;
  gap: 14px;
}

.form-message {
  margin: 12px 0 0;
  min-height: 20px;
  color: #f9d39a;
}

.video-modal-card {
  width: min(1000px, calc(100% - 28px));
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #080b10;
  box-shadow: var(--shadow);
}

.video-modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.video-modal-heading h2 {
  margin: 0;
  font-size: 1.2rem;
}

.video-player,
.youtube-player {
  display: block;
  width: 100%;
  max-height: 75vh;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
  background: #000;
}

.video-modal-card .form-message:empty {
  display: none;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 34px 16px 60px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-header h1 {
  margin: 0;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 22px 0;
}

.stat-card {
  background: rgba(17, 24, 39, 0.88);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.stat-card .label {
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 2rem;
  line-height: 1.1;
}

.admin-panel {
  background: rgba(17, 24, 39, 0.88);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  margin-bottom: 22px;
}

.admin-panel h2 {
  margin-top: 0;
}

.admin-demo-notice {
  margin: 18px 0;
  padding: 14px 16px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.09);
  color: #f7d26a;
  line-height: 1.5;
}

.backend-status {
  max-width: 1200px;
  margin: 18px auto;
  padding: 14px 16px;
  border: 1px solid rgba(248, 113, 113, 0.55);
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.2);
  color: #fecaca;
  line-height: 1.5;
}

.admin-login-card {
  margin: 48px auto;
}

.admin-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.admin-panel-heading h2 {
  margin-bottom: 6px;
}

.admin-panel-heading p {
  margin: 0;
}

.admin-panel-heading input {
  width: min(360px, 100%);
}

.admin-notification-title h2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-notification-title .notification-badge {
  position: static;
}

.admin-notification-list {
  display: grid;
  gap: 10px;
}

.admin-notification-item {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-notification-item.unread {
  border-color: rgba(229, 9, 20, 0.48);
  background: rgba(229, 9, 20, 0.08);
}

.admin-notification-item p {
  margin: 6px 0;
  line-height: 1.45;
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.admin-form .form-wide {
  grid-column: 1 / -1;
}

.admin-form textarea {
  min-height: 90px;
  resize: vertical;
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
}

.plan-admin-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.payment-settings-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
}

.admin-catalog-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.admin-catalog-item {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.admin-catalog-item h3 {
  margin: 0 0 8px;
  overflow-wrap: anywhere;
}

.admin-catalog-item p {
  margin: 6px 0;
}

.admin-catalog-item .inline-actions button.danger {
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.4);
}

.wallet-adjust-form {
  display: grid;
  grid-template-columns: minmax(100px, 0.5fr) minmax(170px, 1fr) auto auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
}

.wallet-adjust-form label {
  font-size: 0.85rem;
}

.wallet-adjust-form input {
  width: 100%;
  min-width: 0;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table-wrap table {
  min-width: 760px;
}

.client-list,
.pending-list,
.transaction-list {
  display: grid;
  gap: 14px;
}

.client-item,
.pending-item,
.transaction-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
  padding: 16px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.inline-actions button {
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: white;
  cursor: pointer;
}

.muted-text {
  color: var(--muted);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 12px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

@media (max-width: 980px) {
  .hero-inner,
  .account-wrapper,
  .payment-layout {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 700px) {
  .nav-wrap {
    flex-wrap: wrap;
    height: auto;
    padding: 16px 0;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .notification-menu {
    order: 2;
  }

  .notification-panel {
    right: auto;
    left: 0;
  }

  .search-box {
    flex: 1 1 100%;
    min-width: 0;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-form,
  .plan-admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .wallet-adjust-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .admin-form,
  .plan-admin-form,
  .wallet-adjust-form {
    grid-template-columns: 1fr;
  }

  .admin-stats {
    grid-template-columns: 1fr;
  }
}
