/* ── MTV: Be The VJ! ── */

:root {
  --neon-pink: #ff2d95;
  --neon-cyan: #00e5ff;
  --neon-yellow: #ffea00;
  --neon-green: #76ff03;
  --neon-purple: #d500f9;
  --bg-dark: #0a0a12;
  --bg-mid: #12121e;
  --bg-light: #1a1a2e;
  --text-main: #e0e0f0;
  --text-dim: #7a7a9a;
  --glow-pink: rgba(255,45,149,0.4);
  --glow-cyan: rgba(0,229,255,0.4);
}

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

body {
  background: var(--bg-dark);
  color: var(--text-main);
  font-family: 'Orbitron', 'Segoe UI', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── VHS scanlines ── */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 2px,
    rgba(255,255,255,0.015) 2px,
    rgba(255,255,255,0.015) 4px
  );
  pointer-events: none;
  z-index: 100;
}

body::after {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,45,149,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(0,229,255,0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 50%, rgba(213,0,249,0.03) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

#app {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 720px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Screens ── */
.screen {
  display: none;
  width: 100%;
  padding: 24px;
}

.screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Title Screen ── */
.title-content {
  text-align: center;
  width: 100%;
}

.mtv-logo {
  margin-bottom: 8px;
  line-height: 1;
}

.mtv-m {
  font-family: 'Bungee', sans-serif;
  font-size: 5.5rem;
  color: var(--neon-yellow);
  text-shadow: 0 0 20px rgba(255,234,0,0.5), 3px 3px 0 var(--neon-pink);
  position: relative;
  z-index: 2;
}

.mtv-tv {
  font-family: 'Bungee', sans-serif;
  font-size: 3.4rem;
  color: var(--text-main);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
  position: relative;
  top: 6px;
  left: -4px;
}

.game-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 2rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 15px var(--glow-cyan);
  letter-spacing: 6px;
  margin-bottom: 6px;
}

.game-tagline {
  font-size: 1rem;
  color: var(--neon-pink);
  font-style: italic;
  letter-spacing: 2px;
  margin-bottom: 6px;
  text-shadow: 0 0 10px var(--glow-pink);
}

.game-subtitle {
  font-size: 0.85rem;
  color: var(--text-dim);
  letter-spacing: 1px;
  margin-bottom: 32px;
}

.channel-bug {
  position: fixed;
  top: 14px;
  right: 16px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  opacity: 0.4;
  letter-spacing: 2px;
  z-index: 50;
}

/* ── Buttons ── */
.mtv-btn {
  display: block;
  width: 100%;
  max-width: 320px;
  margin: 10px auto;
  padding: 16px 28px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  letter-spacing: 2px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.mtv-btn.primary {
  background: var(--neon-pink);
  color: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 20px var(--glow-pink);
}

.mtv-btn.primary:hover {
  background: #ff4da6;
  transform: translateY(-2px);
  box-shadow: 0 6px 30px var(--glow-pink);
}

.mtv-btn.primary:disabled {
  background: #333;
  color: #666;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}

.mtv-btn.outline {
  background: transparent;
  color: var(--neon-cyan);
  border: 2px solid var(--neon-cyan);
  border-radius: 6px;
}

.mtv-btn.outline:hover {
  background: rgba(0,229,255,0.1);
  box-shadow: 0 0 15px var(--glow-cyan);
}

.mtv-btn:active { transform: scale(0.97); }

/* ── How to Play ── */
.howto-content {
  width: 100%;
  max-width: 600px;
}

.howto-content h2 {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.3rem;
  color: var(--neon-pink);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: 3px;
}

.howto-body {
  color: var(--text-dim);
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  line-height: 1.9;
  margin-bottom: 24px;
}

.howto-body p { margin-bottom: 10px; }
.howto-body strong { color: var(--text-main); }

/* ── Draft Screen ── */
.draft-layout {
  width: 100%;
}

.draft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.draft-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.9rem;
  color: var(--neon-pink);
  letter-spacing: 2px;
}

.lineup-count {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.1rem;
  color: var(--neon-cyan);
}

/* Lineup Slots */
.lineup-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.lineup-slot {
  background: var(--bg-mid);
  border: 2px dashed var(--text-dim);
  border-radius: 8px;
  padding: 10px 8px;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.lineup-slot .slot-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--text-dim);
  margin-bottom: 3px;
}

.lineup-slot .slot-label {
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 1px;
}

.lineup-slot.filled {
  border-style: solid;
  border-color: var(--neon-cyan);
  background: rgba(0,229,255,0.05);
}

.lineup-slot.filled .slot-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lineup-slot.filled .slot-artist {
  font-size: 0.6rem;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lineup-slot.swap-selected {
  border-color: var(--neon-yellow) !important;
  box-shadow: 0 0 12px rgba(255,234,0,0.3);
}

.pool-title {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  margin: 16px 0 10px;
}

/* Video Pool Cards */
.video-pool {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-height: 45vh;
  overflow-y: auto;
  padding-right: 4px;
}

.video-pool::-webkit-scrollbar { width: 5px; }
.video-pool::-webkit-scrollbar-track { background: var(--bg-mid); }
.video-pool::-webkit-scrollbar-thumb { background: var(--text-dim); border-radius: 3px; }

.video-card {
  background: var(--bg-mid);
  border-left: 4px solid var(--text-dim);
  border-radius: 6px;
  padding: 10px 12px 8px;
  cursor: pointer;
  transition: all 0.15s;
}

.video-card:hover {
  transform: scale(1.02);
  background: var(--bg-light);
}

.video-card.selected {
  opacity: 0.35;
  transform: scale(0.97);
  pointer-events: none;
}

.video-card .vc-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-card .vc-artist {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.video-card .vc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.genre-badge {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  padding: 3px 8px;
  border-radius: 4px;
  color: #000;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.vibe-tag {
  font-size: 0.55rem;
  color: var(--text-dim);
  padding: 3px 6px;
  border: 1px solid var(--text-dim);
  border-radius: 4px;
  letter-spacing: 1px;
}

/* ── Simulation Screen ── */
.sim-layout {
  width: 100%;
  position: relative;
}

.sim-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.hud-block { text-align: center; min-width: 100px; }

.hud-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 3px;
  margin-bottom: 4px;
}

.hud-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 1.2rem;
  color: var(--neon-cyan);
}

/* Now Playing */
.now-playing {
  background: var(--bg-mid);
  border: 2px solid var(--neon-pink);
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: 0 0 20px rgba(255,45,149,0.1);
}

.now-playing-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--text-main);
  margin-bottom: 3px;
}

.now-playing-artist {
  font-size: 0.85rem;
  color: var(--neon-pink);
  margin-bottom: 8px;
}

.now-playing-tags {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.video-progress {
  height: 8px;
  background: var(--bg-dark);
  border-radius: 4px;
  overflow: hidden;
}

.video-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-cyan));
  border-radius: 4px;
  transition: width 0.1s linear;
}

/* Ratings */
.ratings-display {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.ratings-label {
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 2px;
  white-space: nowrap;
}

.ratings-bar {
  flex: 1;
  height: 14px;
  background: var(--bg-mid);
  border-radius: 7px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
}

.ratings-fill {
  height: 100%;
  width: 50%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-yellow), var(--neon-green));
  border-radius: 7px;
  transition: width 0.3s ease;
}

.ratings-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: var(--neon-yellow);
  min-width: 32px;
  text-align: right;
}

/* Mood */
.mood-display {
  text-align: center;
  margin-bottom: 12px;
}

.mood-label {
  font-size: 0.55rem;
  color: var(--text-dim);
  letter-spacing: 2px;
}

.mood-value {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--neon-cyan);
  margin-left: 8px;
}

/* VJ Console */
.vj-console {
  background: #0a120a;
  border: 1px solid #1a3a1a;
  border-radius: 6px;
  padding: 10px 14px;
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: #33ff33;
  line-height: 2;
  height: 120px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.vj-console::-webkit-scrollbar { width: 4px; }
.vj-console::-webkit-scrollbar-track { background: #0a120a; }
.vj-console::-webkit-scrollbar-thumb { background: #1a3a1a; border-radius: 2px; }

.vj-console .console-line {
  margin-bottom: 3px;
  animation: typeIn 0.2s ease;
}

.vj-console .console-line.highlight {
  color: var(--neon-yellow);
}

.vj-console .console-line.bad {
  color: var(--neon-pink);
}

@keyframes typeIn {
  from { opacity: 0; transform: translateX(-4px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Upcoming Strip */
.upcoming-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.upcoming-chip {
  background: var(--bg-mid);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.55rem;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
  border-left: 3px solid var(--text-dim);
}

.upcoming-chip.done {
  opacity: 0.3;
  text-decoration: line-through;
}

.upcoming-chip.current {
  color: var(--neon-cyan);
  border-color: var(--neon-cyan);
}

/* ── Event Overlay ── */
.event-overlay {
  display: none;
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 0.3s ease;
}

.event-overlay.active {
  display: flex;
}

.event-card {
  background: var(--bg-mid);
  border: 2px solid var(--neon-yellow);
  border-radius: 10px;
  padding: 28px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 0 30px rgba(255,234,0,0.15);
  animation: eventPop 0.3s ease;
}

@keyframes eventPop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.event-header {
  font-family: 'Press Start 2P', monospace;
  font-size: 1rem;
  color: var(--neon-yellow);
  text-align: center;
  margin-bottom: 16px;
  letter-spacing: 4px;
  animation: blink 0.6s ease 3;
}

@keyframes blink {
  50% { opacity: 0.3; }
}

.event-text {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.85rem;
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 20px;
  text-align: center;
}

.event-choices {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.event-choice-btn {
  background: var(--bg-dark);
  border: 2px solid var(--text-dim);
  border-radius: 8px;
  padding: 14px 18px;
  font-family: 'Orbitron', sans-serif;
  font-size: 0.8rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.event-choice-btn:hover {
  border-color: var(--neon-cyan);
  background: rgba(0,229,255,0.05);
  transform: translateX(4px);
}

.event-choice-btn:active {
  transform: scale(0.98);
}

/* ── Results Screen ── */
.results-content {
  text-align: center;
  width: 100%;
  max-height: 100vh;
  overflow-y: auto;
  padding-bottom: 24px;
}

.results-tier-emoji {
  font-size: 3.5rem;
  margin-bottom: 6px;
}

.results-tier {
  font-family: 'Bungee', sans-serif;
  font-size: 2.2rem;
  color: var(--neon-pink);
  text-shadow: 0 0 20px var(--glow-pink);
  margin-bottom: 6px;
}

.results-score-area { margin-bottom: 20px; }

.results-label {
  font-size: 0.6rem;
  color: var(--text-dim);
  letter-spacing: 3px;
}

.results-score {
  font-family: 'Press Start 2P', monospace;
  font-size: 2rem;
  color: var(--neon-cyan);
  text-shadow: 0 0 20px var(--glow-cyan);
  letter-spacing: 3px;
}

/* Tracklist */
.results-tracklist {
  text-align: left;
  margin-bottom: 20px;
}

.results-tracklist h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--neon-yellow);
  letter-spacing: 2px;
  margin-bottom: 10px;
  text-align: center;
}

.tracklist-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  animation: fadeSlideIn 0.3s ease both;
}

.tracklist-item:nth-child(2) { animation-delay: 0.05s; }
.tracklist-item:nth-child(3) { animation-delay: 0.1s; }
.tracklist-item:nth-child(4) { animation-delay: 0.15s; }
.tracklist-item:nth-child(5) { animation-delay: 0.2s; }
.tracklist-item:nth-child(6) { animation-delay: 0.25s; }
.tracklist-item:nth-child(7) { animation-delay: 0.3s; }

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.tracklist-num {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.55rem;
  color: var(--text-dim);
  margin-right: 10px;
  min-width: 18px;
}

.tracklist-info {
  flex: 1;
  min-width: 0;
}

.tracklist-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tracklist-artist {
  font-size: 0.6rem;
  color: var(--text-dim);
}

.tracklist-event {
  font-size: 0.5rem;
  color: var(--neon-yellow);
  font-style: italic;
  margin-top: 2px;
}

.tracklist-score {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--neon-green);
  margin-left: 10px;
}

.tracklist-score.negative {
  color: var(--neon-pink);
}

/* Synergies */
.results-synergies {
  margin-bottom: 20px;
}

.results-synergies h3 {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.7rem;
  color: var(--neon-purple);
  letter-spacing: 2px;
  margin-bottom: 10px;
}

.synergy-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(213,0,249,0.1);
  border: 1px solid rgba(213,0,249,0.3);
  border-radius: 20px;
  padding: 6px 16px;
  margin: 4px;
  font-size: 0.65rem;
  color: var(--neon-purple);
  animation: synergyPop 0.4s ease both;
}

.synergy-item:nth-child(2) { animation-delay: 0.15s; }
.synergy-item:nth-child(3) { animation-delay: 0.3s; }
.synergy-item:nth-child(4) { animation-delay: 0.45s; }
.synergy-item:nth-child(5) { animation-delay: 0.6s; }

@keyframes synergyPop {
  from { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.1); }
  to { transform: scale(1); opacity: 1; }
}

.synergy-bonus {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.5rem;
  color: var(--neon-green);
}

.no-synergies {
  font-size: 0.65rem;
  color: var(--text-dim);
  font-style: italic;
}

/* Results Buttons */
.results-buttons {
  margin-top: 16px;
}

.share-toast {
  font-family: 'Press Start 2P', monospace;
  font-size: 0.6rem;
  color: var(--neon-green);
  margin-top: 10px;
  opacity: 0;
  transition: opacity 0.3s;
}

.share-toast.show {
  opacity: 1;
}

/* ── Responsive ── */
@media (max-width: 500px) {
  #app { max-width: 100%; }
  .screen { padding: 16px; }
  .mtv-m { font-size: 4rem; }
  .game-title { font-size: 1.4rem; }
  .lineup-slots { grid-template-columns: repeat(2, 1fr); }
  .video-pool { grid-template-columns: 1fr; }
  .now-playing-title { font-size: 0.9rem; }
  .event-card { padding: 20px; }
  .event-text { font-size: 0.75rem; }
  .event-choice-btn { font-size: 0.7rem; padding: 12px 14px; }
}
