/* Groote Vibrations — themed to match gbarac.com (black + burnt orange) */

:root {
  --bg: #141414;          /* near-black page, like the website */
  --bg-card: #1f1f1f;     /* site charcoal — matches the logo's backdrop */
  --bg-card-2: #2a2a2a;   /* nested surfaces */
  --bg-card-3: #333333;
  --border: #383838;
  --border-soft: #2e2e2e;
  --text: #f2efe9;        /* warm white */
  --text-dim: #9c958a;    /* warm grey */
  --accent: #d4411b;      /* GBARAC burnt orange */
  --accent-soft: #e8632f; /* lighter burnt orange for gradients/hover */
  --accent-deep: #b3360f;
  --accent-glow: rgba(212, 65, 27, 0.40);
  --cream: #f8ead1;       /* the logo's cream */
  --live: #f23b42;
  --radius: 16px;
}

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

html, body { height: 100%; }

body {
  font-family: "Segoe UI", "Helvetica Neue", system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Subtle, flat, on-brand — just a faint warm wash, no purple */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(680px 420px at 50% -8%, rgba(212, 65, 27, 0.10), transparent 70%),
    radial-gradient(560px 420px at 88% 108%, rgba(212, 65, 27, 0.06), transparent 70%);
  z-index: 0;
}

/* ---------- header ---------- */

.site-header {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px 28px 18px;
  border-bottom: 1px solid var(--border-soft);
}

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

.brand { display: flex; align-items: center; gap: 16px; min-width: 0; }

.brand-logo {
  height: 80px;
  width: auto;
  flex-shrink: 0;        /* don't let flex compress the logo horizontally */
  object-fit: contain;   /* preserve aspect ratio no matter what */
  display: block;
}

.brand-tagline {
  color: #cfc8bc;
  font-size: 0.95rem;
  line-height: 1.55;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

@media (max-width: 720px) {
  .brand-logo { height: 62px; }
  .brand-tagline { font-size: 0.86rem; }
}

.listeners {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 15px;
  border-radius: 999px;
  white-space: nowrap;
}

.listeners b { color: var(--text); font-weight: 700; }

.pulse-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.6; }
}

/* ---------- layout ---------- */

.layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(340px, 470px) minmax(340px, 560px);
  justify-content: center;
  gap: 22px;
  padding: 22px 24px 40px;
}

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 20px;
}

.card h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.player-column, .interact-column { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* ---------- player ---------- */

.player-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  padding: 28px 22px 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  background:
    radial-gradient(420px 240px at 50% 30%, rgba(212, 65, 27, 0.12), transparent 70%),
    linear-gradient(180deg, #242220, var(--bg-card) 60%);
}

/* warm hairline along the top edge of the player */
.player-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent-soft), transparent);
  opacity: 0.7;
}

.live-row {
  display: flex;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  justify-content: space-between;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  color: var(--live);
  border: 1px solid rgba(242, 59, 66, 0.45);
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(242, 59, 66, 0.10);
}

.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 8px rgba(242, 59, 66, 0.9);
  animation: pulse 1.4s ease-in-out infinite;
}

.placeholder-note {
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 4px 10px;
}

/* waveform visualizer */
.visualizer {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 56px;
}

.visualizer span {
  width: 5px;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--accent-soft), var(--accent));
  opacity: 0.30;
  transition: opacity 0.4s, height 0.4s;
}

.playing .visualizer span { opacity: 1; animation: bounce 1s ease-in-out infinite; }

/* symmetric-ish heights so it reads like a waveform, taller in the middle */
.visualizer span:nth-child(10), .visualizer span:nth-child(11) { height: 40px; }
.visualizer span:nth-child(9),  .visualizer span:nth-child(12) { height: 32px; }
.visualizer span:nth-child(8),  .visualizer span:nth-child(13) { height: 24px; }
.visualizer span:nth-child(7),  .visualizer span:nth-child(14) { height: 18px; }
.visualizer span:nth-child(6),  .visualizer span:nth-child(15) { height: 28px; }
.visualizer span:nth-child(5),  .visualizer span:nth-child(16) { height: 16px; }

.playing .visualizer span:nth-child(2n)  { animation-duration: 0.8s;  animation-delay: 0.10s; }
.playing .visualizer span:nth-child(3n)  { animation-duration: 1.2s;  animation-delay: 0.25s; }
.playing .visualizer span:nth-child(4n)  { animation-duration: 0.7s;  animation-delay: 0.05s; }
.playing .visualizer span:nth-child(5n)  { animation-duration: 1.05s; animation-delay: 0.33s; }
.playing .visualizer span:nth-child(7n)  { animation-duration: 0.9s;  animation-delay: 0.18s; }

@keyframes bounce {
  0%, 100% { transform: scaleY(0.45); }
  50%      { transform: scaleY(1.25); }
}

/* play button + broadcast rings */
.play-wrap {
  position: relative;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
}

.play-wrap .ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--accent);
  opacity: 0;
  pointer-events: none;
}

.playing .play-wrap .ring { animation: broadcast 2.4s ease-out infinite; }
.playing .play-wrap .ring:nth-child(2) { animation-delay: 0.8s; }
.playing .play-wrap .ring:nth-child(3) { animation-delay: 1.6s; }

@keyframes broadcast {
  0%   { transform: scale(1);    opacity: 0.55; }
  100% { transform: scale(2.05); opacity: 0; }
}

.play-btn {
  position: relative;
  z-index: 1;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  color: var(--cream);
  background: radial-gradient(circle at 35% 30%, var(--accent-soft), var(--accent) 55%, var(--accent-deep));
  box-shadow: 0 0 0 6px rgba(212, 65, 27, 0.12), 0 10px 26px rgba(0, 0, 0, 0.55);
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, box-shadow 0.2s;
}

.play-btn:hover { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(212, 65, 27, 0.16), 0 12px 30px rgba(0,0,0,0.6); }
.play-btn:active { transform: scale(0.97); }
.play-btn svg { width: 42px; height: 42px; }
.play-btn .icon-play { margin-left: 5px; } /* optically centre the triangle */
.play-btn svg[hidden] { display: none; }

/* now playing */
.now-playing { text-align: center; min-height: 54px; max-width: 100%; }

.np-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent-soft);
  font-weight: 700;
  margin-bottom: 7px;
}

.eq { display: inline-flex; align-items: flex-end; gap: 2px; height: 11px; }
.eq i {
  width: 3px; height: 4px;
  background: var(--accent-soft);
  border-radius: 1px;
}
.playing .eq i { animation: eq 0.9s ease-in-out infinite; }
.playing .eq i:nth-child(2) { animation-delay: 0.25s; }
.playing .eq i:nth-child(3) { animation-delay: 0.5s; }
@keyframes eq { 0%,100% { height: 3px; } 50% { height: 11px; } }

.np-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
  line-height: 1.3;
}

/* volume */
.volume-row { display: flex; align-items: center; gap: 12px; width: min(300px, 100%); }

.vol-icon { width: 21px; height: 21px; color: var(--text-dim); flex-shrink: 0; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--bg-card-3);
  cursor: pointer;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--cream);
  box-shadow: 0 0 8px var(--accent-glow);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--cream);
}

/* reactions — Like + Love only, styled as branded pills */
.reaction-bar {
  display: flex;
  gap: 12px;
  justify-content: center;
  width: 100%;
  border-top: 1px solid var(--border-soft);
  padding-top: 18px;
}

.react-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.35);
  transition: transform 0.14s ease, box-shadow 0.2s, filter 0.2s;
}

.react-btn svg { width: 15px; height: 15px; }

.react-like { background: radial-gradient(circle at 35% 30%, #ff8a3d, #ec4a1e 60%, #d83a14); }
.react-love { background: radial-gradient(circle at 35% 30%, #f56a7e, #e21d52 60%, #c8123f); }

.react-btn:hover {
  transform: translateY(-3px) scale(1.07);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.45);
  filter: brightness(1.05);
}
.react-btn:active { transform: translateY(0) scale(0.95); }

.reaction-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 2;
}

.floating-emoji {
  position: absolute;
  bottom: 60px;
  font-size: 1.6rem;
  animation: floatUp 3.2s ease-out forwards;
  will-change: transform, opacity;
}

@keyframes floatUp {
  0%   { transform: translateY(0) scale(0.6) rotate(0deg); opacity: 0; }
  12%  { opacity: 1; }
  100% { transform: translateY(-340px) scale(1.25) rotate(12deg); opacity: 0; }
}

/* ---------- song history ---------- */

.song-history { list-style: none; display: flex; flex-direction: column; gap: 8px; }

.song-history li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 13px;
  background: var(--bg-card-2);
  border-radius: 10px;
  font-size: 0.9rem;
  border-left: 3px solid transparent;
}
.song-history li:first-child { border-left-color: var(--accent); }

.song-history .time { color: var(--text-dim); font-size: 0.78rem; flex-shrink: 0; }

/* ---------- tabs ---------- */

.tabs { display: flex; gap: 8px; }

.tab {
  flex: 1;
  padding: 12px 8px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-dim);
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.tab.active {
  color: var(--cream);
  border-color: var(--accent);
  background: rgba(212, 65, 27, 0.12);
}

.panel { display: flex; flex-direction: column; gap: 14px; min-height: 420px; }
.panel[hidden] { display: none; }

/* ---------- chat ---------- */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}

.chat-msg {
  background: var(--bg-card-2);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.chat-msg .nick { color: var(--accent-soft); font-weight: 700; margin-right: 6px; }
.chat-msg .time { float: right; color: var(--text-dim); font-size: 0.72rem; margin-left: 8px; }

.chat-form { display: flex; gap: 8px; }

.chat-form input, .request-form input {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 11px 12px;
  font-size: 0.92rem;
  outline: none;
}

.chat-form input::placeholder, .request-form input::placeholder { color: var(--text-dim); }
.chat-form input:focus, .request-form input:focus { border-color: var(--accent); }

#chat-nick { width: 92px; flex-shrink: 0; }
#chat-text { flex: 1; min-width: 0; }

.btn-accent {
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  color: var(--cream);
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
}

.btn-accent:hover { box-shadow: 0 0 16px var(--accent-glow); transform: translateY(-1px); filter: brightness(1.05); }
.btn-accent.wide { width: 100%; }

/* ---------- requests ---------- */

.request-form { display: flex; flex-direction: column; gap: 8px; }

.hint { color: var(--text-dim); font-size: 0.8rem; }

.request-list { list-style: none; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 330px; }

.request-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card-2);
  border-radius: 10px;
  padding: 11px 12px;
}

.req-info { flex: 1; min-width: 0; }
.req-song { font-weight: 600; font-size: 0.93rem; overflow-wrap: anywhere; }
.req-meta { color: var(--text-dim); font-size: 0.78rem; }

.vote-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-dim);
  padding: 6px 13px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.vote-btn:hover { border-color: var(--accent); color: var(--text); }
.vote-btn.voted { border-color: var(--accent); color: var(--accent-soft); background: rgba(212, 65, 27, 0.12); }
.vote-btn .count { font-weight: 700; font-size: 0.95rem; }

/* ---------- misc ---------- */

.muted { color: var(--text-dim); font-size: 0.88rem; }
.center { text-align: center; padding: 16px 0; }

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 22px 24px 30px;
  font-size: 0.85rem;
  color: var(--text-dim);
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-soft);
  margin-top: 10px;
}

.website-link {
  color: var(--accent-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, text-shadow 0.2s;
  align-self: center;
}

.website-link:hover {
  border-bottom-color: var(--accent-soft);
  text-shadow: 0 0 12px var(--accent-glow);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card-2);
  border: 1px solid var(--accent);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 20px;
  font-size: 0.9rem;
  z-index: 50;
  box-shadow: 0 0 20px var(--accent-glow);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }
