@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* Base Design Variables & Themes */
:root {
  /* Default Theme: Cyberpunk Red */
  --bg-dark: #07090e;
  --bg-card: rgba(13, 17, 28, 0.7);
  --bg-card-hover: rgba(20, 26, 42, 0.85);
  --border-color: rgba(255, 30, 30, 0.25);
  --border-color-hover: rgba(255, 30, 30, 0.6);
  --color-primary: #ff1e1e;
  --color-primary-rgb: 255, 30, 30;
  --color-secondary: #ff7700;
  --color-accent: #03e9f4;
  --color-accent-rgb: 3, 233, 244;
  --glow-shadow: 0 0 15px rgba(255, 30, 30, 0.35);
  --glow-shadow-lg: 0 0 25px rgba(255, 30, 30, 0.5);
  --text-gradient: linear-gradient(90deg, #ff1e1e, #ffffff, #ff7700);
}

.theme-purple {
  --bg-dark: #090613;
  --bg-card: rgba(18, 12, 34, 0.7);
  --bg-card-hover: rgba(26, 17, 48, 0.85);
  --border-color: rgba(139, 92, 246, 0.25);
  --border-color-hover: rgba(139, 92, 246, 0.6);
  --color-primary: #8b5cf6;
  --color-primary-rgb: 139, 92, 246;
  --color-secondary: #ec4899;
  --color-accent: #f43f5e;
  --color-accent-rgb: 244, 63, 94;
  --glow-shadow: 0 0 15px rgba(139, 92, 246, 0.35);
  --glow-shadow-lg: 0 0 25px rgba(139, 92, 246, 0.5);
  --text-gradient: linear-gradient(90deg, #8b5cf6, #ffffff, #ec4899);
}

.theme-emerald {
  --bg-dark: #040907;
  --bg-card: rgba(10, 22, 17, 0.7);
  --bg-card-hover: rgba(15, 33, 25, 0.85);
  --border-color: rgba(16, 185, 129, 0.25);
  --border-color-hover: rgba(16, 185, 129, 0.6);
  --color-primary: #10b981;
  --color-primary-rgb: 16, 185, 129;
  --color-secondary: #06b6d4;
  --color-accent: #34d399;
  --color-accent-rgb: 52, 211, 153;
  --glow-shadow: 0 0 15px rgba(16, 185, 129, 0.35);
  --glow-shadow-lg: 0 0 25px rgba(16, 185, 129, 0.5);
  --text-gradient: linear-gradient(90deg, #10b981, #ffffff, #06b6d4);
}

.theme-blue {
  --bg-dark: #040813;
  --bg-card: rgba(8, 17, 36, 0.7);
  --bg-card-hover: rgba(12, 26, 54, 0.85);
  --border-color: rgba(30, 144, 255, 0.25);
  --border-color-hover: rgba(30, 144, 255, 0.6);
  --color-primary: #1e90ff;
  --color-primary-rgb: 30, 144, 255;
  --color-secondary: #00d2ff;
  --color-accent: #03e9f4;
  --color-accent-rgb: 3, 233, 244;
  --glow-shadow: 0 0 15px rgba(30, 144, 255, 0.35);
  --glow-shadow-lg: 0 0 25px rgba(30, 144, 255, 0.5);
  --text-gradient: linear-gradient(90deg, #1e90ff, #ffffff, #00d2ff);
}

/* Global resets & styling */
* {
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--bg-dark);
  color: #ffffff;
  overflow-x: hidden;
  transition: background-color 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.font-gaming {
  font-family: 'Orbitron', sans-serif;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: rgba(var(--color-primary-rgb), 0.3);
  border-radius: 4px;
  transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
}

/* Cyber Glass Card Style */
.cyber-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4), var(--glow-shadow);
  border-radius: 16px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cyber-card:hover {
  border-color: var(--border-color-hover);
  background: var(--bg-card-hover);
  box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5), var(--glow-shadow-lg);
  transform: translateY(-4px);
}

/* Glowing Neon Borders & Rings */
.neon-text-glow {
  text-shadow: 0 0 10px rgba(var(--color-primary-rgb), 0.6), 0 0 20px rgba(var(--color-primary-rgb), 0.3);
}

.neon-border-glow {
  box-shadow: var(--glow-shadow);
}

.neon-border-glow-lg {
  box-shadow: var(--glow-shadow-lg);
}

/* Floating Background Lights */
.ambient-light {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  filter: blur(150px);
  opacity: 0.15;
  pointer-events: none;
  z-index: 0;
  mix-blend-mode: screen;
  transition: background 0.8s ease, transform 10s infinite ease-in-out;
}

.ambient-1 {
  background: var(--color-primary);
  top: 10%;
  left: 5%;
  animation: floatLight1 20s infinite ease-in-out;
}

.ambient-2 {
  background: var(--color-accent);
  bottom: 15%;
  right: 5%;
  animation: floatLight2 25s infinite ease-in-out;
}

.ambient-3 {
  background: var(--color-secondary);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  opacity: 0.08;
  animation: floatLight3 30s infinite ease-in-out;
}

@keyframes floatLight1 {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(50px) translateX(30px) scale(1.2); }
}

@keyframes floatLight2 {
  0%, 100% { transform: translateY(0) scale(1.2); }
  50% { transform: translateY(-70px) translateX(-40px) scale(0.9); }
}

@keyframes floatLight3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50% { transform: translate(-40%, -60%) scale(1.3); }
}

/* Floating Background Icons */
.floating-icon {
  position: absolute;
  opacity: 0.06;
  pointer-events: none;
  z-index: 1;
  animation: floatUpDown 8s infinite ease-in-out;
  transition: opacity 0.5s ease;
}

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

/* Interactive Mascot Glow & Animations */
.mascot-container {
  position: relative;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
  box-shadow: var(--glow-shadow);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.mascot-container::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-primary));
  z-index: -1;
  opacity: 0.7;
  filter: blur(8px);
  transition: opacity 0.5s;
}

.mascot-container:hover {
  transform: scale(1.05) rotate(2deg);
  box-shadow: var(--glow-shadow-lg), 0 0 35px rgba(var(--color-accent-rgb), 0.5);
}

.mascot-img {
  animation: mascotHover 4s infinite ease-in-out;
  transition: filter 0.3s;
}

@keyframes mascotHover {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Glitch Effect on Mascot / Text */
.glitch-active {
  animation: glitchFx 0.4s steps(2) infinite;
}

@keyframes glitchFx {
  0% {
    clip-path: inset(40% 0 61% 0);
    transform: skew(0.3deg) translate(-2px, 2px);
    filter: hue-rotate(90deg);
  }
  20% {
    clip-path: inset(92% 0 1% 0);
    transform: skew(-0.5deg) translate(2px, -1px);
    filter: hue-rotate(180deg);
  }
  40% {
    clip-path: inset(15% 0 80% 0);
    transform: skew(0.8deg) translate(1px, 1px);
    filter: grayscale(0.5);
  }
  60% {
    clip-path: inset(80% 0 5% 0);
    transform: skew(-0.2deg) translate(-1px, -2px);
    filter: invert(0.1);
  }
  80% {
    clip-path: inset(5% 0 70% 0);
    transform: skew(0.4deg) translate(2px, 2px);
  }
  100% {
    clip-path: inset(40% 0 60% 0);
    transform: skew(0deg);
  }
}

/* Custom Cyber Cursor */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-primary);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: width 0.2s, height 0.2s, background-color 0.2s, border-color 0.2s;
  mix-blend-mode: difference;
  display: none;
}

.custom-cursor-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-accent);
  border-radius: 50%;
  position: fixed;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  display: none;
}

@media (min-width: 1024px) {
  .cursor-enabled .custom-cursor,
  .cursor-enabled .custom-cursor-dot {
    display: block;
  }
  .cursor-enabled {
    cursor: none;
  }
  .cursor-enabled a,
  .cursor-enabled button,
  .cursor-enabled select,
  .cursor-enabled input,
  .cursor-enabled textarea {
    cursor: none;
  }
}

.custom-cursor.hovered {
  width: 40px;
  height: 40px;
  border-color: var(--color-accent);
  background-color: rgba(var(--color-accent-rgb), 0.1);
}

/* Ripple Click Effect */
.ripple {
  position: absolute;
  z-index: 999;
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.8), rgba(var(--color-accent-rgb), 0.4), transparent);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: rippleEffect 0.8s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  box-shadow: 0 0 15px rgba(var(--color-primary-rgb), 0.6), 0 0 30px rgba(var(--color-accent-rgb), 0.4);
}

@keyframes rippleEffect {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(12);
    opacity: 0;
  }
}

/* Premium Animated Buttons */
.animated-button {
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.animated-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: all 0.6s ease;
}

.animated-button:hover::before {
  left: 100%;
}

.animated-button:hover {
  transform: translateY(-2px);
  border-color: var(--border-color-hover);
  box-shadow: var(--glow-shadow), 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Border lines animation */
.animated-button span.border-line {
  position: absolute;
  display: block;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.animated-button:hover span.border-line {
  opacity: 1;
}

.animated-button span.border-line:nth-child(1) {
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-primary));
  animation: borderAnim1 2s linear infinite;
}

@keyframes borderAnim1 {
  0% { left: -100%; }
  50%, 100% { left: 100%; }
}

.animated-button span.border-line:nth-child(2) {
  top: -100%;
  right: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--color-accent));
  animation: borderAnim2 2s linear infinite;
  animation-delay: 0.5s;
}

@keyframes borderAnim2 {
  0% { top: -100%; }
  50%, 100% { top: 100%; }
}

.animated-button span.border-line:nth-child(3) {
  bottom: 0;
  right: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(270deg, transparent, var(--color-primary));
  animation: borderAnim3 2s linear infinite;
  animation-delay: 1s;
}

@keyframes borderAnim3 {
  0% { right: -100%; }
  50%, 100% { right: 100%; }
}

.animated-button span.border-line:nth-child(4) {
  bottom: -100%;
  left: 0;
  width: 2px;
  height: 100%;
  background: linear-gradient(360deg, transparent, var(--color-accent));
  animation: borderAnim4 2s linear infinite;
  animation-delay: 1.5s;
}

@keyframes borderAnim4 {
  0% { bottom: -100%; }
  50%, 100% { bottom: 100%; }
}

/* Mask Hover Animation */
.mask-button {
  position: relative;
}

.mask-button .mask-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(var(--color-primary-rgb), 0.15);
  -webkit-mask: url("https://raw.githubusercontent.com/pizza3/asset/master/natureSmaller.png");
  mask: url("https://raw.githubusercontent.com/pizza3/asset/master/natureSmaller.png");
  -webkit-mask-size: 7100% 100%;
  mask-size: 7100% 100%;
  -webkit-mask-position: 0 0;
  mask-position: 0 0;
  animation: maskReverse 0.6s steps(70) forwards;
  pointer-events: none;
  z-index: 1;
}

.mask-button:hover .mask-bg {
  animation: maskForward 0.6s steps(70) forwards;
}

@keyframes maskForward {
  from { -webkit-mask-position: 0 0; mask-position: 0 0; }
  to { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
}

@keyframes maskReverse {
  from { -webkit-mask-position: 100% 0; mask-position: 100% 0; }
  to { -webkit-mask-position: 0 0; mask-position: 0 0; }
}

/* Mascot Speech Bubble */
.speech-bubble {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%) scale(0.8);
  background: var(--bg-card);
  border: 1px solid var(--border-color-hover);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--glow-shadow), 0 10px 25px rgba(0,0,0,0.5);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 50;
  color: #ffffff;
}

.speech-bubble.active {
  transform: translateX(-50%) scale(1);
  opacity: 1;
}

.speech-bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 8px solid transparent;
  border-top-color: var(--border-color-hover);
}

/* Audio Visualizer Waves */
.visualizer-bar {
  width: 3px;
  height: 4px;
  background-color: var(--color-accent);
  border-radius: 3px;
  margin: 0 1px;
  transition: height 0.1s ease;
}

.visualizer-playing .visualizer-bar:nth-child(1) { animation: bounceBar 0.8s ease-in-out infinite alternate; }
.visualizer-playing .visualizer-bar:nth-child(2) { animation: bounceBar 0.5s ease-in-out infinite alternate; animation-delay: 0.15s; }
.visualizer-playing .visualizer-bar:nth-child(3) { animation: bounceBar 0.7s ease-in-out infinite alternate; animation-delay: 0.3s; }
.visualizer-playing .visualizer-bar:nth-child(4) { animation: bounceBar 0.6s ease-in-out infinite alternate; animation-delay: 0.05s; }
.visualizer-playing .visualizer-bar:nth-child(5) { animation: bounceBar 0.9s ease-in-out infinite alternate; animation-delay: 0.2s; }

@keyframes bounceBar {
  0% { height: 4px; }
  100% { height: 20px; }
}

/* Chat Message Styling */
.chat-msg {
  animation: slideInUp 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern Fade Animations */
.fade-in {
  opacity: 0;
  animation: systemFadeIn 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes systemFadeIn {
  to { opacity: 1; }
}

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }

/* Custom Badge Tags */
.badge-tag {
  font-size: 0.65rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
}

.badge-mvp {
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

.badge-pro {
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  color: #ffffff;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.4);
}

.badge-lurker {
  background: #4b5563;
  color: #e5e7eb;
}

.badge-live {
  background-color: #ef4444;
  animation: pulseLive 1.5s infinite ease-in-out;
}

@keyframes pulseLive {
  0%, 100% { opacity: 1; box-shadow: 0 0 10px rgba(239, 68, 68, 0.8); }
  50% { opacity: 0.4; box-shadow: 0 0 2px rgba(239, 68, 68, 0.2); }
}

/* Pulsing background grid */
.cyber-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(18, 24, 38, 0.4) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 24, 38, 0.4) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: center top;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, black, transparent 80%);
}
