/* Custom Properties / Design Tokens */
:root {
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
  
  --bg-dark: #0a0915;
  --bg-panel: rgba(20, 18, 43, 0.65);
  --bg-panel-hover: rgba(28, 25, 60, 0.85);
  
  --border-color: rgba(255, 255, 255, 0.08);
  --border-color-hover: rgba(255, 255, 255, 0.18);
  
  --glow-purple: #8b5cf6;
  --glow-pink: #ec4899;
  --glow-cyan: #06b6d4;
  --text-primary: #f3f4f6;
  --text-muted: #9ca3af;
  --text-gold: #fbbf24;
  
  --gradient-neon: linear-gradient(135deg, var(--glow-purple) 0%, var(--glow-pink) 100%);
  --gradient-cyan-purple: linear-gradient(135deg, var(--glow-cyan) 0%, var(--glow-purple) 100%);
  
  --shadow-glow: 0 8px 32px 0 rgba(139, 92, 246, 0.15);
  --shadow-glow-hover: 0 12px 40px 0 rgba(236, 72, 153, 0.3);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: var(--font-body);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Background Glow Effects */
.bg-glow {
  position: fixed;
  width: 50vw;
  height: 50vw;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(120px);
  z-index: -1;
  opacity: 0.25;
}

.bg-glow-1 {
  background: var(--glow-purple);
  top: -10%;
  left: -10%;
}

.bg-glow-2 {
  background: var(--glow-pink);
  bottom: -10%;
  right: -10%;
}

/* Header & Logo */
header {
  border-bottom: 1px solid var(--border-color);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 9, 21, 0.75);
  padding: 1rem 0;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-emoji {
  font-size: 2rem;
  filter: drop-shadow(0 0 8px var(--glow-purple));
  animation: logoFloat 3s ease-in-out infinite;
}

.gradient-text {
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: 2px;
}

.logo-sub {
  font-size: 0.8rem;
  letter-spacing: 3px;
  color: var(--glow-cyan);
  font-family: var(--font-heading);
  font-weight: 700;
  margin-top: 4px;
}

/* Navigation Links */
.nav-links {
  display: flex;
  list-style: none;
  gap: 0.75rem;
}

.nav-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  background: var(--gradient-neon);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.4);
}

/* Hero Section */
.hero-section {
  padding: 4rem 0 3rem 0;
  text-align: center;
}

.hero-tagline {
  color: var(--glow-cyan);
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 0.8rem;
  display: inline-block;
  background: rgba(6, 182, 212, 0.1);
  padding: 0.3rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-title .highlight {
  position: relative;
  background: var(--gradient-neon);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
}

/* General Section Headings */
.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-align: center;
}

.section-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1.05rem;
}

/* Tabs Toggle Mechanics */
.tab-content {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.active {
  display: block;
}

/* Glassmorphism Panel base class */
.glass-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  box-shadow: var(--shadow-glow);
  padding: 2rem;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: var(--border-color-hover);
}

/* 1. Legends Encyclopedia Grid & Cards */
.legends-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.legend-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-smooth);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.legend-card:hover {
  transform: translateY(-8px);
  border-color: rgba(236, 72, 153, 0.3);
  box-shadow: var(--shadow-glow-hover);
}

.card-image-wrapper {
  height: 180px;
  background: linear-gradient(135deg, rgba(20, 18, 43, 0.8) 0%, rgba(10, 9, 21, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  border-bottom: 1px solid var(--border-color);
  overflow: hidden;
}

.card-avatar {
  font-size: 5rem;
  transition: transform 0.5s ease;
}

.legend-card:hover .card-avatar {
  transform: scale(1.15) rotate(5deg);
}

.card-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(139, 92, 246, 0.2);
  color: var(--glow-cyan);
  border: 1px solid var(--glow-cyan);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

.legend-card[data-legend="ricardo"] .card-badge {
  color: var(--glow-pink);
  border-color: var(--glow-pink);
  background: rgba(236, 72, 153, 0.15);
}

.legend-card[data-legend="cj"] .card-badge {
  color: var(--text-gold);
  border-color: var(--text-gold);
  background: rgba(251, 191, 36, 0.15);
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-content h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.card-quote {
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 0.5rem;
  border-left: 2px solid var(--glow-purple);
}

.stats-container {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: auto;
}

.stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.stat-label {
  color: var(--text-muted);
  width: 90px;
}

.stat-bar {
  flex-grow: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  margin: 0 0.8rem;
  overflow: hidden;
  position: relative;
}

.stat-fill {
  height: 100%;
  background: var(--gradient-neon);
  border-radius: 10px;
  transition: width 1s ease-out;
}

.stat-val {
  font-weight: 700;
  color: var(--glow-cyan);
  width: 20px;
  text-align: right;
}

/* 2. Meme Generator Layout */
.meme-generator-container {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  margin-bottom: 4rem;
  align-items: start;
}

@media (max-width: 968px) {
  .meme-generator-container {
    grid-template-columns: 1fr;
  }
}

.meme-preview-box {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.canvas-wrapper {
  background: #000;
  border: 4px solid var(--border-color);
  box-shadow: var(--shadow-glow);
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  align-items: center;
  justify-content: center;
}

#memeCanvas {
  max-width: 100%;
  height: auto;
  display: block;
}

.meme-controls-box h3 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.5rem;
}

.control-group {
  margin-bottom: 1.5rem;
}

.group-label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.template-select-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.8rem;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: var(--transition-smooth);
}

.template-select-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--glow-purple);
}

.template-select-btn.active {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--glow-purple);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.2);
}

.thumb-label {
  font-weight: 600;
  font-size: 0.85rem;
}

/* Styled Inputs */
input[type="text"] {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  padding: 0.8rem 1rem;
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: var(--transition-smooth);
}

input[type="text"]:focus {
  outline: none;
  border-color: var(--glow-pink);
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.25);
}

/* Styled Sliders */
.styled-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  cursor: pointer;
}

.styled-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--glow-pink);
  box-shadow: 0 0 8px var(--glow-pink);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.styled-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.text-customizer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.3);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.color-picker-wrapper input[type="color"] {
  position: absolute;
  top: -5px;
  left: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  border: none;
  background: transparent;
  cursor: pointer;
}

/* Filter Toggles */
.filter-options {
  display: flex;
  gap: 0.6rem;
}

.radio-card {
  flex: 1;
  position: relative;
  cursor: pointer;
}

.radio-card input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-design {
  display: block;
  text-align: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.radio-card:hover .radio-design {
  background: rgba(255, 255, 255, 0.08);
}

.radio-card input:checked + .radio-design {
  background: rgba(6, 182, 212, 0.15);
  border-color: var(--glow-cyan);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
  color: #fff;
}

/* Buttons */
.action-btn {
  width: 100%;
  background: var(--gradient-neon);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: var(--transition-smooth);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-hover);
}

.action-btn:active {
  transform: translateY(1px);
}

/* 3. Disco Canvas & Club Area */
.disco-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  margin-bottom: 4rem;
  align-items: start;
}

@media (max-width: 968px) {
  .disco-container {
    grid-template-columns: 1fr;
  }
}

.disco-screen-wrapper {
  position: relative;
  background: #000;
  border: 4px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(139, 92, 246, 0.25);
  aspect-ratio: 16/9;
}

#danceCanvas {
  width: 100%;
  height: 100%;
  display: block;
}

.strobe-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  mix-blend-mode: color-dodge;
  transition: opacity 0.05s ease-out;
}

.disco-now-playing {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-color);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--glow-cyan);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  backdrop-filter: blur(4px);
  z-index: 5;
}

.music-note {
  animation: logoFloat 2s ease-in-out infinite;
  display: inline-block;
}

/* Play/Pause Button */
.play-btn {
  background: var(--gradient-cyan-purple);
  border: none;
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.8rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.4);
  transition: var(--transition-smooth);
}

.play-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
}

.play-btn.playing {
  background: linear-gradient(135deg, var(--glow-pink) 0%, var(--glow-purple) 100%);
  box-shadow: 0 0 15px rgba(236, 72, 153, 0.4);
}

.control-row-center {
  display: flex;
  justify-content: center;
  margin-bottom: 2rem;
}

.slider-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.badge-value {
  background: rgba(6, 182, 212, 0.15);
  color: var(--glow-cyan);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 0.1rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-heading);
}

/* Disco Visualizer Effects Toggle Button */
.effects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.6rem;
}

.effect-toggle-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  padding: 0.7rem;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.effect-toggle-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

.effect-toggle-btn.active {
  background: rgba(236, 72, 153, 0.15);
  border-color: var(--glow-pink);
  color: #fff;
  box-shadow: 0 0 10px rgba(236, 72, 153, 0.15);
}

.synth-tips {
  margin-top: 2rem;
  padding: 0.8rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.synth-tips p {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* 4. Soundboard Grid */
.sound-visualizer-box {
  margin-bottom: 2rem;
  padding: 1.2rem;
}

.visualizer-header {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--glow-cyan);
  text-transform: uppercase;
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.vis-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--glow-cyan);
  box-shadow: 0 0 8px var(--glow-cyan);
  display: inline-block;
  animation: logoPulse 1.5s infinite alternate;
}

.visualizer-canvas-wrapper {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

#soundVisualizerCanvas {
  width: 100%;
  height: 100px;
  display: block;
}

.soundboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.2rem;
  margin-bottom: 5rem;
}

.sound-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  padding: 1.2rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-align: left;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  outline: none;
}

.sound-card:hover {
  background: var(--bg-panel-hover);
  border-color: var(--glow-purple);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.sound-card:active {
  transform: translateY(1px);
}

.sound-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 4px var(--glow-purple));
  transition: transform 0.2s ease;
}

.sound-card:hover .sound-icon {
  transform: scale(1.15);
}

.sound-info {
  display: flex;
  flex-direction: column;
}

.sound-name {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
}

.sound-desc {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.play-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 0;
  background: var(--gradient-cyan-purple);
  transition: width 0.1s ease;
}

.sound-card.playing .play-indicator {
  animation: playBarProgress var(--play-duration, 1s) linear forwards;
}

/* Footer Section */
footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  margin-top: auto;
  text-align: center;
  background: rgba(6, 5, 12, 0.9);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
}

.footer-content p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-sub {
  font-size: 0.78rem !important;
  color: rgba(255, 255, 255, 0.2) !important;
}

/* Keyframes & Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes logoPulse {
  from {
    opacity: 0.6;
  }
  to {
    opacity: 1;
  }
}

@keyframes playBarProgress {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Active strobe light visual effect */
.flash-strobe {
  opacity: 0.35 !important;
}

/* God Mode Glitch State */
body.god-mode-active {
  animation: screenShake 0.15s infinite alternate;
}

body.god-mode-active::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(239, 68, 68, 0.04);
  pointer-events: none;
  z-index: 9999;
}

body.god-mode-active .legend-card {
  animation: glitchRGB 0.2s infinite alternate;
}

@keyframes screenShake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-0.5deg); }
  20% { transform: translate(-3px, 0px) rotate(0.5deg); }
  30% { transform: translate(0px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-0.5deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(2px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(2px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-0.5deg); }
}

@keyframes glitchRGB {
  0% {
    box-shadow: -2px 0 0 rgba(255,0,0,0.5), 2px 0 0 rgba(0,0,255,0.5);
  }
  100% {
    box-shadow: 2px 0 0 rgba(255,0,0,0.5), -2px 0 0 rgba(0,0,255,0.5);
  }
}

/* Gallery Section Styles */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.gallery-card {
  background: var(--bg-panel);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(12px);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
  transition: var(--transition-smooth);
}

.gallery-card:hover {
  transform: translateY(-5px);
  border-color: var(--glow-cyan);
  box-shadow: 0 8px 30px rgba(6, 182, 212, 0.25);
}

.gallery-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1/1;
  cursor: pointer;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 9, 21, 0.6);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease;
}

.gallery-image-wrapper:hover .gallery-overlay {
  opacity: 1;
}

.zoom-icon {
  background: var(--gradient-cyan-purple);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.gallery-info {
  padding: 1.2rem;
}

.gallery-info h4 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
  color: #fff;
}

.gallery-info p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Lightbox Modal */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(6, 5, 12, 0.95);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 75vh;
  border-radius: 12px;
  border: 2px solid var(--border-color);
  box-shadow: 0 0 35px rgba(139, 92, 246, 0.3);
  animation: zoomEffect 0.3s ease;
}

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

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
  color: var(--glow-pink);
  text-decoration: none;
}

#lightboxCaption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: var(--text-primary);
  padding: 15px 0;
  font-size: 1.05rem;
  font-family: var(--font-heading);
}

/* God Mode glitch modifier for gallery cards */
body.god-mode-active .gallery-card {
  animation: glitchRGB 0.25s infinite alternate;
}

/* Mobile Compatibility Styles (Screen width <= 768px) */
@media (max-width: 768px) {
  /* Header adjustments: center align & horizontal scrolling menu tabs */
  .header-container {
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 0.5rem;
  }
  
  .nav-links {
    width: 100%;
    overflow-x: auto;
    display: flex;
    justify-content: flex-start;
    padding: 0.2rem 0;
    gap: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
  }

  .nav-links::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
  }

  .nav-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.82rem;
    flex-shrink: 0;
  }

  /* Hero Section adaptations */
  .hero-section {
    padding: 2.5rem 0 1.5rem 0;
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.3;
  }

  .hero-desc {
    font-size: 0.95rem;
  }

  .section-title {
    font-size: 1.8rem;
  }

  .section-subtitle {
    margin-bottom: 1.8rem;
    font-size: 0.9rem;
  }

  /* Grid Layouts to 1 Column */
  .legends-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Meme Maker mobile styling */
  .meme-generator-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .canvas-wrapper {
    max-width: 100%;
    aspect-ratio: 1/1;
  }

  .text-customizer-row {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .template-grid {
    grid-template-columns: 1fr 1fr;
  }

  /* Disco Tab mobile adjustments */
  .disco-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .disco-screen-wrapper {
    aspect-ratio: 16/10; /* slightly taller on mobile */
  }

  .effects-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .play-btn {
    width: 100%;
    justify-content: center;
  }

  /* Soundboard mobile grid & button sizes */
  .soundboard-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 columns instead of 1 */
    gap: 0.7rem;
  }

  .sound-card {
    padding: 0.8rem;
    gap: 0.6rem;
    border-radius: 10px;
    min-height: 65px;
    align-items: center;
  }

  .sound-icon {
    font-size: 1.3rem;
  }

  .sound-name {
    font-size: 0.8rem;
  }

  .sound-desc {
    font-size: 0.65rem;
    margin-top: 1px;
  }

  .sound-visualizer-box {
    padding: 0.8rem;
  }

  #soundVisualizerCanvas {
    height: 70px; /* shorter visualizer on mobile screens */
  }

  /* Lightbox Modal scale adjustments */
  .lightbox-modal {
    padding-top: 40px;
  }

  .lightbox-content {
    max-width: 95%;
    max-height: 60vh;
  }

  .lightbox-close {
    top: 10px;
    right: 20px;
    font-size: 35px;
  }

  #lightboxCaption {
    font-size: 0.9rem;
    width: 90%;
  }
}

