/* ====== Global Reset & Base ====== */
:root {
  --bg-1: #0f172a;      /* slate-900 */
  --bg-2: #111827;      /* gray-900  */
  --card: #0b1220ee;    /* translucent card */
  --gold: #ffd166;
  --gold-2: #ffbf3f;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --accent: #22d3ee;    /* cyan-400 */
  --error: rgba(239, 68, 68, 0.12);
  --success: rgba(34, 197, 94, 0.12);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  background: radial-gradient(1200px 800px at 20% 10%, #182238 0%, var(--bg-1) 50%, var(--bg-2) 100%);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(16px, 4vw, 32px);
  line-height: 1.5;
}

/* ====== Video Background ====== */
.video-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.video-background video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(11, 18, 32, 0.8), rgba(11, 18, 32, 0.6));
  z-index: 1;
}

/* ====== Layout & Card ====== */
.center-wrap {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card {
  width: 100%;
  max-width: 400px;
  margin: clamp(20px, 5vh, 60px) auto 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20彼此

System: 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  border-radius: 20px;
  padding: clamp(20px, 3.5vw, 28px);
  animation: floatIn 0.8s ease-out;
  position: relative; /* Ensure card is parent for absolute positioning */
}

.card.narrow {
  max-width: 400px;
}

/* ====== Sound Toggle Button ====== */
.sound-toggle-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 18px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.sound-toggle-btn:hover,
.sound-toggle-btn:focus {
  background: var(--gold);
  color: #0b1220;
  box-shadow: 0 4px 15px rgba(255, 209, 102, 0.3);
  transform: translateY(-1px);
}

.sound-toggle-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
}

/* ====== Logo Animation ====== */
.logo-pulse {
  max-width: 200px;
  margin-bottom: 20px;
  display: block;
  margin-left: auto;
  margin-right: auto;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ====== Typography ====== */
.h2 {
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  margin-bottom: 12px;
  color: #fff;
}

.lead {
  color: var(--muted);
  font-size: clamp(14px, 2vw, 16px);
  margin-bottom: 24px;
}

/* ====== Form Elements ====== */
.form-grid {
  display: grid;
  gap: 16px;
}

.label {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.input,
.select {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input:focus,
.select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.15);
  outline: none;
}

/* ====== Buttons ====== */
.btn {
  padding: 12px 18px;
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(90deg, var(--gold), var(--gold-2));
  color: #0b1220;
  box-shadow: 0 4px 15px rgba(255, 209, 102, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(255, 209, 102, 0.4);
  transform: translateY(-1px);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ====== Status Messages ====== */
.error,
.success {
  display: none;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 14px;
}

.error {
  background: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.success {
  background: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

/* ====== Animations ====== */
@keyframes floatIn {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.spin {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ====== Utility Classes ====== */
.text-center { text-align: center; }
.w-full { width: 100%; }
.justify-center { justify-content: center; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.my-4 { margin: 24px 0; }