:root {
  --wf-bg: #07111f;
  --wf-bg-elevated: #0d1a2b;
  --wf-bg-soft: #14253c;
  --wf-surface: rgba(11, 24, 39, 0.84);
  --wf-surface-strong: rgba(14, 28, 46, 0.94);
  --wf-border: rgba(255, 255, 255, 0.1);
  --wf-border-strong: rgba(255, 255, 255, 0.18);
  --wf-text: #f5f7fb;
  --wf-text-soft: #9eb0c9;
  --wf-text-muted: #7688a3;
  --wf-primary: #f55d3e;
  --wf-primary-strong: #ff7b49;
  --wf-accent: #ffd166;
  --wf-success: #46c788;
  --wf-info: #5fb8ff;
  --wf-shadow-soft: 0 12px 32px rgba(0, 0, 0, 0.2);
  --wf-shadow-card: 0 18px 40px rgba(0, 0, 0, 0.32);
  --wf-radius-sm: 12px;
  --wf-radius-md: 18px;
  --wf-radius-lg: 28px;
  --wf-max: 1320px;
  --wf-font-heading: "Space Grotesk", "Segoe UI", sans-serif;
  --wf-font-body: "Be Vietnam Pro", "Segoe UI", sans-serif;
}

body {
  color: var(--wf-text);
  font-family: var(--wf-font-body);
  background:
    radial-gradient(circle at top left, rgba(255, 123, 73, 0.2), transparent 22%),
    radial-gradient(circle at top right, rgba(95, 184, 255, 0.16), transparent 24%),
    linear-gradient(180deg, #08111e 0%, #0d1727 48%, #09111d 100%);
}

.wf-shell {
  width: min(calc(100% - 32px), var(--wf-max));
  margin: 0 auto;
}

.wf-panel {
  background: var(--wf-surface);
  backdrop-filter: blur(18px);
  border: 1px solid var(--wf-border);
  border-radius: var(--wf-radius-md);
  box-shadow: var(--wf-shadow-soft);
}

.wf-section {
  width: min(calc(100% - 32px), var(--wf-max));
  margin: 0 auto 3rem;
}

.wf-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.wf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  color: var(--wf-accent);
  background: rgba(255, 209, 102, 0.08);
  border: 1px solid rgba(255, 209, 102, 0.2);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wf-title {
  margin: 0;
  color: var(--wf-text);
  font-family: var(--wf-font-heading);
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.7rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.wf-title-sm {
  margin: 0;
  color: var(--wf-text);
  font-family: var(--wf-font-heading);
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.5rem);
  letter-spacing: -0.03em;
}

.wf-subtitle {
  margin: 0.45rem 0 0;
  max-width: 58ch;
  color: var(--wf-text-soft);
  font-size: 0.98rem;
  line-height: 1.7;
}

.wf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--wf-text-soft);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.wf-link:hover {
  color: var(--wf-accent);
  transform: translateX(2px);
}

.wf-page-enter {
  animation: wf-page-enter 0.55s ease both;
}

.wf-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.wf-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.wf-btn-primary,
.wf-btn-secondary,
.wf-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border-radius: 999px;
  padding: 0.82rem 1.3rem;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.wf-btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--wf-primary), var(--wf-primary-strong));
  box-shadow: 0 14px 28px rgba(245, 93, 62, 0.26);
}

.wf-btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(245, 93, 62, 0.32);
}

.wf-btn-primary:active,
.wf-btn-secondary:active,
.wf-btn-ghost:active {
  transform: translateY(1px) scale(0.99);
}

.wf-btn-secondary {
  color: var(--wf-text);
  border-color: var(--wf-border-strong);
  background: rgba(255, 255, 255, 0.06);
}

.wf-btn-secondary:hover,
.wf-btn-ghost:hover {
  color: #fff;
  border-color: rgba(255, 123, 73, 0.3);
  background: rgba(255, 123, 73, 0.08);
}

.wf-btn-ghost {
  color: var(--wf-text-soft);
  border-color: var(--wf-border);
  background: transparent;
}

.wf-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  border: 1px solid var(--wf-border);
  color: var(--wf-text-soft);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.84rem;
  font-weight: 600;
}

.wf-chip:hover {
  border-color: rgba(255, 123, 73, 0.28);
  background: rgba(255, 123, 73, 0.08);
}

.wf-chip-filter {
  color: #fff;
  background: linear-gradient(135deg, rgba(255, 123, 73, 0.22), rgba(255, 209, 102, 0.12));
  border-color: rgba(255, 123, 73, 0.28);
}

.wf-grid-5 {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.2rem;
}

.wf-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.wf-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.movie-card {
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(17, 31, 50, 0.92), rgba(10, 19, 31, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--wf-shadow-card);
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
}

.movie-card-link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.movie-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 123, 73, 0.3);
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.42);
}

.movie-poster {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: linear-gradient(180deg, #14253c, #0d1a2b);
}

.movie-poster::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 48%;
  background: linear-gradient(180deg, transparent, rgba(3, 8, 16, 0.95));
}

.movie-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.movie-card.is-loading .movie-poster::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.11), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: wf-shimmer 1.35s linear infinite;
}

.movie-card.is-loading .movie-poster img {
  opacity: 0;
}

.movie-card:hover .movie-poster img {
  transform: scale(1.08);
  filter: brightness(0.84);
}

.movie-badge-row {
  position: absolute;
  inset: 12px 12px auto 12px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 0.55rem;
}

.badge-top,
.badge-bottom {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  border-radius: 999px;
  padding: 0.4rem 0.72rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.badge-top {
  color: #fff;
  background: linear-gradient(135deg, rgba(245, 93, 62, 0.95), rgba(255, 123, 73, 0.95));
}

.badge-bottom {
  color: var(--wf-accent);
  background: rgba(6, 12, 22, 0.78);
  border: 1px solid rgba(255, 209, 102, 0.26);
}

.movie-meta-bar {
  position: absolute;
  right: 12px;
  bottom: 14px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.movie-year-pill,
.movie-hot-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.64rem;
  border-radius: 999px;
  background: rgba(6, 12, 22, 0.68);
  color: var(--wf-text);
  font-size: 0.74rem;
  font-weight: 700;
}

.movie-hot-pill {
  color: #fff;
  background: rgba(245, 93, 62, 0.85);
}

.movie-title-bar {
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  padding: 4.2rem 1rem 1rem;
}

.movie-title {
  margin: 0;
  font-family: var(--wf-font-heading);
  color: var(--wf-text);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.movie-submeta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  color: var(--wf-text-soft);
  font-size: 0.79rem;
}

.play-icon {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 3;
  transform: translate(-50%, -50%) scale(0.82);
  opacity: 0;
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.play-icon i {
  font-size: 4rem;
  color: rgba(255, 255, 255, 0.94);
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.42));
}

.movie-card:hover .play-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.wf-empty {
  padding: 4rem 1.5rem;
  text-align: center;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--wf-border);
}

.wf-empty i {
  font-size: 2.8rem;
  color: var(--wf-accent);
}

.wf-empty h3 {
  margin-top: 1rem;
  font-family: var(--wf-font-heading);
}

.wf-empty p {
  max-width: 44ch;
  margin: 0.75rem auto 0;
  color: var(--wf-text-soft);
}

.wf-skeleton-grid {
  display: grid;
  grid-template-columns: inherit;
  gap: inherit;
}

.wf-skeleton-card {
  min-height: 340px;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  background-size: 200% 100%;
  animation: wf-shimmer 1.35s linear infinite;
}

.wf-skeleton-card::before {
  content: "";
  display: block;
  width: 100%;
  aspect-ratio: 2 / 3;
  background: rgba(255,255,255,0.06);
}

.wf-skeleton-card::after {
  content: "";
  display: block;
  width: calc(100% - 28px);
  height: 58px;
  margin: 16px 14px 0;
  border-radius: 16px;
  background: rgba(255,255,255,0.07);
}

.wf-toast-stack {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1600;
  display: grid;
  gap: 0.75rem;
  width: min(92vw, 360px);
}

.wf-toast {
  padding: 1rem 1rem 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid var(--wf-border);
  background: rgba(10, 18, 31, 0.96);
  box-shadow: var(--wf-shadow-card);
  color: #fff;
  animation: wf-toast-in 0.25s ease both;
}

.wf-toast.is-success {
  border-color: rgba(70, 199, 136, 0.35);
}

.wf-toast.is-error {
  border-color: rgba(245, 93, 62, 0.35);
}

.wf-toast.is-warning {
  border-color: rgba(255, 209, 102, 0.35);
}

.wf-toast-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

.wf-toast p {
  margin: 0;
  color: var(--wf-text-soft);
  line-height: 1.55;
}

.wf-texture::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.06;
  background-image:
    linear-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  mix-blend-mode: soft-light;
}

.wf-admin-shell {
  min-height: calc(100vh - 82px);
  padding: 1.5rem;
}

.wf-admin-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.5rem;
}

.wf-admin-sidebar,
.wf-admin-content,
.wf-admin-card {
  background: rgba(9, 18, 31, 0.9);
  border: 1px solid var(--wf-border);
  border-radius: 24px;
  box-shadow: var(--wf-shadow-soft);
}

.wf-admin-sidebar {
  padding: 1.2rem;
  position: sticky;
  top: 100px;
  align-self: start;
}

.wf-admin-content,
.wf-admin-card {
  padding: 1.35rem;
}

.wf-admin-nav {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
}

.wf-admin-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  color: var(--wf-text-soft);
  background: transparent;
  border: 1px solid transparent;
}

.wf-admin-nav .nav-link.active,
.wf-admin-nav .nav-link:hover {
  color: #fff;
  background: rgba(255, 123, 73, 0.12);
  border-color: rgba(255, 123, 73, 0.22);
}

.wf-admin-grid {
  display: grid;
  gap: 1rem;
}

.wf-admin-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.wf-admin-kpi {
  padding: 1.1rem;
  border-radius: 20px;
  border: 1px solid var(--wf-border);
  background: rgba(255, 255, 255, 0.04);
}

.wf-admin-kpi strong {
  display: block;
  margin-top: 0.55rem;
  font-family: var(--wf-font-heading);
  font-size: 1.7rem;
}

.wf-admin-table-wrap {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--wf-border);
}

.wf-admin-table {
  width: 100%;
  margin: 0;
  color: var(--wf-text);
}

.wf-admin-table thead th {
  padding: 1rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--wf-text-soft);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--wf-border);
}

.wf-admin-table tbody td {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.wf-admin-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

.wf-admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.wf-admin-form {
  display: grid;
  gap: 1.3rem;
}

.wf-admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.wf-admin-field,
.wf-admin-section {
  padding: 1rem;
  border-radius: 18px;
  border: 1px solid var(--wf-border);
  background: rgba(255, 255, 255, 0.03);
}

.wf-admin-field label,
.wf-admin-section-title {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--wf-text-soft);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wf-admin-input,
.wf-admin-select,
.wf-admin-textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--wf-border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--wf-text);
  padding: 0.85rem 0.95rem;
}

.wf-admin-input:focus,
.wf-admin-select:focus,
.wf-admin-textarea:focus {
  outline: none;
  border-color: rgba(255, 123, 73, 0.34);
  box-shadow: 0 0 0 0.24rem rgba(255, 123, 73, 0.12);
}

.wf-admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.8rem;
}

@keyframes wf-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@keyframes wf-page-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes wf-toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.wf-pagination .page-link {
  color: var(--wf-text-soft);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--wf-border);
  border-radius: 999px !important;
  margin: 0 0.18rem;
  min-width: 42px;
  text-align: center;
}

.wf-pagination .page-link:hover {
  color: #fff;
  background: rgba(255, 123, 73, 0.12);
  border-color: rgba(255, 123, 73, 0.22);
}

.wf-pagination .page-item.active .page-link {
  color: #fff;
  background: linear-gradient(135deg, var(--wf-primary), var(--wf-primary-strong));
  border-color: transparent;
}

.wf-pagination .page-item.disabled .page-link {
  color: var(--wf-text-muted);
  background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1199px) {
  .wf-grid-5 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .wf-grid-5,
  .wf-grid-4 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .wf-grid-2 {
    grid-template-columns: 1fr;
  }

  .wf-admin-layout {
    grid-template-columns: 1fr;
  }

  .wf-admin-sidebar {
    position: static;
  }

  .wf-admin-kpis,
  .wf-admin-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .wf-section {
    width: min(calc(100% - 24px), var(--wf-max));
    margin-bottom: 2.4rem;
  }

  .wf-section-head {
    flex-direction: column;
    align-items: start;
  }

  .wf-grid-5,
  .wf-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .wf-toast-stack {
    right: 12px;
    left: 12px;
    width: auto;
  }

  .wf-admin-shell {
    padding: 1rem;
  }

  .wf-admin-kpis,
  .wf-admin-form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 479px) {
  .wf-grid-5,
  .wf-grid-4 {
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
  }

  .movie-title {
    font-size: 0.92rem;
  }
}
