/* ===== reset / base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "SF Pro Display", "Inter", "PingFang SC",
               "Hiragino Sans", system-ui, sans-serif;
  color: #f3f6fb;
  background:
    radial-gradient(ellipse at top, #1f3b5e 0%, #0e1f3a 60%, #07142a 100%);
  min-height: 100vh;
  overflow: hidden;
  letter-spacing: 0.01em;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ===== topbar ===== */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 32px;
  z-index: 10;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 18px; }
.brand-sun { color: #ffcd5a; font-size: 22px; }
.brand-name { letter-spacing: 0.04em; }

.status {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; opacity: 0.8;
  background: rgba(255,255,255,0.06);
  padding: 6px 14px; border-radius: 999px;
  backdrop-filter: blur(10px);
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #f5a623; transition: background 0.3s;
}
.dot.connected { background: #36d399; box-shadow: 0 0 12px rgba(54,211,153,0.7); }
.dot.error { background: #f87171; }

/* ===== stage ===== */
.stage { position: relative; min-height: 100vh; }
.screen {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 80px 64px 64px;
  transition: opacity 0.4s ease, transform 0.4s ease;
}
.hidden { opacity: 0; pointer-events: none; transform: scale(0.98); }

/* ===== idle screen ===== */
.idle-hero { text-align: center; max-width: 720px; }
.idle-emoji {
  font-size: 96px;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.idle-hero h1 {
  font-size: 44px; font-weight: 700;
  margin: 24px 0 12px;
  background: linear-gradient(180deg, #fff 60%, #b6c8e6 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.idle-prompt {
  font-size: 18px; opacity: 0.75;
  margin-bottom: 48px;
}
.card-gallery {
  display: flex; gap: 24px; justify-content: center;
}
.mini-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  padding: 24px 36px;
  border-radius: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  backdrop-filter: blur(8px);
  transition: transform 0.2s, background 0.2s;
}
.mini-card:hover { transform: translateY(-4px); background: rgba(255,255,255,0.12); }
.mini-emoji { font-size: 56px; }
.mini-title { font-size: 14px; opacity: 0.85; letter-spacing: 0.04em; }

/* ===== card detail ===== */
.card-frame {
  width: 100%; max-width: 1200px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}

.card-illustration {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 32px;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
}
.illustration-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 30%, #6dd5fa 0%, transparent 50%),
    radial-gradient(circle at 70% 70%, #ff9a8b 0%, transparent 50%),
    linear-gradient(135deg, #4a90e2 0%, #6a4cdb 100%);
  filter: saturate(1.05);
}
.hero-emoji {
  position: relative; z-index: 1;
  font-size: 220px;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.35));
  transition: transform 0.5s;
}
.card-illustration:hover .hero-emoji { transform: scale(1.05) rotate(-2deg); }
.card-eyebrow {
  position: absolute; top: 24px; left: 24px; z-index: 2;
  font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.18em;
  background: rgba(0,0,0,0.35);
  padding: 8px 14px; border-radius: 999px;
  backdrop-filter: blur(8px);
}

.card-info h2.card-title {
  font-size: 56px; font-weight: 700; line-height: 1.05;
  margin-bottom: 8px;
}
.card-info h3.card-subtitle {
  font-size: 22px; font-weight: 400;
  opacity: 0.7; margin-bottom: 24px;
}
.card-description {
  font-size: 17px; line-height: 1.55; opacity: 0.82;
  margin-bottom: 32px; max-width: 520px;
}

/* buttons */
.actions { display: flex; gap: 14px; margin-bottom: 36px; }
.btn-primary, .btn-secondary {
  font-size: 16px; font-weight: 600;
  padding: 14px 28px; border-radius: 14px;
  display: inline-flex; align-items: center; gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
}
.btn-primary {
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  color: #0a1f0e;
  box-shadow: 0 8px 24px rgba(74,222,128,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(74,222,128,0.5); }
.btn-primary:active { transform: translateY(0); }
.play-icon { font-size: 13px; }

.btn-secondary {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-secondary:hover { background: rgba(255,255,255,0.14); }

/* progress card */
.progress-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 18px 22px; border-radius: 16px;
  max-width: 520px;
  backdrop-filter: blur(8px);
}
.progress-label { font-size: 13px; opacity: 0.6; margin-bottom: 12px; letter-spacing: 0.05em; }
.progress-stats { display: flex; gap: 36px; }
.stat { display: flex; align-items: center; gap: 12px; }
.stat-icon { font-size: 26px; }
.stat-label { font-size: 11px; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.1em; }
.stat-value { font-size: 18px; font-weight: 600; }

/* ===== player ===== */
.screen-player {
  background: #000;
  padding: 0;
}
#video-el {
  width: 100%; height: 100%;
  background: #000;
}
.btn-close {
  position: absolute; top: 24px; right: 24px;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,0.6); color: #fff;
  font-size: 20px; z-index: 10;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.btn-close:hover { background: rgba(0,0,0,0.85); }

/* ===== focus (TV remote / keyboard) =====
   Android TV 用户没鼠标, 只有 D-pad. 所有可交互元素必须有清晰 focus ring. */
:focus { outline: none; }
.btn-primary:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
  box-shadow: 0 0 0 6px rgba(74,222,128,0.45);
}
.btn-secondary:focus-visible,
.btn-close:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 4px;
  background: rgba(255,255,255,0.18);
}
.mini-card:focus-visible {
  outline: 3px solid #ffcd5a;
  outline-offset: 4px;
}

/* ===== responsive ===== */
@media (max-width: 900px) {
  .card-frame { grid-template-columns: 1fr; gap: 32px; }
  .card-info h2.card-title { font-size: 38px; }
  .hero-emoji { font-size: 140px; }
  .screen { padding: 80px 24px 40px; }
}
