/* GhostAmp — Haunted AI Jukebox. Retro Winamp skin, ghost theme. */
:root {
  --bg: #07060d;
  --panel: #100d1e;
  --panel2: #171226;
  --edge: #2c2145;
  --green: #39ff14;
  --green-dim: #1d8f0a;
  --purple: #b967ff;
  --orange: #ff8c1a;
  --bone: #e8e4d8;
  --muted: #8f86a8;
  --ghost-speed: 9s;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--bone);
  font-family: "Courier New", ui-monospace, Menlo, monospace;
  min-height: 100vh;
  overflow-x: hidden;
}
[v-cloak] { display: none; }
a { color: var(--green); }

/* Fog + scanlines */
.fog {
  position: fixed; inset: -20%;
  pointer-events: none; z-index: 0;
  background:
    radial-gradient(ellipse 45% 30% at 20% 30%, rgba(185, 103, 255, .14), transparent 70%),
    radial-gradient(ellipse 50% 35% at 80% 70%, rgba(57, 255, 20, .08), transparent 70%),
    radial-gradient(ellipse 40% 30% at 60% 10%, rgba(255, 140, 26, .06), transparent 70%);
  filter: blur(6px);
}
.fog-a { animation: fogdrift 36s ease-in-out infinite alternate; }
.fog-b { animation: fogdrift 52s ease-in-out infinite alternate-reverse; opacity: .7; }
@keyframes fogdrift { from { transform: translateX(-3%) translateY(0); } to { transform: translateX(3%) translateY(-2%); } }
.scanlines {
  position: fixed; inset: 0; pointer-events: none; z-index: 5; opacity: .5;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.22) 0 1px, transparent 1px 3px);
}

/* Winamp window */
.winamp {
  position: relative; z-index: 2;
  max-width: 860px; margin: 28px auto 40px;
  background: linear-gradient(180deg, #1a1428, #0d0a18 30%, #0d0a18);
  border: 2px solid var(--edge);
  border-radius: 10px;
  box-shadow: 0 0 0 1px #000, 0 0 42px rgba(185, 103, 255, .35), 0 0 90px rgba(57, 255, 20, .12);
  overflow: hidden;
}
.titlebar {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  background: linear-gradient(90deg, #241a3d, #3d1a5e 55%, #241a3d);
  border-bottom: 2px solid var(--edge);
  font-weight: bold; letter-spacing: 1px;
}
.titlebar-dot { width: 11px; height: 11px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 2.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.titlebar-text { color: var(--green); text-shadow: 0 0 12px rgba(57,255,20,.7); animation: flicker 7s linear infinite; }
@keyframes flicker { 0%,100% { opacity: 1; } 92% { opacity: 1; } 93% { opacity: .4; } 94% { opacity: 1; } 96% { opacity: .6; } 97% { opacity: 1; } }
.titlebar-sub { color: var(--purple); font-weight: normal; }
.titlebar-version { margin-left: auto; color: var(--muted); font-size: 12px; }
.titlebar-btns { display: flex; gap: 6px; }
.titlebar-btns i { width: 12px; height: 12px; border-radius: 3px; background: #3a2d5e; border: 1px solid #57467f; display: block; }
.titlebar-btns i:nth-child(3) { background: #5e1a3d; }

.panel { margin: 14px; padding: 14px; background: var(--panel); border: 1px solid var(--edge); border-radius: 8px; }

/* LCD display */
.lcd {
  background: #02010a; border: 1px solid #241a3d; border-radius: 6px;
  padding: 8px 12px; color: var(--green);
  text-shadow: 0 0 8px rgba(57,255,20,.55);
  overflow: hidden;
}
.lcd-marquee { white-space: nowrap; overflow: hidden; font-size: 19px; font-weight: bold; letter-spacing: 2px; }
.lcd-marquee span { display: inline-block; padding-left: 100%; animation: marquee 14s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.lcd-row { display: flex; gap: 14px; margin-top: 6px; font-size: 13px; color: var(--purple); flex-wrap: wrap; }
.lcd-time { color: var(--orange); }
#viz { display: block; width: 100%; height: 140px; margin-top: 10px; background: #05030f; border: 1px solid #241a3d; border-radius: 6px; }
.viz-label { margin-top: 6px; font-size: 11px; letter-spacing: 2px; color: var(--muted); text-align: center; }

/* Transport */
.transport { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tbtn {
  width: 46px; height: 46px; font-size: 19px; cursor: pointer;
  background: linear-gradient(180deg, #2c2145, #171226);
  color: var(--bone); border: 1px solid #4a3a72; border-radius: 8px;
}
.tbtn:hover { border-color: var(--green); color: var(--green); box-shadow: 0 0 12px rgba(57,255,20,.35); }
.tbtn.big { width: 58px; height: 58px; font-size: 24px; color: var(--green); }
.vol { display: flex; align-items: center; gap: 8px; margin-left: 6px; color: var(--muted); font-size: 12px; }
.vol input[type=range] { width: 110px; accent-color: var(--green); }
.eq { display: flex; gap: 16px; margin-left: auto; }
.eq-band { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--muted); }
.eq-band input[type=range] { writing-mode: vertical-lr; direction: rtl; width: 22px; height: 74px; accent-color: var(--purple); }

/* Ghost DJ */
.dj-panel h2, .playlist-panel h2 { margin: 0 0 10px; font-size: 17px; color: var(--purple); letter-spacing: 2px; }
.dj-sub { color: var(--muted); font-size: 12px; letter-spacing: 0; }
.moods { display: flex; gap: 10px; flex-wrap: wrap; }
.mood-btn {
  flex: 1 1 120px; padding: 12px 8px; cursor: pointer; font-family: inherit; font-size: 15px; font-weight: bold;
  background: #171226; color: var(--bone); border: 1px solid #4a3a72; border-radius: 8px;
}
.mood-btn:hover { border-color: var(--purple); }
.mood-btn.active { background: #2c1450; border-color: var(--purple); color: #fff; box-shadow: 0 0 16px rgba(185,103,255,.5); }
.mood-ico { font-size: 18px; }
.dj-line { margin: 12px 0; padding: 10px 12px; min-height: 42px; background: #05030f; border-left: 3px solid var(--purple); border-radius: 4px; color: #d9ccff; font-style: italic; }
.conjure-btn {
  width: 100%; padding: 13px; cursor: pointer; font-family: inherit; font-size: 16px; font-weight: bold; letter-spacing: 2px;
  color: #0a0614; background: linear-gradient(90deg, var(--green), #a5ff6e); border: none; border-radius: 8px;
}
.conjure-btn:hover { box-shadow: 0 0 22px rgba(57,255,20,.55); }
.llm-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--muted); }
.llm-row .opt { color: #6d6484; }
.llm-row input[type=password] {
  flex: 1 1 220px; padding: 8px 10px; background: #05030f; color: var(--bone);
  border: 1px solid #4a3a72; border-radius: 6px; font-family: inherit;
}
.llm-btn { padding: 8px 12px; cursor: pointer; font-family: inherit; font-weight: bold; background: #2c1450; color: #e3d4ff; border: 1px solid var(--purple); border-radius: 6px; }
.llm-btn:disabled { opacity: .45; cursor: default; }
.llm-status { color: var(--orange); }

/* Playlist */
.playlist { list-style: none; margin: 0; padding: 0; }
.playlist li {
  display: flex; gap: 10px; align-items: baseline; padding: 10px 8px; cursor: pointer;
  border-bottom: 1px dashed #2c2145; font-size: 14px;
}
.playlist li:hover { background: #1b1430; }
.playlist li.current { background: #221741; color: var(--green); }
.pl-num { color: var(--muted); }
.pl-title { font-weight: bold; }
.pl-artist { color: var(--muted); font-size: 12px; }
.pl-mood { color: var(--purple); font-size: 12px; }
.pl-loop { margin-left: auto; color: var(--muted); font-size: 12px; }
.pl-play { color: var(--orange); }
.pl-count { color: var(--muted); font-size: 12px; }
.pl-note { color: var(--muted); font-size: 12px; line-height: 1.5; }

/* Ghosts — float in the dark margins around the window, never over text */
.ghosts { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 1; }
.ghost {
  position: absolute; width: 44px; height: 56px;
  background: radial-gradient(circle at 50% 30%, #ffffff, #cfc8f5 70%, #9d94d6);
  border-radius: 22px 22px 4px 4px; opacity: .9;
  animation: floaty var(--ghost-speed) ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(185,103,255,.55));
}
.ghost::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -9px; height: 12px;
  background: radial-gradient(circle at 8px 0, #cfc8f5 7px, transparent 8px);
  background-size: 16px 12px; background-repeat: repeat-x;
}
.ghost .eye { position: absolute; top: 18px; width: 8px; height: 11px; background: #120a24; border-radius: 50%; }
.ghost .eye:first-child { left: 10px; } .ghost .eye:last-child { right: 10px; }
.g1 { top: 10%; left: 2%; animation-delay: 0s; }
.g2 { top: 46%; right: 2%; width: 34px; height: 44px; animation-delay: -3s; }
.g3 { top: 78%; left: 3%; width: 28px; height: 36px; opacity: .6; animation-delay: -6s; }
@keyframes floaty { 0%,100% { transform: translateY(0) rotate(-3deg); } 50% { transform: translateY(-16px) rotate(3deg); } }

.foot { margin: 0 14px 14px; text-align: center; font-size: 12px; color: var(--muted); line-height: 1.6; }

/* Mood themes */
.theme-chill { --green: #2ee6c8; }
.theme-chill .titlebar-text { text-shadow: 0 0 12px rgba(46,230,200,.7); }
.theme-party { --green: #ffb02e; --purple: #ff5e8a; }
.theme-haunted { --green: #c084fc; --purple: #7ef0c1; }

@media (max-width: 640px) {
  .winamp { margin: 10px; }
  .eq { margin-left: 0; }
  .titlebar-version { display: none; }
}
