/* ===== Binary Outbrake — style.css =====
   Cyberpunk / Apocalyptic Glitch Aesthetic
   - Uses bo.png background (set in HTML)
   - Glitchy title + neon effects
   - Tagline pulse
   - 4-song neon music buttons
   - Canvas overlay for TV static (script.js)
======================================== */

/* Font */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap');

/* Root theme colors */
:root {
  --fg: #fff;
  --neon-pink: #ff00ff;
  --neon-blue: #00ffff;
  --neon-red: #ff0033;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Share Tech Mono', monospace;
  color: var(--fg);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* Dark vignette overlay for readability */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at center,
              rgba(0,0,0,0) 40%,
              rgba(0,0,0,0.25) 70%,
              rgba(0,0,0,0.6) 100%);
  mix-blend-mode: multiply;
  z-index: 1;
}

/* Content container */
.glitch-container {
  position: relative;
  z-index: 2; /* above canvas + vignette */
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: min(92vw, 1200px);
}

/* Glitchy Title */
h1.glitch {
  margin: 0 0 0.5rem 0;
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  letter-spacing: 0.08em;
  position: relative;
  color: var(--fg);
  text-transform: uppercase;
  text-shadow:
    0 0 4px #fff,
    0 0 10px var(--neon-pink),
    0 0 10px var(--neon-blue),
    0 0 18px var(--neon-red);
  animation: titleFlicker 6s infinite;
}

h1.glitch::before,
h1.glitch::after {
  content: attr(data-text);
  position: absolute;
  left: 0; top: 0;
  width: 100%;
  overflow: hidden;
  opacity: 0.9;
  filter: blur(0.5px);
}

h1.glitch::before {
  color: var(--neon-pink);
  transform: translate(1px, -1px);
  text-shadow: 0 0 10px var(--neon-pink);
  clip-path: inset(0% 0 60% 0);
  animation: glitchTop 2.2s infinite linear alternate-reverse;
}

h1.glitch::after {
  color: var(--neon-blue);
  transform: translate(-1px, 1px);
  text-shadow: 0 0 10px var(--neon-blue);
  clip-path: inset(40% 0 0 0);
  animation: glitchBottom 3.1s infinite linear alternate-reverse;
}

/* Tagline */
.tagline {
  margin: 0.25rem 0 1.25rem 0;
  font-size: clamp(0.95rem, 2.4vw, 1.2rem);
  color: #ececec;
  opacity: 0.95;
  text-shadow:
    0 0 3px #fff,
    0 0 8px var(--neon-pink),
    0 0 10px var(--neon-blue),
    0 0 12px var(--neon-red);
  animation: taglinePulse 5s ease-in-out infinite alternate;
}

/* Music buttons container */
.music-controls {
  margin-top: 0.6rem;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.music-btn {
  position: relative;
  padding: 10px 16px;
  background: rgba(0,0,0,0.6);
  border: 2px solid var(--neon-pink);
  color: var(--fg);
  font: inherit;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-transform: uppercase;
  backdrop-filter: blur(2px);
  box-shadow:
    0 0 6px var(--neon-pink),
    0 0 14px rgba(0, 255, 255, 0.25);
}

.music-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.07);
  border-color: var(--neon-blue);
  box-shadow:
    0 0 8px var(--neon-blue),
    0 0 18px rgba(255, 0, 51, 0.35);
  color: #e9ffff;
}

.music-btn:active {
  transform: translateY(0);
  filter: brightness(1.05);
}



/* Active song */
.music-btn.active {
  background: var(--neon-blue);
  color: #000;
  border-color: var(--neon-red);
  box-shadow:
    0 0 10px var(--neon-blue),
    0 0 22px var(--neon-red),
    0 0 34px var(--neon-pink);
}

/* Keyboard focus */
.music-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 3px #000,
    0 0 0 5px var(--neon-red),
    0 0 10px var(--neon-red);
}

.suno-btn {
  text-decoration: none;  
  display: inline-block;
  padding: 12px 24px;
  background: #111;  /* dark base */
  color: #f0f0f0;
  font-weight: bold;
  font-size: 16px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(255,0,150,0.5), 0 0 20px rgba(0,200,255,0.3);
  transition: all 0.3s ease;
}

@keyframes glitchShift {
  0%   { clip-path: inset(0 0 0 0); transform: translate(0); }
  20%  { clip-path: inset(10% 0 85% 0); transform: translate(-2px, -2px); }
  40%  { clip-path: inset(85% 0 5% 0); transform: translate(2px, 2px); }
  60%  { clip-path: inset(40% 0 40% 0); transform: translate(-1px, 1px); }
  80%  { clip-path: inset(20% 0 65% 0); transform: translate(1px, -1px); }
  100% { clip-path: inset(0 0 0 0); transform: translate(0); }
}

.suno-btn {
  text-decoration: none;
  display: inline-block;
  padding: 12px 24px;
  background: #111;
  color: #f0f0f0;
  font-weight: bold;
  font-size: 16px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 10px rgba(255,0,150,0.4), 0 0 20px rgba(0,200,255,0.2);
  transition: all 0.3s ease;
}

/* Neon glitch hover */
.suno-btn:hover {
  color: #ff0066;
  text-shadow: 
    2px 0 #00f, 
    -2px 0 #f0f, 
    0 2px #0ff;
  box-shadow: 0 0 15px rgba(255,0,150,0.8), 0 0 30px rgba(0,200,255,0.6);
  transform: scale(1.05);
}

/* Glitch layers */
.suno-btn::before,
.suno-btn::after {
  content: attr(data-text);  /* copy button text */
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  color: #ff0066;
  background: #111;
  overflow: hidden;
  opacity: 0.7;
  animation: glitchShift 2.5s infinite linear alternate-reverse;
}

.suno-btn::after {
  color: #00eaff;
  animation-delay: 1.2s; /* desync layers */
}



/* Glitch canvas overlay */
#glitch-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

/* ===== Animations ===== */

@keyframes glitchTop {
  0%   { clip-path: inset(0% 0 60% 0); transform: translate(1px, -1px) skewX(0.2deg); }
  20%  { clip-path: inset(0% 0 62% 0); transform: translate(2px, -2px) skewX(-0.6deg); }
  40%  { clip-path: inset(0% 0 58% 0); transform: translate(1px, -1px) skewX(0.9deg); }
  60%  { clip-path: inset(0% 0 65% 0); transform: translate(3px, -2px) skewX(-1.2deg); }
  80%  { clip-path: inset(0% 0 55% 0); transform: translate(0px, -1px) skewX(0.4deg); }
  100% { clip-path: inset(0% 0 60% 0); transform: translate(1px, -1px) skewX(-0.3deg); }
}

@keyframes glitchBottom {
  0%   { clip-path: inset(40% 0 0 0); transform: translate(-1px, 1px) skewX(-0.2deg); }
  20%  { clip-path: inset(38% 0 0 0); transform: translate(-2px, 2px) skewX(0.6deg); }
  40%  { clip-path: inset(42% 0 0 0); transform: translate(-1px, 1px) skewX(-0.9deg); }
  60%  { clip-path: inset(35% 0 0 0); transform: translate(-3px, 2px) skewX(1.2deg); }
  80%  { clip-path: inset(45% 0 0 0); transform: translate(-0px, 1px) skewX(-0.4deg); }
  100% { clip-path: inset(40% 0 0 0); transform: translate(-1px, 1px) skewX(0.3deg); }
}

@keyframes titleFlicker {
  0%, 9%, 11%, 100% { opacity: 1; filter: none; }
  10% { opacity: 0.78; filter: hue-rotate(12deg) saturate(1.2); }
  20% { opacity: 0.92; filter: contrast(1.1) brightness(1.03); }
  35% { opacity: 0.84; filter: blur(0.3px) brightness(1.06); }
  50% { opacity: 0.95; filter: hue-rotate(-10deg) saturate(1.1); }
  65% { opacity: 0.8; filter: contrast(1.2) }
  80% { opacity: 0.96; filter: none; }
}

@keyframes taglinePulse {
  0% { text-shadow:
        0 0 3px #fff,
        0 0 8px var(--neon-pink),
        0 0 10px var(--neon-blue),
        0 0 12px var(--neon-red); }
  100% { text-shadow:
        0 0 4px #fff,
        0 0 12px var(--neon-pink),
        0 0 14px var(--neon-blue),
        0 0 18px var(--neon-red); }
}

/* Responsive */
@media (max-width: 640px) {
  .music-controls {
    gap: 10px;
  }
  .music-btn {
    padding: 9px 12px;
    font-size: 0.85rem;
  }
}

/* Motion-safe */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
  #glitch-bg { display: none; }
  body::after { background: none; }
}

/* OS button — glitchy like ALL MUSIC, with green CRT vibe */
.os-btn {
  /* keep base music-btn look but push toward the link style */
  position: relative;
  display: inline-block;
  padding: 12px 24px;
  background: #0b1511;                 /* darker greenish base */
  border-color: var(--os-green);        /* override pink border */
  color: #eafff6;
  font-weight: bold;
  font-size: 16px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow:
    0 0 10px rgba(19,195,128,0.45),
    0 0 20px rgba(0,255,170,0.25);
  transition: all 0.3s ease;
  text-decoration: none;
}

/* share the same glitch motion as suno-btn */
.os-btn:hover {
  color: #a7ffdf;
  text-shadow:
    2px 0 #00ffcc,
   -2px 0 #00ffaa,
    0 2px #00ffd5;
  box-shadow:
    0 0 15px rgba(0,255,170,0.8),
    0 0 30px rgba(0,255,170,0.45);
  transform: scale(1.05);
}

.os-btn { border-width: 2px; border-style: solid; }


/* green glitch layers (faster) */
.os-btn::before,
.os-btn::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: #00ffaa;               /* top layer tint */
  background: #0b1511;
  opacity: 0.7;
  overflow: hidden;
  animation: glitchShift 2s infinite linear alternate-reverse; /* faster speed */
  pointer-events: none;
}

.os-btn::after {
  color: #00e6ff;               
  animation-delay: 1s;          /* desync layers */
}

.os-btn::after {
  content: "_";
  position: absolute;
  right: 8px;
  animation: blink 1s steps(2, start) infinite;
  color: #00ffaa;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}



/* keep your "active" look but amped in green */
.os-btn.active {
  background: var(--os-green);
  color: #00170e;
  border-color: #00ffaa;
  box-shadow:
    0 0 12px var(--os-green),
    0 0 26px rgba(0,255,170,0.5),
    0 0 38px rgba(0,255,170,0.35);
}

/* DOS-style blinking cursor for OS button */
.os-btn {
  font-family: 'Share Tech Mono', monospace; /* keeps it terminal-like */
  letter-spacing: 0.08em;
  position: relative;
}

.os-btn .cursor {
  display: inline-block;
  margin-left: 4px;
  width: 8px;
  background: #00ffaa;
  animation: blink 1s steps(2, start) infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

