﻿@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #050913;
  --bg-2: #091327;
  --bg-3: #132849;
  --surface: rgba(11, 21, 39, 0.72);
  --surface-strong: rgba(12, 24, 44, 0.9);
  --surface-soft: rgba(129, 180, 255, 0.08);
  --line: rgba(173, 206, 255, 0.22);
  --line-strong: rgba(176, 216, 255, 0.52);
  --text: #f4f8ff;
  --muted: #a7b8d9;
  --accent: #9cc1ff;
  --accent-2: #75e6ff;
  --danger: #ff9ba8;
  --success: #90efbd;
  --shadow: 0 22px 55px rgba(0, 0, 0, 0.45);
  --font-main: 'Manrope', 'SF Pro Text', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  font-family: var(--font-main);
  color: var(--text);
  background:
    radial-gradient(1200px 720px at 8% -15%, rgba(109, 159, 255, 0.34), transparent 57%),
    radial-gradient(1200px 740px at 96% -10%, rgba(76, 235, 255, 0.2), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 47%, #101c33 100%);
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: '';
  position: fixed;
  inset: -20vh -20vw;
  pointer-events: none;
  z-index: 0;
}

body::before {
  background: conic-gradient(from 180deg at 50% 50%, rgba(109, 160, 255, 0.16), rgba(78, 236, 255, 0.08), rgba(109, 160, 255, 0.16));
  filter: blur(86px);
  animation: auroraSpin 28s linear infinite;
}

body::after {
  background:
    radial-gradient(circle at 24% 30%, rgba(255, 255, 255, 0.13), transparent 42%),
    radial-gradient(circle at 76% 60%, rgba(255, 255, 255, 0.08), transparent 38%);
  filter: blur(110px);
  opacity: 0.4;
  animation: auroraFloat 16s ease-in-out infinite alternate;
}

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

.page,
.auth-wrap {
  position: relative;
  z-index: 1;
}

.page {
  width: min(1320px, 92vw);
  margin: 0 auto;
  padding: 18px 0 72px;
  animation: fadeUp 0.45s ease both;
}

.site-header {
  position: sticky;
  top: 10px;
  z-index: 60;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  margin-bottom: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(132deg, rgba(14, 27, 50, 0.82), rgba(9, 19, 36, 0.9));
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, rgba(175, 220, 255, 0.2), transparent 42%, rgba(105, 222, 255, 0.14));
  opacity: 0.36;
  pointer-events: none;
}

.site-header > * {
  position: relative;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-main {
  font-size: clamp(1.45rem, 2.7vw, 2.24rem);
  font-weight: 800;
  letter-spacing: -0.012em;
  background: linear-gradient(120deg, #f6fbff 0%, #d9e9ff 35%, #87d9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 10px 26px rgba(0, 0, 0, 0.33);
}

.brand-tag {
  font-size: 0.72rem;
  color: #97eeff;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.94;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.avatar-link {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.avatar-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  box-shadow: 0 8px 24px rgba(96, 155, 255, 0.22);
}

.avatar-mini {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-menu {
  position: relative;
}

.profile-menu::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 14px;
}

.profile-trigger {
  padding: 0;
}

.profile-pop {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 178px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(9, 17, 31, 0.97);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42);
  padding: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0s linear 0.22s;
  z-index: 70;
}

.profile-pop-item {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text);
  border-radius: 8px;
  padding: 9px 10px;
  text-align: left;
  cursor: pointer;
  display: block;
  font: inherit;
}

.profile-pop-item:hover,
.profile-pop-item:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  outline: none;
}

.profile-pop-item.danger {
  color: #ff9cab;
}

@media (hover: hover) and (pointer: fine) {
  .profile-menu:hover .profile-pop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    transition-delay: 0s;
  }
}

.profile-menu.open .profile-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
}

.btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(96, 155, 255, 0.22);
}

.btn:focus-visible {
  outline: none;
  border-color: rgba(127, 198, 255, 0.92);
  box-shadow: 0 0 0 3px rgba(127, 198, 255, 0.26);
}

.btn.primary {
  border: 0;
  background: linear-gradient(120deg, #ecf5ff 0%, #b3d0ff 45%, #7fe8ff 100%);
  color: #08101f;
  font-weight: 800;
  box-shadow: 0 8px 26px rgba(127, 184, 255, 0.35);
}

.btn.primary:hover {
  box-shadow: 0 12px 34px rgba(127, 184, 255, 0.52);
}

.btn:disabled,
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hero-shell {
  border: 1px solid var(--line);
  border-radius: 26px;
  overflow: hidden;
  min-height: 450px;
  position: relative;
  margin-bottom: 26px;
  background: linear-gradient(155deg, rgba(15, 25, 42, 0.95), rgba(11, 22, 40, 0.9));
  box-shadow: var(--shadow);
}

.hero-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(122deg, rgba(164, 205, 255, 0.22), transparent 40%, rgba(116, 232, 255, 0.16));
  opacity: 0.62;
  pointer-events: none;
}

.hero-shell::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  background: linear-gradient(180deg, rgba(6, 11, 20, 0), rgba(6, 11, 20, 0.9));
  pointer-events: none;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  filter: saturate(1.2) contrast(1.05);
  transform: scale(1.02);
}

.hero-overlay {
  position: relative;
  z-index: 1;
  padding: 40px;
  min-height: 450px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #8cf0ff;
  font-size: 0.76rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 4.2rem);
  line-height: 1.02;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: -0.015em;
  text-shadow: 0 8px 42px rgba(0, 0, 0, 0.56);
}

.hero-meta {
  color: #c8d8f6;
  margin-bottom: 12px;
  font-size: 0.94rem;
}

.hero-overview {
  max-width: 760px;
  line-height: 1.58;
  color: #e7efff;
  margin-bottom: 18px;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section {
  margin-bottom: 24px;
}

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

h1.section-title,
h2.section-title,
h3.section-title {
  font-size: 1.14rem;
  margin: 0;
  letter-spacing: 0.01em;
}

.section-sub {
  color: var(--muted);
  font-size: 0.84rem;
}

#homeSections > .section {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(10, 18, 33, 0.48);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.movie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(188px, 1fr));
  gap: 14px;
}

.carousel-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(176px, 220px);
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
}

.carousel-row .movie-card {
  scroll-snap-align: start;
}

.carousel-row::-webkit-scrollbar {
  height: 8px;
}

.carousel-row::-webkit-scrollbar-thumb {
  background: rgba(167, 201, 255, 0.35);
  border-radius: 999px;
}

.movie-card {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(24, 36, 60, 0.76), rgba(9, 15, 29, 0.95));
  box-shadow: 0 12px 30px rgba(4, 8, 16, 0.45);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  animation: fadeUp 0.45s ease both;
}

.movie-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 45%);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.movie-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--line-strong);
  box-shadow: 0 18px 38px rgba(94, 156, 255, 0.28);
}

.movie-card:hover::after {
  opacity: 1;
}

.movie-card:hover .movie-thumb {
  transform: scale(1.07);
}

.skeleton-card {
  pointer-events: none;
}

.skeleton-box,
.skeleton-line {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06) 25%, rgba(255, 255, 255, 0.14) 40%, rgba(255, 255, 255, 0.06) 55%);
  background-size: 220% 100%;
  animation: skeletonPulse 1.4s ease-in-out infinite;
}

.skeleton-line {
  height: 11px;
  border-radius: 999px;
  margin: 8px 0 0;
}

.skeleton-line.short {
  width: 62%;
}

.movie-thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: radial-gradient(circle at 50% 40%, rgba(138, 196, 255, 0.26), rgba(9, 14, 24, 0.94));
  display: block;
  transition: transform 0.35s ease;
}

.movie-body {
  padding: 11px 11px 12px;
  background: linear-gradient(180deg, rgba(11, 19, 35, 0.65), rgba(9, 15, 29, 0.95));
}

.movie-title {
  margin: 0 0 6px;
  font-weight: 700;
  line-height: 1.32;
  font-size: 0.96rem;
}

.movie-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.81rem;
  line-height: 1.45;
}

.empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.player-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.84fr) minmax(290px, 1fr);
  gap: 14px;
  align-items: start;
}

.player-wrap {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  background: #02040a;
  box-shadow: var(--shadow);
}

.player-wrap iframe {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  border: 0;
  background: #03070f;
}

.player-loading,
.player-error {
  position: absolute;
  inset: 0 auto 42px 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 2;
}

.player-loading {
  background: rgba(5, 12, 22, 0.72);
  color: #dce9ff;
  font-weight: 600;
}

.player-error {
  background: rgba(29, 8, 12, 0.8);
}

.player-loading[hidden],
.player-error[hidden] {
  display: none;
}

.player-status {
  margin: 0;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
  font-size: 0.86rem;
  color: #bfd3ff;
  background: rgba(4, 10, 20, 0.86);
}

.player-status.success {
  color: #92e6b0;
}

.player-status.error {
  color: #ff9e9e;
}

.pulse {
  animation: pulseCard 0.9s ease-in-out 1;
}

.info-panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  background: var(--surface-strong);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.info-title {
  margin: 0 0 8px;
  font-size: 1.46rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.info-meta,
.info-text {
  margin: 0 0 10px;
  color: #d2ddf5;
  line-height: 1.56;
}

#episodeControls {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.title-poster {
  width: 100%;
  max-width: 360px;
  border-radius: 14px;
  border: 1px solid var(--line);
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.auth-wrap {
  width: min(460px, 92vw);
  margin: max(8vh, 52px) auto 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: fadeUp 0.45s ease both;
}

.auth-title {
  margin: 10px 0 16px;
  font-size: 2rem;
  letter-spacing: -0.01em;
}

.form-grid {
  display: grid;
  gap: 12px;
}

label {
  font-size: 0.82rem;
  color: #c6d7f8;
  margin-bottom: 4px;
  display: inline-block;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(174, 208, 255, 0.28);
  background: rgba(8, 14, 24, 0.9);
  color: #f4f8ff;
  padding: 10px 12px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #91a5ca;
}

select option {
  background: #0b1322;
  color: #f4f8ff;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(134, 195, 255, 0.88);
  box-shadow: 0 0 0 4px rgba(134, 195, 255, 0.15);
  background: rgba(13, 22, 36, 0.96);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f4f8ff;
  -webkit-box-shadow: 0 0 0 1000px #0b1322 inset;
  transition: background-color 9999s ease-in-out 0s;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input[type='checkbox'] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  accent-color: #88c4ff;
}

.inline-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.grow-field {
  flex: 1;
  min-width: 220px;
}

.switches {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.switches label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #d3def7;
  margin: 0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 14px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  background: var(--surface);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.12), transparent 36%);
  opacity: 0.2;
  pointer-events: none;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel h2 {
  margin: 0 0 12px;
  font-size: 1.07rem;
  letter-spacing: 0.01em;
}

.panel hr {
  border: 0;
  border-top: 1px solid rgba(174, 208, 255, 0.24);
  width: 100%;
  margin: 18px 0;
}

.tab-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(7, 13, 24, 0.42);
}

.tab-btn {
  border: 1px solid rgba(174, 208, 255, 0.2);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.tab-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(174, 208, 255, 0.48);
  background: rgba(255, 255, 255, 0.07);
}

.tab-btn.active {
  border-color: var(--line-strong);
  background: linear-gradient(120deg, rgba(194, 222, 255, 0.27), rgba(122, 229, 255, 0.2));
  color: #f8fcff;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeUp 0.3s ease;
}

.upload-panel {
  display: none;
  margin-top: 10px;
}

.upload-panel.active {
  display: block;
}

.upload-form-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.92fr) minmax(0, 1.55fr);
  gap: 14px;
  align-items: start;
}

.upload-meta-column,
.upload-main-column {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.025);
}

#movieForm > .btn.primary,
#seriesForm > .btn.primary {
  justify-self: start;
  min-width: 190px;
}

#tmdbPreviewMovie,
#tmdbPreviewSeries {
  margin-top: 0;
}

.tmdb-preview-card {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 10px;
  border: 1px solid rgba(174, 208, 255, 0.25);
  border-radius: 12px;
  padding: 10px;
  background: rgba(9, 17, 32, 0.72);
}

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

.tmdb-preview-art {
  width: 82px;
  height: 122px;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: radial-gradient(circle at 50% 30%, rgba(141, 201, 255, 0.3), rgba(7, 13, 24, 0.95));
}

.tmdb-preview-content {
  display: grid;
  gap: 5px;
}

.tmdb-preview-content h4 {
  margin: 0;
  font-size: 0.97rem;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid rgba(174, 208, 255, 0.3);
  border-radius: 999px;
  background: rgba(128, 192, 255, 0.15);
  font-size: 0.75rem;
  color: #d7ecff;
}

#statsBar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

#statsBar .btn {
  justify-content: center;
  border-radius: 12px;
  padding: 10px;
  font-size: 0.82rem;
  background: rgba(129, 180, 255, 0.1);
  pointer-events: none;
}

.catalog-tools {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  background: var(--surface-soft);
}

.catalog-tools > div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.paginator-row {
  justify-content: center;
  margin-top: 12px;
}

.movie-admin-list,
.user-list {
  display: grid;
  gap: 10px;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.movie-admin-list::-webkit-scrollbar,
.user-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.movie-admin-list::-webkit-scrollbar-thumb,
.user-list::-webkit-scrollbar-thumb {
  background: rgba(167, 201, 255, 0.33);
  border-radius: 999px;
}

.admin-item {
  border: 1px solid rgba(170, 204, 255, 0.22);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.admin-item:hover {
  border-color: rgba(170, 204, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.admin-item h3 {
  margin: 0 0 6px;
  font-size: 0.96rem;
}

.admin-media {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.admin-poster {
  width: 80px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  border: 1px solid var(--line);
  object-fit: cover;
  background: rgba(255, 255, 255, 0.06);
}

.edit-episodes {
  min-height: 140px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

.admin-meta {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.msg {
  margin-top: 8px;
  font-size: 0.84rem;
  color: var(--muted);
}

.msg.error {
  color: var(--danger);
}

.msg.success {
  color: var(--success);
}

.profile-panel {
  padding: 18px;
}

.profile-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.profile-avatar-wrap {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.profile-avatar {
  width: 200px;
  height: 200px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
}

.profile-avatar.avatar-empty {
  opacity: 0.88;
}

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

.comment-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.comment-item {
  border: 1px solid rgba(170, 204, 255, 0.24);
  border-radius: 12px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.03);
}

.comment-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.comment-text {
  margin: 10px 0;
  color: #d6e1f7;
  line-height: 1.5;
  white-space: pre-wrap;
}

.comment-rating {
  color: #ffd084;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.rating-select {
  width: 180px;
}

#playlistMovies {
  min-height: 210px;
}

#playlistList .btn {
  font-size: 0.8rem;
  padding: 7px 12px;
}

body.login-page {
  background: #141414;
  min-height: 100vh;
}

body.login-page::before,
body.login-page::after {
  display: none;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.netflix-card {
  width: min(420px, 92vw);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 24px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
}

.netflix-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  display: block;
  object-fit: contain;
  padding: 12px;
}

.netflix-form {
  display: grid;
  gap: 10px;
}

.netflix-form label {
  color: #e6e6e6;
  margin-top: 4px;
}

.netflix-form input {
  border-radius: 8px;
  border: 1px solid #333;
  background: #1f1f1f;
  color: #fff;
}

.netflix-form input:focus {
  border-color: #e50914;
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.24);
}

.netflix-btn {
  margin-top: 6px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  background: #e50914;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease;
}

.netflix-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.07);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auroraSpin {
  0% {
    transform: rotate(0deg) scale(1);
  }

  100% {
    transform: rotate(360deg) scale(1.02);
  }
}

@keyframes auroraFloat {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-2vw, 2vh, 0);
  }
}

@keyframes skeletonPulse {
  0% {
    background-position: 140% 0;
  }

  100% {
    background-position: -40% 0;
  }
}

@keyframes pulseCard {
  0% {
    box-shadow: 0 0 0 rgba(143, 202, 255, 0);
  }

  30% {
    box-shadow: 0 0 0 3px rgba(143, 202, 255, 0.45);
  }

  100% {
    box-shadow: 0 0 0 rgba(143, 202, 255, 0);
  }
}

@media (max-width: 1220px) {
  .catalog-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .upload-form-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1060px) {
  .player-layout,
  .dashboard-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .hero-shell,
  .hero-overlay {
    min-height: 390px;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .header-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .catalog-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .page {
    width: min(1320px, 95vw);
    padding-top: 16px;
  }

  .hero-overlay {
    padding: 24px;
  }

  .hero-title {
    font-size: clamp(1.8rem, 9vw, 2.8rem);
  }

  .movie-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  }

  .tab-row {
    border-radius: 16px;
  }

  .upload-meta-column,
  .upload-main-column {
    padding: 10px;
  }

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

  .tmdb-preview-art {
    width: 100%;
    height: auto;
    aspect-ratio: 2 / 3;
    max-width: 210px;
  }
}

@media (max-width: 580px) {
  .catalog-tools,
  .top4-grid {
    grid-template-columns: 1fr;
  }

  .profile-avatar {
    width: 140px;
    height: 140px;
  }

  .btn {
    padding: 8px 12px;
    font-size: 0.86rem;
  }

  #statsBar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
