@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700;800&family=Prompt:wght@300;400;600;700&display=swap');

:root {
  --primary: #8b5cf6;
  --primary-focus: #7c3aed;
  --secondary: #ec4899;
  --accent: #06b6d4;
  --q-priority: #f59e0b;
  --bg-dark: #090a16;
  --card-bg: rgba(22, 27, 46, 0.85);
  --glass-border: rgba(255, 255, 255, 0.1);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
}

* {
  box-sizing: border-box;
  font-family: 'Prompt', 'Kanit', sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
}

/* Glassmorphism Classes */
.glass-panel {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 1rem;
}

.glow-btn {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 600;
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.glow-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(236, 72, 153, 0.5);
}

.glow-btn:active {
  transform: translateY(0);
}

.q-btn {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

.q-btn:hover {
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.6);
}

.q-badge {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: white;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.6);
  animation: pulse-q 2s infinite;
}

@keyframes pulse-q {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.source-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 0.375rem;
}

.source-ncn { background-color: #3b82f6; color: white; }
.source-midi { background-color: #10b981; color: white; }
.source-emk { background-color: #8b5cf6; color: white; }
.source-youtube { background-color: #ef4444; color: white; }

/* Karaoke Lyrics Display on TV */
.karaoke-display-container {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: 5rem;
  overflow: hidden;
  background: #000;
}

.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45;
  z-index: 1;
}

.lyric-canvas-box {
  position: relative;
  z-index: 10;
  width: 100%;
  text-align: center;
  padding: 0 2rem;
}

.lyric-line-1, .lyric-line-2 {
  font-size: clamp(2rem, 5vw, 4.5rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 0.8rem 0;
  text-shadow: 0 0 15px rgba(0,0,0,0.9), 3px 3px 6px #000;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.lyric-sweep-wrapper {
  position: relative;
  display: inline-block;
}

.lyric-base {
  color: #ffffff;
}

.lyric-fill {
  position: absolute;
  top: 0;
  left: 0;
  color: #06b6d4;
  overflow: hidden;
  white-space: nowrap;
  width: 0%;
  transition: width 0.1s linear;
  text-shadow: 0 0 20px #06b6d4;
}

.lyric-fill-female {
  color: #ec4899;
  text-shadow: 0 0 20px #ec4899;
}

/* Floating Reactions */
.reaction-bubble {
  position: absolute;
  bottom: 10%;
  font-size: 3rem;
  z-index: 100;
  animation: floatUp 3s ease-out forwards;
  pointer-events: none;
}

@keyframes floatUp {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  15% { opacity: 1; transform: translateY(-50px) scale(1.2); }
  80% { opacity: 0.9; }
  100% { transform: translateY(-400px) scale(1.5); opacity: 0; }
}
