:root {
  --bg:         #0d0d0d;
  --card:       #1a1a1a;
  --border:     #2a2a2a;
  --accent:     #4f9cf9;
  --accent-glow: rgba(79,156,249,0.15);
  --text:       #f0f0f0;
  --text-muted: #555;
  --text-sub:   #888;
}

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

body {
  min-height: 100vh;
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── LOGIN ─────────────────────────────────── */

#login-wrap {
  background-image: radial-gradient(ellipse 70% 55% at 50% 42%, rgba(79,156,249,0.05) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 100vh;
  transition: opacity 0.4s ease;
}

#login-wrap.hiding {
  opacity: 0;
  pointer-events: none;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top-color: rgba(79,156,249,0.22);
  border-radius: 16px;
  padding: 52px 44px 44px;
  width: 100%;
  max-width: 400px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.025) inset,
    0 24px 64px rgba(0,0,0,0.65),
    0 0 48px rgba(79,156,249,0.05);
  animation: rise 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

.logo       { text-align: center; margin-bottom: 24px; animation: rise 0.45s 0.06s cubic-bezier(0.16,1,0.3,1) both; }
.wordmark   { animation: rise 0.45s 0.10s cubic-bezier(0.16,1,0.3,1) both; }
.subtitle   { animation: rise 0.45s 0.14s cubic-bezier(0.16,1,0.3,1) both; }
#login-form { animation: rise 0.45s 0.18s cubic-bezier(0.16,1,0.3,1) both; }

.logo-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 13px;
  background: rgba(79,156,249,0.08);
  border: 1px solid rgba(79,156,249,0.18);
}

.logo-box svg { width: 22px; height: 22px; color: var(--accent); }

.wordmark {
  font-family: 'Sora', sans-serif;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.03em;
  text-align: center;
  margin-bottom: 6px;
}

.wordmark em { font-style: normal; color: var(--accent); }

.subtitle {
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 36px;
}

label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-sub);
  margin-bottom: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.input-wrap { position: relative; }

input[type="password"],
input[type="text"] {
  width: 100%;
  padding: 13px 46px 13px 16px;
  background: rgba(0,0,0,0.35);
  border: 1px solid #303030;
  border-radius: 10px;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.pw-toggle {
  position: absolute;
  right: 13px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  padding: 4px; margin: 0; width: auto;
  cursor: pointer; color: #444;
  display: flex; align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
  box-shadow: none;
}

.pw-toggle:hover  { color: #777; background: none; box-shadow: none; transform: translateY(-50%); }
.pw-toggle:active { transform: translateY(-50%) scale(0.95); }
.pw-toggle svg    { width: 17px; height: 17px; }

.pw-toggle .icon-hide          { display: none; }
.pw-toggle.showing .icon-show  { display: none; }
.pw-toggle.showing .icon-hide  { display: block; }

.error-msg {
  display: none;
  align-items: center;
  gap: 8px;
  margin-top: 11px;
  padding: 10px 14px;
  background: rgba(220,60,60,0.1);
  border: 1px solid rgba(220,60,60,0.22);
  border-radius: 8px;
  color: #f87171;
  font-size: 0.8125rem;
}

.error-msg.visible { display: flex; }
.error-msg::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #f87171;
  flex-shrink: 0;
}

.submit-btn {
  width: 100%;
  margin-top: 20px; padding: 14px;
  background: var(--accent);
  background-image: linear-gradient(160deg, #62aaff 0%, #4f9cf9 45%, #3a87e8 100%);
  border: none; border-radius: 10px;
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem; font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(79,156,249,0.28);
  transition: opacity 0.18s, transform 0.1s, box-shadow 0.18s;
}

.submit-btn:hover    { opacity: 0.9; box-shadow: 0 6px 28px rgba(79,156,249,0.4); }
.submit-btn:active   { transform: scale(0.98); }
.submit-btn:disabled { opacity: 0.6; cursor: default; transform: none; }

/* ── PLAYER ─────────────────────────────────── */

#player-wrap {
  display: none;
  position: fixed;
  inset: 0;
  background: #000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

#player-wrap.visible {
  display: flex;
}

#player-wrap.shown {
  opacity: 1;
}

.video-inner {
  width: 100%;
  max-width: 1200px;
  padding: 0 16px;
  position: relative;
}

video {
  width: 100%;
  border-radius: 8px;
  background: #000;
  display: block;
  box-shadow: 0 8px 40px rgba(0,0,0,0.8);
}

.footer {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
}

.logout {
  font-size: 0.8125rem;
  color: #555;
  text-decoration: none;
  transition: color 0.2s;
}

.logout:hover { color: #888; }
