* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(160deg, #1a1a2e, #16213e);
  color: #eee;
  min-height: 100vh;
}
.hidden { display: none !important; }

.screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }

.card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 16px;
  padding: 32px;
  width: 100%;
  max-width: 360px;
}
.card h1 { margin: 0 0 4px; font-size: 28px; }
.subtitle { color: #aaa; margin: 0 0 24px; font-size: 14px; }

label { display: block; font-size: 12px; color: #999; margin: 14px 0 6px; text-transform: uppercase; letter-spacing: 0.05em; }
input[type=text] {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.25); color: #fff; font-size: 16px;
}
input[type=text]:focus { outline: none; border-color: #7c5cff; }

.btn-row { display: flex; gap: 10px; margin-top: 22px; }
.install-btn {
  width: 100%; margin-top: 14px; background: rgba(124,92,255,0.15); color: #b9a5ff;
  border: 1px dashed rgba(124,92,255,0.4); padding: 12px 16px; font-size: 13px;
}
button { cursor: pointer; border: none; border-radius: 10px; font-size: 15px; font-weight: 600; padding: 12px 16px; }
.primary { background: #7c5cff; color: white; flex: 1; }
.primary:active { background: #6a4ce0; }
.secondary { background: rgba(255,255,255,0.1); color: #fff; flex: 1; }

#room { flex-direction: column; align-items: stretch; max-width: 480px; margin: 0 auto; }
header { display: flex; justify-content: space-between; align-items: center; padding: 16px 4px; }
header h2 { margin: 0; font-size: 20px; letter-spacing: 0.05em; }
.members { font-size: 12px; color: #999; }
.badge { font-size: 11px; padding: 4px 10px; border-radius: 999px; background: rgba(124,92,255,0.2); color: #b9a5ff; }
.badge.live { background: rgba(76, 217, 100, 0.2); color: #7be08f; }

.now-playing {
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  margin: 8px 4px 20px;
}
.track-name { font-size: 18px; font-weight: 600; margin-bottom: 18px; min-height: 24px; }
.progress-wrap { margin-bottom: 18px; }
input[type=range] { width: 100%; accent-color: #7c5cff; }
.time-row { display: flex; justify-content: space-between; font-size: 12px; color: #999; margin-top: 4px; }
.controls { display: flex; justify-content: center; }
.big { width: 64px; height: 64px; border-radius: 50%; font-size: 22px; }

.reaction-bar { display: flex; justify-content: center; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.reaction-btn {
  background: rgba(255,255,255,0.06); border-radius: 999px; font-size: 18px;
  padding: 6px 10px; line-height: 1;
}
.reaction-btn:active { background: rgba(124,92,255,0.3); transform: scale(0.92); }

#reactionLayer {
  position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 50;
}
.floating-emoji {
  position: absolute; bottom: 80px; font-size: 32px;
  animation: floatUp 2.2s ease-out forwards;
}
.floating-emoji .who { font-size: 10px; display: block; text-align: center; color: #ccc; }
@keyframes floatUp {
  0%   { transform: translateY(0) scale(0.6); opacity: 0; }
  15%  { opacity: 1; transform: translateY(-10px) scale(1); }
  100% { transform: translateY(-320px) scale(1.1); opacity: 0; }
}

.chat-section { margin: 0 4px 20px; background: rgba(255,255,255,0.05); border-radius: 16px; padding: 16px; }
.chat-section h3 { margin: 0 0 10px; font-size: 15px; color: #ccc; }
.chat-messages {
  max-height: 200px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px;
}
.chat-msg { font-size: 13px; line-height: 1.4; }
.chat-msg .who { color: #b9a5ff; font-weight: 600; margin-right: 6px; }
.chat-msg.system { color: #888; font-style: italic; font-size: 12px; }
.chat-form { display: flex; gap: 8px; }
.chat-form input {
  flex: 1; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(0,0,0,0.25); color: #fff; font-size: 14px;
}
.chat-form input:focus { outline: none; border-color: #7c5cff; }
.chat-form button { padding: 10px 16px; }

.visualizer { width: 100%; height: 70px; display: block; margin-bottom: 14px; border-radius: 8px; background: rgba(0,0,0,0.15); }

.controls { display: flex; justify-content: center; align-items: center; gap: 10px; }
.skip-btn, .talk-btn { padding: 10px 12px; font-size: 12px; white-space: nowrap; }
.skip-btn.voted { background: rgba(255,107,107,0.25); color: #ff8a8a; }
.talk-btn.talking { background: #ff4d4d; color: white; animation: pulse 1s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,77,77,0.5); } 50% { box-shadow: 0 0 0 8px rgba(255,77,77,0); } }

.hint { font-size: 11px; color: #777; font-weight: 400; text-transform: none; letter-spacing: 0; }

#queueList li { display: flex; align-items: center; gap: 10px; }
#queueList li .drag-handle { color: #666; cursor: grab; font-size: 16px; }
#queueList li.dragging { opacity: 0.4; }
#queueList li.drag-over { border-top: 2px solid #7c5cff; }
#queueList li .track-label { flex: 1; }

.mic-status { font-size: 12px; color: #888; margin-top: 10px; text-align: center; }

.queue-section { margin: 0 4px; }

.queue-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.queue-header h3 { margin: 0; font-size: 15px; color: #ccc; }
.upload-btn {
  background: rgba(124,92,255,0.2); color: #b9a5ff; padding: 8px 14px; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
#queueList { list-style: none; margin: 0; padding: 0; }
#queueList li {
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(255,255,255,0.04); padding: 12px 14px; border-radius: 10px; margin-bottom: 8px;
  cursor: pointer; font-size: 14px;
}
#queueList li:hover { background: rgba(255,255,255,0.08); }
#queueList li.active { border: 1px solid #7c5cff; background: rgba(124,92,255,0.12); }
