/* ==========================================================================
   VISIONFLIX 4.5 - ULTRA-PREMIUM GLASSMORPHISM & STREAMING DESIGN SYSTEM
   ========================================================================== */

:root {
  --bg: #07070b;
  --bg-secondary: #0d0e15;
  --panel: rgba(18, 19, 30, 0.72);
  --panel-solid: #12131e;
  --panel-hover: rgba(28, 30, 48, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-active: rgba(229, 9, 20, 0.6);
  --text: #f8fafc;
  --muted: #94a3b8;
  
  --red: #e50914;
  --red-hover: #f6121d;
  --red-glow: rgba(229, 9, 20, 0.45);
  
  --purple-glow: rgba(147, 51, 234, 0.25);
  --cyan-glow: rgba(6, 182, 212, 0.2);
  
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-glow: 0 0 25px rgba(229, 9, 20, 0.35);
  --shadow-video: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 40px rgba(229, 9, 20, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background Animated Ambient Globs */
.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(140px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

.blob-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--red-glow), transparent 70%);
  top: -150px;
  left: -150px;
}

.blob-2 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--purple-glow), transparent 70%);
  top: 40%;
  right: -200px;
}

button, input, select, textarea {
  font-family: var(--font-body);
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.container {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   TOPBAR NAVIGATION
   ========================================================================== */

.customer-topbar, .topbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 32px;
  min-height: 72px;
  background: rgba(7, 7, 11, 0.78) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

body:has(.customer-topbar) .container,
body:has(.topbar) .container {
  padding-top: 96px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #ffffff;
  text-shadow: 0 0 20px var(--red-glow);
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff1e27, #990007);
  display: grid;
  place-items: center;
  font-size: 16px;
  box-shadow: 0 0 15px var(--red-glow);
}

.brand-highlight {
  color: var(--red);
}

.customer-left {
  display: flex;
  align-items: center;
  gap: 36px;
}

.customer-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.customer-nav a, .topbar nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 500;
  color: #cbd5e1;
  border: 1px solid transparent;
  transition: all 0.25s ease;
}

.customer-nav a:hover, .topbar nav a:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-1px);
}

.customer-nav a.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.85), rgba(180, 0, 10, 0.95));
  border-color: var(--red);
  box-shadow: 0 4px 15px var(--red-glow);
  font-weight: 600;
}

.customer-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.search-link, .admin-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  color: #e2e8f0;
  transition: all 0.2s ease;
}

.search-link:hover, .admin-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.login-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--red), #b90610);
  border: 1px solid var(--red);
  font-weight: 700;
  color: #ffffff;
  box-shadow: 0 4px 15px var(--red-glow);
  transition: all 0.25s ease;
}

.login-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--red-glow);
}

.user-menu-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.profile-pill {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), #450a0a);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 16px;
  color: #ffffff;
}

.btn-logout {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: #94a3b8;
  display: grid;
  place-items: center;
  transition: all 0.2s ease;
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.4);
}

.mobile-menu-btn {
  display: none;
  font-size: 20px;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
}

/* ==========================================================================
   HERO SPOTLIGHT BANNER
   ========================================================================== */

.hero {
  position: relative;
  min-height: 480px;
  border-radius: var(--radius-lg);
  padding: 60px;
  display: flex;
  align-items: center;
  background: linear-gradient(90deg, rgba(7, 7, 11, 0.96) 0%, rgba(7, 7, 11, 0.5) 60%, rgba(7, 7, 11, 0.9) 100%),
              radial-gradient(circle at 80% 30%, rgba(229, 9, 20, 0.35), transparent 45%),
              linear-gradient(135deg, #12131e, #1a1c2e);
  background-size: cover;
  background-position: center 20%;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  margin-bottom: 40px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 640px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(229, 9, 20, 0.15);
  color: #ff6b73;
  border: 1px solid rgba(229, 9, 20, 0.4);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.5px;
  margin-bottom: 16px;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.8);
}

.hero p {
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn.primary {
  background: linear-gradient(135deg, var(--red), #b90610);
  border-color: var(--red);
  box-shadow: 0 4px 20px var(--red-glow);
}

.btn.primary:hover {
  background: linear-gradient(135deg, var(--red-hover), #d00712);
  box-shadow: 0 8px 30px var(--red-glow);
  transform: translateY(-2px) scale(1.02);
}

.btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn.small {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

.btn.danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.btn.danger:hover {
  background: var(--danger);
  color: #ffffff;
}

/* ==========================================================================
   MEDIA CARDS & CATALOG
   ========================================================================== */

.content-section {
  margin-bottom: 44px;
}

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

.section-head h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-head h2 i {
  color: var(--red);
}

.section-head a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-head a:hover {
  color: #ffffff;
}

.netflix-row, .catalog-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(10px);
}

.card:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: var(--border-active);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.75), 0 0 20px var(--red-glow);
  z-index: 10;
}

.poster-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #0d0f17;
}

.poster-link {
  display: block;
  width: 100%;
  height: 100%;
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover img {
  transform: scale(1.06);
}

.poster-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1e1b4b, #0f172a);
  color: #6366f1;
  font-size: 48px;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: all 0.3s ease;
}

.play-overlay i {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red), #b90610);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 20px;
  padding-left: 3px;
  box-shadow: 0 0 25px var(--red-glow);
  transform: scale(0.7);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.card:hover .play-overlay {
  opacity: 1;
}

.card:hover .play-overlay i {
  transform: scale(1);
}

.card-fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(7, 7, 11, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  display: grid;
  place-items: center;
  font-size: 14px;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  z-index: 5;
}

.card-fav:hover {
  background: var(--red);
  border-color: var(--red);
  transform: scale(1.1);
}

.live-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: linear-gradient(135deg, var(--red), #990007);
  color: #ffffff;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
  box-shadow: 0 2px 10px var(--red-glow);
  z-index: 5;
}

.live-badge.static {
  position: static;
  font-size: 12px;
  padding: 6px 14px;
}

.card-body {
  padding: 14px;
}

.card-body strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.card-type {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.empty {
  grid-column: 1 / -1;
  padding: 60px 20px;
  text-align: center;
  background: var(--panel);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
}

.empty i {
  font-size: 48px;
  color: #334155;
  margin-bottom: 12px;
}

/* ==========================================================================
   WATCH PAGE & VIDEO PLAYER
   ========================================================================== */

.watch-page {
  max-width: 1240px;
  margin: 0 auto;
  padding-bottom: 60px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 20px;
}

.back-link:hover {
  color: #ffffff;
}

.watch-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.watch-title-row h1 {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 800;
  color: #ffffff;
}

.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-video);
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 24px;
}

.video-frame iframe, .video-frame video {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.watch-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.meta-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quality-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
}

.watch-description {
  font-size: 16px;
  line-height: 1.7;
  color: #cbd5e1;
  max-width: 960px;
  margin-bottom: 40px;
}

/* ==========================================================================
   CATALOG HEAD, SEARCH & AUTH
   ========================================================================== */

.catalog-head {
  padding: 10px 0 24px;
}

.catalog-head h1 {
  font-family: var(--font-heading);
  font-size: 38px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
}

.catalog-head p {
  color: var(--muted);
}

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 40px;
}

.big-search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  max-width: 800px;
  margin: 20px auto 40px;
}

.big-search input {
  font-size: 16px;
  padding: 14px 20px;
}

.panel, .auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(16px);
}

.auth-card {
  max-width: 440px;
  margin: 60px auto;
}

.auth-card .brand {
  margin-bottom: 24px;
}

label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 500;
  font-size: 14px;
  color: #cbd5e1;
}

input, select, textarea {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(7, 7, 11, 0.7);
  color: #ffffff;
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--red);
  box-shadow: 0 0 15px var(--red-glow);
}

.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  margin: 16px 0;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert.error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.alert.success {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}

.alert.info {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #93c5fd;
}

/* Administration */
.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.admin-tabs a {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-tabs a.active {
  background: var(--red);
  border-color: var(--red);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--red-glow);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.metric {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  backdrop-filter: blur(10px);
}

.metric i {
  font-size: 20px;
  color: var(--red);
  margin-bottom: 8px;
}

.metric span {
  display: block;
  font-size: 13px;
  color: var(--muted);
}

.metric strong {
  display: block;
  font-size: 28px;
  font-family: var(--font-heading);
  color: #ffffff;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 20px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1280px) {
  .netflix-row, .catalog-grid {
    grid-template-columns: repeat(5, 1fr);
  }
  .metrics {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  .customer-left {
    gap: 20px;
  }
  .customer-nav {
    gap: 2px;
  }
  .customer-nav a {
    padding: 8px 12px;
    font-size: 13px;
  }
  .netflix-row, .catalog-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .hero {
    padding: 40px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .customer-topbar, .topbar {
    padding: 12px 16px;
  }
  .mobile-menu-btn {
    display: block;
  }
  .customer-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(7, 7, 11, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
  }
  .menu-open .customer-nav {
    display: flex;
  }
  .customer-nav a {
    padding: 12px 16px;
  }
  .netflix-row, .catalog-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .hero {
    padding: 30px 20px;
    min-height: 380px;
  }
  .hero h1 {
    font-size: 30px;
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .watch-title-row h1 {
    font-size: 26px;
  }
}

@media (max-width: 520px) {
  .netflix-row, .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-link span, .admin-link span {
    display: none;
  }
  .brand {
    font-size: 20px;
  }
  .brand-icon {
    width: 32px;
    height: 32px;
  }
}
