/* ==========================================================================
   Gal AI VTuber OBS Overlay Styles
   Cyberpunk / Y2K Gal Aesthetic with High-Gloss Neon & Glassmorphism
   ========================================================================== */

/* --- Reset & Base Variables --- */
:root {
  --neon-pink: #ff2a85;
  --neon-pink-bright: #ff66b2;
  --neon-pink-glow: rgba(255, 42, 133, 0.65);
  --neon-cyan: #00f0ff;
  --neon-cyan-bright: #70f7ff;
  --neon-cyan-glow: rgba(0, 240, 255, 0.65);
  --neon-yellow: #ffe600;
  --neon-purple: #b5179e;
  --sc-gold-start: #ffe259;
  --sc-gold-end: #ffa751;
  --sc-red-start: #ff0844;
  --sc-red-end: #ff4e50;
  --sc-rainbow: linear-gradient(135deg, #ff007f, #ff00ff, #7928ca, #00f0ff, #00ff88);
  
  --glass-bg-dark: rgba(18, 12, 32, 0.78);
  --glass-bg-listener: rgba(26, 18, 48, 0.70);
  --glass-border: rgba(255, 255, 255, 0.25);
  --font-main: 'M PLUS Rounded 1c', 'Zen Maru Gothic', sans-serif;
  --font-title: 'Dela Gothic One', 'Orbitron', cursive;
  --font-cyber: 'Orbitron', sans-serif;
}

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

body {
  width: 1920px;
  height: 1080px;
  background: transparent !important;
  overflow: hidden;
  font-family: var(--font-main);
  color: #ffffff;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

#overlay-container {
  position: relative;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  pointer-events: none;
}

/* ==========================================================================
   Super Chat Banner (Top Center)
   ========================================================================== */
.sc-container {
  position: absolute;
  top: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  z-index: 100;
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.sc-container.hidden {
  opacity: 0;
  transform: translate(-50%, -150px) scale(0.85);
  pointer-events: none;
}

.sc-banner {
  position: relative;
  background: linear-gradient(135deg, rgba(255, 14, 114, 0.9), rgba(255, 107, 0, 0.9), rgba(255, 215, 0, 0.95));
  border-radius: 24px;
  padding: 22px 36px;
  box-shadow:
    0 0 25px rgba(255, 0, 128, 0.8),
    0 0 50px rgba(255, 215, 0, 0.6),
    inset 0 0 15px rgba(255, 255, 255, 0.7);
  border: 3px solid #ffffff;
  overflow: hidden;
  animation: sc-pulse 2s infinite alternate ease-in-out;
}

.sc-glow-bg {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 70%);
  animation: rotate-glow 6s linear infinite;
  pointer-events: none;
}

.sc-badge {
  display: inline-block;
  background: #ffffff;
  color: #ff0055;
  font-family: var(--font-title);
  font-size: 16px;
  font-weight: 900;
  padding: 4px 16px;
  border-radius: 20px;
  letter-spacing: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  text-transform: uppercase;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}

.sc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
}

.sc-user-name {
  font-family: var(--font-title);
  font-size: 26px;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6), 0 0 10px #ff0055;
}

.sc-amount {
  font-family: var(--font-cyber);
  font-size: 34px;
  font-weight: 900;
  color: #fffb00;
  text-shadow: 0 0 12px rgba(255, 251, 0, 0.9), 2px 2px 0px #ff0055;
  letter-spacing: 1px;
}

.sc-message {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.4;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  position: relative;
  z-index: 2;
}

#sc-confetti-canvas {
  position: absolute;
  top: -100px;
  left: -200px;
  width: 1300px;
  height: 600px;
  pointer-events: none;
  z-index: 101;
}

/* ==========================================================================
   Subtitle & Chat Bubbles (Bottom Left to Bottom Center)
   ========================================================================== */
.subtitle-container {
  position: absolute;
  bottom: 40px;
  left: 60px;
  width: 1340px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.subtitle-container.hidden {
  opacity: 0;
  transform: translateY(40px) scale(0.97);
  pointer-events: none;
}

/* Listener comment box */
.listener-bubble {
  align-self: flex-start;
  max-width: 900px;
  background: var(--glass-bg-listener);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 2px solid var(--neon-cyan);
  border-radius: 18px;
  padding: 10px 22px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 15px var(--neon-cyan-glow);
  display: flex;
  align-items: center;
  gap: 16px;
  animation: listener-fade-in 0.3s ease-out;
}

.listener-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 240, 255, 0.18);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid rgba(0, 240, 255, 0.4);
}

.listener-icon {
  font-size: 18px;
}

.listener-name {
  font-size: 17px;
  font-weight: 800;
  color: var(--neon-cyan-bright);
  text-shadow: 0 0 8px var(--neon-cyan-glow);
  white-space: nowrap;
}

.listener-text {
  font-size: 20px;
  font-weight: 700;
  color: #f0f8ff;
  line-height: 1.4;
  word-break: break-word;
}

/* Luna Main Reply Bubble */
.luna-bubble {
  position: relative;
  width: 100%;
  background: var(--glass-bg-dark);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 3px solid var(--neon-pink);
  border-radius: 28px;
  padding: 24px 34px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    0 0 25px var(--neon-pink-glow),
    inset 0 0 20px rgba(255, 42, 133, 0.2);
  animation: luna-pop-in 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.luna-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.luna-name-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(90deg, #ff2a85, #ff66b2);
  color: #ffffff;
  padding: 6px 20px;
  border-radius: 16px;
  border: 2px solid #ffffff;
  box-shadow: 0 0 15px rgba(255, 42, 133, 0.8);
}

.luna-star {
  color: #ffe600;
  font-size: 16px;
  text-shadow: 0 0 6px #ffe600;
  animation: star-spin 3s linear infinite;
}

.luna-name {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 2px;
}

/* Emotion Badges */
.emotion-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 900;
  font-family: var(--font-cyber);
  letter-spacing: 1px;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.emotion-happy {
  background: rgba(255, 230, 0, 0.25);
  color: #ffe600;
  box-shadow: 0 0 10px rgba(255, 230, 0, 0.5);
  border-color: #ffe600;
}

.emotion-teasing {
  background: rgba(255, 42, 133, 0.25);
  color: #ff66b2;
  box-shadow: 0 0 10px rgba(255, 42, 133, 0.5);
  border-color: #ff2a85;
}

.emotion-surprised {
  background: rgba(0, 240, 255, 0.25);
  color: #00f0ff;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.5);
  border-color: #00f0ff;
}

.emotion-embarrassed {
  background: rgba(255, 77, 109, 0.25);
  color: #ff4d6d;
  box-shadow: 0 0 10px rgba(255, 77, 109, 0.5);
  border-color: #ff4d6d;
}

.emotion-thinking {
  background: rgba(181, 23, 158, 0.25);
  color: #d680ff;
  box-shadow: 0 0 10px rgba(181, 23, 158, 0.5);
  border-color: #b5179e;
}

.emotion-sad {
  background: rgba(77, 148, 255, 0.25);
  color: #80bfff;
  box-shadow: 0 0 10px rgba(77, 148, 255, 0.5);
  border-color: #4d94ff;
}

.luna-body {
  position: relative;
}

.luna-reply-text {
  font-size: 28px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.5;
  letter-spacing: 0.5px;
  text-shadow:
    0 0 12px rgba(255, 42, 133, 0.4),
    1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Bubble Tail (Pointing right towards Luna) */
.bubble-tail {
  position: absolute;
  right: -24px;
  bottom: 35px;
  width: 0;
  height: 0;
  border-top: 15px solid transparent;
  border-bottom: 15px solid transparent;
  border-left: 26px solid var(--neon-pink);
  filter: drop-shadow(0 0 10px var(--neon-pink-glow));
}

.bubble-tail::after {
  content: '';
  position: absolute;
  right: 4px;
  bottom: -11px;
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 20px solid rgba(18, 12, 32, 0.9);
}

/* ==========================================================================
   Avatar Container & SVG Styling (Bottom Right)
   ========================================================================== */
.avatar-container {
  position: absolute;
  bottom: 0px;
  right: 50px;
  width: 800px;
  height: 1080px;
  z-index: 40;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  pointer-events: auto;
}

.avatar-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  /* Idle breathing & floating animation */
  animation: gal-idle-float 4.2s ease-in-out infinite alternate;
  transform-origin: bottom center;
  pointer-events: auto;
}

/* Avatar Image (PNG) Styling */
.avatar-image {
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.45));
  user-select: none;
  pointer-events: none;
  display: block;
}

/* SVG Specific classes */
.gal-svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.45));
}

/* Floating Hair Motion */
.hair-twintail-left {
  transform-origin: 110px 180px;
  animation: hair-sway-left 3.8s ease-in-out infinite alternate;
}

.hair-twintail-right {
  transform-origin: 290px 180px;
  animation: hair-sway-right 4.2s ease-in-out infinite alternate;
}

/* Eye sparkles and effects */
.eye-sparkle {
  animation: eye-glitter 2.2s infinite ease-in-out;
}

/* Emotion Floating Effects Layer */
.effect-sparkle {
  animation: effect-twinkle 1.8s ease-in-out infinite;
}

.effect-heart {
  animation: heart-beat 1.4s ease-in-out infinite;
}

.effect-sweat {
  animation: sweat-drip 1.6s ease-in-out infinite;
}

.effect-question {
  animation: question-bounce 1.5s ease-in-out infinite;
}

.effect-surprise {
  animation: surprise-pop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) infinite alternate;
}

.blush-lines {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blush-lines.active {
  opacity: 1;
}

/* ==========================================================================
   Keyframes Animations
   ========================================================================== */
@keyframes gal-idle-float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-8px) rotate(0.4deg);
  }
  100% {
    transform: translateY(-16px) rotate(-0.4deg);
  }
}

@keyframes hair-sway-left {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(-2.5deg) skewX(-1deg); }
  100% { transform: rotate(1.5deg) skewX(1deg); }
}

@keyframes hair-sway-right {
  0% { transform: rotate(0deg); }
  50% { transform: rotate(2.5deg) skewX(1deg); }
  100% { transform: rotate(-1.5deg) skewX(-1deg); }
}

@keyframes sc-pulse {
  0% {
    box-shadow:
      0 0 25px rgba(255, 0, 128, 0.8),
      0 0 50px rgba(255, 215, 0, 0.6),
      inset 0 0 15px rgba(255, 255, 255, 0.7);
  }
  100% {
    box-shadow:
      0 0 45px rgba(255, 0, 128, 1),
      0 0 80px rgba(255, 215, 0, 0.9),
      inset 0 0 25px rgba(255, 255, 255, 1);
  }
}

@keyframes rotate-glow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes star-spin {
  0% { transform: rotate(0deg) scale(1); }
  50% { transform: rotate(180deg) scale(1.15); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes luna-pop-in {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes listener-fade-in {
  0% {
    opacity: 0;
    transform: translateX(-20px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes effect-twinkle {
  0%, 100% { transform: scale(0.8) rotate(0deg); opacity: 0.4; }
  50% { transform: scale(1.25) rotate(45deg); opacity: 1; filter: drop-shadow(0 0 8px #ffe600); }
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1) translateY(0); }
  25% { transform: scale(1.2) translateY(-4px); }
  50% { transform: scale(1.05) translateY(-2px); }
  75% { transform: scale(1.25) translateY(-6px); }
}

@keyframes sweat-drip {
  0% { transform: translateY(0) scale(0.9); opacity: 0.6; }
  50% { transform: translateY(8px) scale(1.1); opacity: 1; }
  100% { transform: translateY(16px) scale(0.8); opacity: 0.2; }
}

@keyframes question-bounce {
  0%, 100% { transform: translateY(0) rotate(-5deg); }
  50% { transform: translateY(-10px) rotate(5deg); }
}

@keyframes surprise-pop {
  0% { transform: scale(1); }
  100% { transform: scale(1.3) rotate(5deg); }
}

@keyframes eye-glitter {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.2); }
}
