/* ============================================
   Veenstad Live — stylesheet
   ============================================ */

:root {
  --accent: #e94560;
  --bg: #0f1020;
  --bg-2: #161830;
  --bg-3: #1f2247;
  --text: #f5f5fa;
  --text-dim: #b8b9d0;
  --muted: #7a7d9a;
  --border: rgba(255,255,255,.08);
  --radius: 14px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(ellipse at top left,  rgba(233,69,96,.15), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(83, 109, 254,.15), transparent 50%),
    var(--bg);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ Header ============ */

.site-header,
.admin-header {
  padding: 22px 0;
  border-bottom: 1px solid var(--border);
  background: rgba(15,16,32,.6);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.site-header .wrap,
.admin-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }

.brand-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(233,69,96,.2);
}

.admin-header nav {
  display: flex;
  gap: 20px;
  font-size: 14px;
}
.admin-header nav a {
  color: var(--text-dim);
}

/* ============ Status pill ============ */

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-dim);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.is-live .status {
  color: #fff;
  background: rgba(233,69,96,.18);
}
.is-live .status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(233,69,96,.25);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(233,69,96,.25); }
  50%      { box-shadow: 0 0 0 9px rgba(233,69,96,.05); }
}

/* ============ Hero / player ============ */

.hero {
  padding: 60px 0 40px;
}
.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 28px;
  letter-spacing: -0.02em;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #b8b9d0);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.player-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.player-wrap {
  position: relative;
  background: #000;
  aspect-ratio: 16 / 9;
}
.player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
}
.live-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 20px rgba(233,69,96,.4);
}
.live-badge span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-white 1.4s infinite;
}
@keyframes pulse-white {
  0%, 100% { opacity: 1; }
  50%      { opacity: .3; }
}

.now-playing {
  padding: 24px 28px;
}
.now-playing h2 {
  margin: 0 0 4px;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.now-playing p {
  margin: 0;
  color: var(--text-dim);
}

.player-fallback {
  padding: 60px 30px;
  text-align: center;
  color: var(--text-dim);
}

/* ============ Offline state ============ */

.offline-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  min-height: 320px;
}
@media (max-width: 680px) {
  .offline-wrap { grid-template-columns: 1fr; }
}

.offline-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  min-height: 260px;
}
.offline-art {
  background:
    radial-gradient(ellipse at center, rgba(233,69,96,.25), transparent 60%),
    var(--bg-3);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.vinyl {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background:
    repeating-radial-gradient(circle at center,
      #2a2a3e 0, #2a2a3e 2px,
      #1a1a2e 3px, #1a1a2e 5px);
  position: relative;
  animation: spin 8s linear infinite;
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
}
.vinyl-inner {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.4);
}
@keyframes spin { to { transform: rotate(360deg); } }

.offline-text {
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.offline-text h2 {
  margin: 0 0 8px;
  font-size: 24px;
}
.offline-text p {
  margin: 0;
  color: var(--text-dim);
}

/* ============ About section ============ */

.about {
  padding: 40px 0 80px;
}
.about h2 {
  font-size: 28px;
  margin: 0 0 16px;
  letter-spacing: -0.01em;
}
.about-text p {
  color: var(--text-dim);
  font-size: 17px;
  line-height: 1.7;
  margin: 0 0 14px;
  max-width: 700px;
}

/* ============ Footer ============ */

.site-footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }

/* ============ Login page ============ */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}
.login-wrap { width: 100%; max-width: 380px; }
.login-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow);
}
.login-card h1 {
  margin: 6px 0 8px;
  font-size: 22px;
}
.brand-login {
  font-size: 14px;
  color: var(--text-dim);
}
.login-card .hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.login-card code {
  background: rgba(255,255,255,.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}

/* ============ Admin ============ */

.admin-page { background: var(--bg); }
.admin-main { padding: 32px 0 80px; }

.card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}
.card h2 {
  margin: 0 0 18px;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.big-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.big-toggle-info p { margin: 4px 0; }
.big-toggle-info .muted { color: var(--muted); font-size: 14px; }

/* ============ Forms ============ */

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) {
  .form .row { grid-template-columns: 1fr; }
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 600;
}
.form label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  color: var(--text);
}

.form input[type=text],
.form input[type=url],
.form input[type=password],
.form input[type=email],
.form textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--text);
  font: inherit;
  width: 100%;
  transition: border .15s, box-shadow .15s;
}
.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(233,69,96,.18);
}
.form input[type=color] {
  width: 60px;
  height: 42px;
  padding: 4px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.form input[type=file] {
  color: var(--text-dim);
  padding: 8px 0;
}
.form .hint {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.thumb {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
}
.thumb img {
  max-width: 180px;
  height: auto;
  border-radius: 6px;
}

/* ============ Buttons ============ */

.btn {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform .08s, box-shadow .15s, background .15s;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  align-self: flex-start;
  box-shadow: 0 8px 24px rgba(233,69,96,.3);
}
.btn-primary:hover {
  background: #d63a55;
}

.btn-big {
  font-size: 16px;
  padding: 16px 28px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.btn-go {
  background: #2ecc71;
  color: #08321b;
  box-shadow: 0 10px 30px rgba(46,204,113,.3);
}
.btn-go:hover { background: #27b362; }
.btn-stop {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 30px rgba(233,69,96,.4);
}
.btn-stop:hover { background: #d63a55; }

/* ============ Alerts ============ */

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 14px;
}
.alert-ok {
  background: rgba(46,204,113,.15);
  color: #7be0a4;
  border: 1px solid rgba(46,204,113,.3);
}
.alert-error {
  background: rgba(233,69,96,.15);
  color: #ff8aa0;
  border: 1px solid rgba(233,69,96,.3);
}
