:root {
  --bg-deep: #050d1d;
  --bg-mid: #0f2346;
  --bg-light: #1b4e8e;
  --ice-1: #dff6ff;
  --ice-2: #9fdfff;
  --ice-3: #57bfff;
  --accent: #4bd7ff;
  --ok: #2ad06f;
  --warn: #ff9966;
  --bad: #ff5e7a;
  --glass: rgba(12, 38, 78, 0.65);
  --glass-border: rgba(151, 220, 255, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Exo 2", sans-serif;
  color: var(--ice-1);
  background:
    radial-gradient(circle at 80% 8%, rgba(79, 210, 255, 0.35), transparent 30%),
    radial-gradient(circle at 8% 90%, rgba(157, 214, 255, 0.2), transparent 34%),
    linear-gradient(170deg, #122d5f 0%, #0b1935 42%, #050c1b 100%);
  overflow-x: hidden;
}

.aurora,
.snow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.aurora {
  background:
    radial-gradient(ellipse at 20% -10%, rgba(127, 219, 255, 0.35) 0%, transparent 58%),
    radial-gradient(ellipse at 75% -15%, rgba(54, 174, 255, 0.42) 0%, transparent 60%);
  filter: blur(20px);
  animation: drift 12s ease-in-out infinite alternate;
}

.snow {
  background-image: radial-gradient(circle, rgba(226, 246, 255, 0.35) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: 0.2;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1280px, 95vw);
  margin: 1.2rem auto 2rem;
}

.panel {
  background: linear-gradient(180deg, rgba(43, 92, 160, 0.35), var(--glass));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow:
    inset 0 1px 0 rgba(220, 246, 255, 0.25),
    0 14px 36px rgba(2, 8, 20, 0.45);
  backdrop-filter: blur(9px);
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.logo-mark {
  font-family: Orbitron, sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  color: #def6ff;
  text-shadow: 0 0 14px rgba(77, 199, 255, 0.85);
  border: 1px solid rgba(146, 218, 255, 0.7);
  border-radius: 12px;
  padding: 0.45rem 0.65rem;
  background: linear-gradient(145deg, rgba(123, 199, 255, 0.28), rgba(25, 62, 124, 0.35));
}

.hero h1 {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  letter-spacing: 0.08em;
}

.hero p {
  margin: 0.15rem 0 0;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #bee8ff;
}

.account-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.welcome {
  color: #c8efff;
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
}

.dashboard-shell {
  position: relative;
}

.dashboard-shell.is-locked .dashboard-grid {
  filter: blur(2px) saturate(0.75);
  opacity: 0.58;
  pointer-events: none;
  user-select: none;
}

.dashboard-shell.is-locked .dashboard-lock-overlay {
  display: grid;
}

.dashboard-lock-overlay {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 4;
  pointer-events: none;
}

.lock-card {
  width: min(420px, 90%);
  border-radius: 14px;
  border: 1px solid rgba(161, 220, 255, 0.7);
  background: linear-gradient(180deg, rgba(16, 43, 83, 0.92), rgba(7, 21, 44, 0.94));
  box-shadow: 0 18px 32px rgba(2, 8, 20, 0.55);
  padding: 1rem 1.1rem;
  text-align: center;
}

.lock-icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.lock-card h3 {
  margin: 0.2rem 0 0.45rem;
}

.lock-card p {
  margin: 0;
  color: #cdefff;
}

.auth-panel {
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}

.auth-panel p {
  margin: 0 0 0.75rem;
  color: #c9ecff;
}

.upload-panel,
.current-panel,
.history-panel {
  padding: 1rem 1rem 1.1rem;
}

h2,
h3 {
  margin: 0 0 0.75rem;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.04em;
}

h3 {
  margin-top: 1rem;
  font-size: 1rem;
}

.drop-zone {
  border: 1px dashed rgba(164, 225, 255, 0.65);
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
  background: linear-gradient(180deg, rgba(27, 72, 133, 0.35), rgba(9, 30, 64, 0.28));
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.drop-zone.compact {
  padding: 0.75rem;
}

.drop-zone.is-hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(86, 208, 255, 0.45), 0 10px 22px rgba(7, 14, 32, 0.4);
}

.drop-zone p {
  margin: 0 0 0.75rem;
  font-weight: 600;
  color: #d4f2ff;
}

.meta-row {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 0.75rem;
  margin: 0.95rem 0;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: #d3f0ff;
}

input {
  border: 1px solid rgba(157, 215, 255, 0.55);
  border-radius: 10px;
  padding: 0.6rem 0.7rem;
  background: rgba(10, 31, 63, 0.72);
  color: #e6f8ff;
  font: inherit;
}

input::placeholder {
  color: rgba(194, 230, 250, 0.7);
}

.action-btn,
.chip-btn {
  border: 1px solid rgba(149, 216, 255, 0.65);
  border-radius: 10px;
  color: #ecf8ff;
  cursor: pointer;
  font-family: Orbitron, sans-serif;
  letter-spacing: 0.04em;
}

.action-btn {
  padding: 0.58rem 0.9rem;
}

.action-btn.primary {
  background: linear-gradient(180deg, #3ce294, #1e9f68);
  border-color: rgba(102, 251, 184, 0.75);
  color: #05291a;
}

.action-btn.secondary,
.chip-btn {
  background: linear-gradient(180deg, rgba(60, 126, 210, 0.82), rgba(30, 67, 126, 0.9));
}

.chip-btn {
  padding: 0.45rem 0.75rem;
  font-size: 0.8rem;
}

.chip-btn.active {
  border-color: rgba(125, 236, 255, 0.95);
  box-shadow: 0 0 0 1px rgba(119, 224, 255, 0.45);
}

.stack-right {
  display: grid;
  gap: 1rem;
}

.helper-text {
  margin: 0.55rem 0 0;
  color: #bee7ff;
  min-height: 1.3rem;
}

.upload-progress {
  margin-top: 0.8rem;
  border: 1px solid rgba(152, 219, 255, 0.35);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(10, 29, 56, 0.6);
  height: 10px;
}

.upload-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #3fd1ff, #4ef6af);
  transition: width 180ms ease;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.movie-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.movie-card {
  border: 1px solid rgba(145, 214, 255, 0.5);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(6, 26, 56, 0.6);
}

.poster {
  position: relative;
  height: 130px;
  background-size: cover;
  background-position: center;
}

.badge-live {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  background: linear-gradient(180deg, #ff7b8d, #c52740);
  color: white;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  font-size: 0.72rem;
  font-family: Orbitron, sans-serif;
}

.card-body {
  padding: 0.55rem;
}

.card-body h4 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.card-actions {
  display: flex;
  gap: 0.45rem;
}

.small-btn {
  flex: 1;
  border: 1px solid rgba(141, 215, 255, 0.6);
  border-radius: 8px;
  background: rgba(30, 83, 151, 0.86);
  color: #e9f8ff;
  font-family: Orbitron, sans-serif;
  padding: 0.33rem 0.45rem;
}

.small-btn.ok {
  background: linear-gradient(180deg, #37d183, #1a9358);
  color: #072816;
}

.table-wrap {
  overflow-x: auto;
}

.queue-panel {
  padding: 1rem;
}

.queue-state {
  color: #bde6ff;
  font-size: 0.86rem;
}

.queue-list {
  list-style: none;
  margin: 0.3rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.queue-item {
  border: 1px solid rgba(135, 207, 247, 0.35);
  border-radius: 10px;
  padding: 0.45rem 0.6rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  align-items: center;
  background: rgba(8, 26, 52, 0.52);
}

.queue-item-title {
  font-weight: 600;
}

.queue-item-actions {
  display: flex;
  gap: 0.35rem;
}

.small-btn.warn {
  background: linear-gradient(180deg, #f2a66c, #bf6c37);
  color: #2e1609;
}

.small-btn.bad {
  background: linear-gradient(180deg, #ff7e98, #be314c);
  color: #33050d;
}

.toast-stack {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 10;
  display: grid;
  gap: 0.5rem;
  width: min(340px, 92vw);
}

.toast {
  border-radius: 12px;
  border: 1px solid rgba(174, 228, 255, 0.4);
  background: linear-gradient(180deg, rgba(25, 65, 120, 0.94), rgba(11, 30, 60, 0.94));
  color: #ebf9ff;
  padding: 0.7rem 0.78rem;
  box-shadow: 0 10px 24px rgba(4, 8, 20, 0.5);
  animation: toast-in 180ms ease-out;
}

.toast.ok {
  border-color: rgba(97, 230, 166, 0.8);
}

.toast.error {
  border-color: rgba(255, 134, 154, 0.8);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 0.52rem 0.45rem;
  border-bottom: 1px solid rgba(129, 194, 233, 0.25);
}

th {
  font-family: Orbitron, sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
}

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 0.18rem 0.48rem;
  font-size: 0.75rem;
  font-family: Orbitron, sans-serif;
}

.status-pill.published { background: rgba(46, 201, 112, 0.3); color: #7ef2b6; }
.status-pill.archived { background: rgba(255, 128, 128, 0.28); color: #ffc0c0; }
.status-pill.ready { background: rgba(93, 180, 255, 0.3); color: #b9e5ff; }

.actions {
  display: flex;
  gap: 0.35rem;
}

@keyframes drift {
  from { transform: translateX(-1%) translateY(-1%); }
  to { transform: translateX(1%) translateY(1%); }
}

@media (max-width: 1120px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .movie-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .meta-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .movie-cards {
    grid-template-columns: 1fr;
  }

  .title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}
