/* Vitrola: celular de los invitados y panel del admin. Estética Wurlitzer años 50. */
:root {
  --wood: #2a0f0a;
  --wood2: #4a1c10;
  --cream: #fff3d6;
  --cream2: #f5e2b8;
  --ink: #2a1208;
  --red: #d7262e;
  --amber: #ffb000;
  --mint: #2ec4b6;
  --blue: #3a86ff;
  --chrome: linear-gradient(180deg, #fafafa 0%, #b9bcc2 45%, #f2f2f2 55%, #8e9299 100%);
  --radius: 14px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: 'Oswald', system-ui, sans-serif;
  color: var(--cream);
  background:
    radial-gradient(ellipse at 50% -10%, rgba(255, 176, 0, .22), transparent 60%),
    repeating-linear-gradient(90deg, rgba(0,0,0,.08) 0 3px, transparent 3px 11px),
    linear-gradient(180deg, var(--wood2), var(--wood));
  background-attachment: fixed;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
button, input, textarea, select { font: inherit; }

.neon-logo {
  font-family: 'Pacifico', cursive;
  font-size: 56px;
  line-height: 1.1;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 4px #fff, 0 0 12px var(--red), 0 0 24px var(--red), 0 0 40px var(--red);
}
.neon-logo.small { font-size: 30px; text-align: left; }

.screen { max-width: 640px; margin: 0 auto; padding: 16px 14px calc(24px + env(safe-area-inset-bottom)); }

/* ------- ingreso */
#join { min-height: 100vh; display: flex; align-items: center; }
.join-card {
  width: 100%;
  padding: 28px 22px;
  border-radius: 28px 28px var(--radius) var(--radius);
  background: linear-gradient(180deg, #3b140c, #200a06);
  border: 3px solid #c9ccd2;
  box-shadow: 0 0 0 3px #6d7077, 0 20px 60px rgba(0,0,0,.6), inset 0 0 40px rgba(255,176,0,.12);
}
.party { text-align: center; font-size: 22px; color: var(--amber); margin: 6px 0 0; letter-spacing: .5px; }
.hint { color: rgba(255,243,214,.7); font-size: 14px; text-align: center; font-weight: 400; }
label { display: block; margin: 14px 0; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; color: var(--cream2); }
input, textarea, select {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  border-radius: 10px; border: 2px solid #8e9299; background: var(--cream); color: var(--ink);
  font-family: 'Courier Prime', monospace; font-size: 17px; outline: none;
}
input:focus, textarea:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,176,0,.3); }

.btn {
  border: 0; border-radius: 10px; padding: 12px 18px; cursor: pointer;
  background: linear-gradient(180deg, #ff4b51, var(--red) 60%, #9d1419);
  color: #fff; letter-spacing: 1px; text-transform: uppercase; font-weight: 600;
  box-shadow: 0 3px 0 #6e0d11, 0 6px 14px rgba(0,0,0,.35);
}
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #6e0d11; }
.btn.big { width: 100%; font-size: 20px; padding: 14px; margin-top: 8px; }
.btn.alt { background: linear-gradient(180deg, #4fe0d2, var(--mint) 60%, #1b8a80); box-shadow: 0 3px 0 #135f58; color: var(--ink); }
.btn.ghost { background: rgba(255,243,214,.12); box-shadow: none; color: var(--cream); }
.btn.amber { background: linear-gradient(180deg, #ffd25e, var(--amber) 60%, #c27f00); box-shadow: 0 3px 0 #7c5200; color: var(--ink); }
.btn:disabled { opacity: .5; }

/* ------- app */
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.me { color: var(--cream2); font-size: 15px; }

.card {
  background: var(--cream); color: var(--ink); border-radius: var(--radius);
  border: 3px solid #c9ccd2; box-shadow: 0 0 0 2px #6d7077, 0 10px 30px rgba(0,0,0,.4);
}
.now { display: flex; gap: 14px; align-items: center; padding: 14px; }
.now-empty { width: 100%; text-align: center; padding: 18px 0; font-family: 'Courier Prime', monospace; }
.vinyl-thumb {
  width: 84px; height: 84px; flex: 0 0 84px; border-radius: 50%; object-fit: cover;
  border: 12px solid #111; box-shadow: 0 0 0 2px #333, inset 0 0 0 2px #000;
}
.spin { animation: spin 3s linear infinite; }
.spin.paused { animation-play-state: paused; }
@keyframes spin { to { transform: rotate(360deg); } }
.now-info { min-width: 0; flex: 1; }
.now .label { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--red); }
.now .title { font-family: 'Courier Prime', monospace; font-weight: 700; font-size: 19px; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.now .artist { font-size: 15px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.now .by { font-size: 13px; margin-top: 2px; color: #7a4a1a; }
.bar { height: 6px; border-radius: 3px; background: rgba(42,18,8,.15); margin-top: 8px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--amber), var(--red)); transform-origin: left; transform: scaleX(0); transition: transform 1s linear; }

.tabs { display: flex; gap: 6px; margin: 16px 0 12px; }
.tabs button {
  flex: 1; border: 0; padding: 10px 6px; border-radius: 10px; cursor: pointer;
  background: rgba(255,243,214,.1); color: var(--cream); letter-spacing: 1px; text-transform: uppercase; font-size: 15px;
}
.tabs button.active { background: var(--chrome); color: var(--ink); font-weight: 600; }
#karaokeTab { animation: pulse 1.6s ease-in-out infinite; }
#karaokeTab.active { animation: none; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px var(--amber), 0 0 18px var(--amber); } }
.badge { display: inline-block; min-width: 22px; padding: 0 6px; border-radius: 11px; background: var(--red); color: #fff; font-size: 13px; }

.searchbar { display: flex; gap: 8px; }
.searchbar input { margin: 0; flex: 1; }

.list { list-style: none; padding: 0; margin: 10px 0; }
.row {
  display: flex; align-items: center; gap: 10px; padding: 8px; margin-bottom: 8px;
  background: var(--cream); color: var(--ink); border-radius: 12px; border-left: 6px solid var(--red);
}
.row:nth-child(3n+2) { border-left-color: var(--mint); }
.row:nth-child(3n+3) { border-left-color: var(--amber); }
.row.mine { box-shadow: inset 0 0 0 2px var(--amber); }
.row img { width: 64px; height: 48px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; background: #ccc; }
.row .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row b { font-family: 'Courier Prime', monospace; font-size: 15px; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.row small { font-size: 13px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row small.who { color: #7a4a1a; opacity: 1; }
.pos { font-family: 'Pacifico', cursive; color: var(--red); font-size: 20px; width: 22px; text-align: center; }
.empty { text-align: center; padding: 24px 10px; color: rgba(255,243,214,.75); font-family: 'Courier Prime', monospace; }
.section { font-weight: 400; letter-spacing: 2px; text-transform: uppercase; color: var(--amber); margin: 22px 0 4px; }

.icon {
  border: 0; cursor: pointer; flex: 0 0 auto; min-width: 46px; height: 46px; border-radius: 23px;
  font-size: 22px; background: rgba(42,18,8,.08); color: var(--ink);
}
.icon.add { background: var(--red); color: #fff; font-size: 26px; }
.icon.add.done { background: var(--mint); }
.icon.vote { font-size: 18px; padding: 0 12px; color: #a0525a; }
.icon.vote span { font-family: 'Oswald', sans-serif; font-size: 15px; margin-left: 4px; }
.icon.vote.on { background: var(--red); color: #fff; }
.icon.del { font-size: 18px; color: #a0525a; }

.karaoke-banner {
  padding: 12px 14px; border-radius: 12px; margin-bottom: 12px; color: var(--ink);
  background: repeating-linear-gradient(45deg, var(--amber) 0 14px, #ffc43d 14px 28px); font-weight: 600;
}

.toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 50;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .3s, opacity .3s;
  max-width: 92vw; padding: 12px 18px; border-radius: 12px;
  background: #1b0805; color: var(--cream); border: 2px solid var(--amber); box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.good { border-color: var(--mint); }
.toast.bad { border-color: var(--red); }

/* ------- admin */
.admin .screen { max-width: 980px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.panel { padding: 16px; }
.panel h2 { margin: 0 0 10px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: 17px; color: var(--red); }
.controls { display: flex; flex-wrap: wrap; gap: 8px; }
.switch { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px dashed rgba(42,18,8,.2); text-transform: none; font-size: 16px; color: var(--ink); margin: 0; }
.switch input[type=checkbox] { width: 52px; height: 30px; margin: 0; appearance: none; -webkit-appearance: none; border-radius: 15px; background: #b9b0a0; border: 0; position: relative; cursor: pointer; flex: 0 0 auto; padding: 0; }
.switch input[type=checkbox]::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .2s; }
.switch input[type=checkbox]:checked { background: var(--red); }
.switch input[type=checkbox]:checked::after { left: 25px; }
input[type=range] { padding: 0; margin: 0; border: 0; background: transparent; accent-color: var(--red); height: 30px; }
.card label:not(.switch) { color: #7a4a1a; }
.small-row { display: flex; gap: 6px; flex-wrap: wrap; }
.small-row .btn { padding: 6px 10px; font-size: 13px; }
.row .actions { display: flex; gap: 4px; }
.row .actions .icon { min-width: 38px; height: 38px; font-size: 16px; }
.status { font-size: 14px; color: #7a4a1a; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #aaa; margin-right: 6px; }
.dot.on { background: #2bb24c; box-shadow: 0 0 8px #2bb24c; }
.qr-mini { width: 120px; height: 120px; border-radius: 8px; float: right; margin-left: 12px; }
.links input { font-size: 13px; }
details summary { cursor: pointer; font-weight: 600; }
textarea { min-height: 120px; resize: vertical; }
