:root {
  --bg: #0c0c10;
  --bg-elevated: #17171c;
  --panel: #1c1c22;
  --panel-border: #2f2f38;
  --text: #f4f2ee;
  --muted: #9d9ca6;
  --orange: #ff7a1a;
  --orange-deep: #e85d04;
  --gold: #f4c542;
  --teal: #2ec4b6;
  --danger: #ff5d5d;
  --radius: 16px;
  --flame: linear-gradient(135deg, var(--orange) 0%, var(--gold) 100%);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(circle at 50% -10%, rgba(255,122,26,0.14) 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wrap {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.hero {
  position: relative;
  margin: -32px -20px 28px;
  height: 190px;
  overflow: hidden;
  border-radius: 0 0 22px 22px;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12,12,16,0.25) 0%, rgba(12,12,16,0.6) 62%, var(--bg) 100%);
}

.hero .brand,
.hero .admin-header {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 16px;
  margin-bottom: 0;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.brand svg { width: 30px; height: 30px; }

.brand-name {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.3px;
  white-space: nowrap;
  background: var(--flame);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 28px 22px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

h1 {
  font-size: 20px;
  margin: 0 0 6px;
}

p.sub {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 22px;
  line-height: 1.5;
}

.pin-input {
  width: 100%;
  font-size: 32px;
  letter-spacing: 14px;
  text-align: center;
  padding: 16px 0;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: var(--bg-elevated);
  color: var(--text);
  font-weight: 700;
}

.pin-input:focus {
  outline: none;
  border-color: var(--orange);
}

button {
  font: inherit;
  cursor: pointer;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 18px;
  border-radius: 12px;
  border: none;
  font-weight: 700;
  font-size: 15px;
  margin-top: 16px;
  transition: transform 0.05s ease, opacity 0.15s ease;
}

.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--flame);
  color: #201005;
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--panel-border);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(255,93,93,0.4);
}

.btn-record {
  background: linear-gradient(135deg, #d92626, #ff7a1a);
  color: #fff;
}

.btn-record.recording {
  background: var(--bg-elevated);
  border: 2px solid #d92626;
  color: #ff8686;
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217,38,38,0.4); }
  50% { box-shadow: 0 0 0 10px rgba(217,38,38,0); }
}

.error-text {
  color: var(--danger);
  font-size: 13px;
  margin-top: 10px;
  min-height: 18px;
}

.hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(46,196,182,0.08);
  border: 1px solid rgba(46,196,182,0.25);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  color: #bfe9e4;
  margin-bottom: 22px;
  line-height: 1.5;
}

.hint svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--teal); }

.track-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  font-weight: 700;
  margin-bottom: 4px;
}

.track-title {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 20px;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
}

.play-btn {
  flex: none;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--flame);
  border: none;
  color: #201005;
  display: flex;
  align-items: center;
  justify-content: center;
}

.play-btn svg { width: 20px; height: 20px; }

.seek-bar {
  flex: 1;
  -webkit-appearance: none;
  height: 5px;
  border-radius: 4px;
  background: var(--panel-border);
  accent-color: var(--orange);
}

.time {
  font-size: 12px;
  color: var(--muted);
  min-width: 74px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.section-divider {
  height: 1px;
  background: var(--panel-border);
  margin: 22px 0;
}

.record-status {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
  min-height: 20px;
}

.record-timer {
  text-align: center;
  font-size: 34px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-bottom: 8px;
  color: var(--gold);
}

.countdown {
  text-align: center;
  font-size: 64px;
  font-weight: 800;
  background: var(--flame);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding: 30px 0;
}

.confirm-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--flame);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #201005;
}

.confirm-icon svg { width: 30px; height: 30px; }

.center { text-align: center; }

footer {
  margin-top: auto;
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding-top: 30px;
  opacity: 0.7;
}

.hidden { display: none !important; }
