:root {
  /* Colors */
  --bg-dark: #0a0a0f;
  --bg-card: rgba(20, 20, 25, 0.6);
  --neon-purple: #8b5cf6;
  --neon-blue: #22d3ee;
  --neon-purple-glow: rgba(139, 92, 246, 0.5);
  --neon-blue-glow: rgba(34, 211, 238, 0.5);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(139, 92, 246, 0.3);

  /* Typography */
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Border Radius */
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s ease;
}

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

/* Global Overflow Prevention & Wrap Rules */
pre, code, textarea, input, select, table {
  max-width: 100%;
  overflow-wrap: break-word;
}

.container, .glass-panel, #tool-interface, #tool-custom-ui {
  min-width: 0;
  max-width: 100%;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* Aurora Background Effects */
.bg-gradient-blobs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background-color: var(--bg-dark);
}

.bg-gradient-blobs::after {
  content: "";
  position: absolute;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  opacity: 0.6;
  background-image: 
    repeating-linear-gradient(
      100deg, 
      var(--bg-dark) 0%,
      rgba(34, 211, 238, 0.4) 10%, 
      rgba(139, 92, 246, 0.4) 20%, 
      rgba(34, 211, 238, 0.4) 30%,
      rgba(139, 92, 246, 0.4) 40%,
      var(--bg-dark) 50%
    );
  background-size: 200% 200%;
  filter: blur(80px);
  animation: animate-aurora 25s linear infinite;
  mask-image: radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 10%, transparent 80%);
}

.bg-gradient-blobs::before {
  content: "";
  position: absolute;
  top: -50%; left: -50%; right: -50%; bottom: -50%;
  opacity: 0.4;
  background-image: 
    repeating-linear-gradient(
      -100deg, 
      rgba(139, 92, 246, 0.3) 0%, 
      var(--bg-dark) 10%, 
      rgba(34, 211, 238, 0.3) 20%, 
      var(--bg-dark) 30%,
      rgba(139, 92, 246, 0.3) 40%
    );
  background-size: 200% 200%;
  filter: blur(60px);
  animation: animate-aurora-reverse 35s linear infinite;
  mask-image: radial-gradient(ellipse at 0% 100%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 100%, black 10%, transparent 80%);
}

@keyframes animate-aurora {
  0% { background-position: 50% 50%, 50% 50%; }
  100% { background-position: 350% 50%, 350% 50%; }
}

@keyframes animate-aurora-reverse {
  0% { background-position: 350% 50%, 350% 50%; }
  100% { background-position: 50% 50%, 50% 50%; }
}

/* Hide old individual blobs, keeping class for backwards compatibility */
.blob {
  display: none !important;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

main {
  flex: 1;
}

/* Typography Utilities */
.text-gradient {
  background: linear-gradient(135deg, var(--neon-purple), var(--neon-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

/* Components */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Buttons (Global Premium Noise Style) */
.btn, [class$="-btn"]:not(.mobile-menu-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  z-index: 1;
}

.btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  gap: 0.5rem;
  background: linear-gradient(to right, #000000, #000000, #171717);
  color: white;
  box-shadow: inset 0 1px 0 #0a0a0a, 0 1px 0 rgba(255, 255, 255, 0.1);
  border: none;
}

.btn:active, [class$="-btn"]:not(.mobile-menu-btn):active {
  transform: scale(0.96);
}

.btn:hover, [class$="-btn"]:not(.mobile-menu-btn):hover {
  transform: scale(0.98);
}

.btn::before, [class$="-btn"]:not(.mobile-menu-btn)::before {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: inherit;
  background: linear-gradient(45deg, rgb(255, 100, 150), rgb(100, 150, 255), rgb(255, 200, 100), rgb(255, 100, 150));
  background-size: 300% 300%;
  animation: noise-bg-anim 4s linear infinite;
  z-index: -2;
}

.btn::after, [class$="-btn"]:not(.mobile-menu-btn)::after {
  content: '';
  position: absolute;
  top: -2px; left: -2px; right: -2px; bottom: -2px;
  border-radius: inherit;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.6"/%3E%3C/svg%3E');
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: -1;
}

@keyframes noise-bg-anim {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Clear legacy styles */
.btn-primary, .btn-outline {
  /* Inherits everything from .btn */
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000;
  padding: 0.75rem 0;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 1px;
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

.brand:hover {
  transform: scale(1.05);
}

.brand img {
  height: 32px;
  width: 32px;
}

.brand span {
  font-weight: 800;
  letter-spacing: 2px;
}

.brand > span {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding-right: 4px;
  /* Next-Gen Holographic Chroma Glow breathing animation */
  animation: dynamicChromaGlow 6s infinite alternate ease-in-out;
}

.brand .text-gradient {
  /* Fluid liquid rainbow spectrum gradient */
  background: linear-gradient(
    135deg, 
    #a855f7 0%, 
    #3b82f6 25%, 
    #22d3ee 50%, 
    #10b981 75%, 
    #a855f7 100%
  );
  background-size: 300% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: liquidGradient 6s linear infinite;
}

@keyframes liquidGradient {
  0% { background-position: 0% center; }
  100% { background-position: 300% center; }
}

@keyframes dynamicChromaGlow {
  0% {
    filter: drop-shadow(0 0 3px rgba(139, 92, 246, 0.45)) 
            drop-shadow(0 0 10px rgba(139, 92, 246, 0.2));
  }
  33% {
    filter: drop-shadow(0 0 5px rgba(34, 211, 238, 0.65)) 
            drop-shadow(0 0 16px rgba(34, 211, 238, 0.35));
  }
  66% {
    filter: drop-shadow(0 0 5px rgba(16, 185, 129, 0.6)) 
            drop-shadow(0 0 16px rgba(16, 185, 129, 0.3));
  }
  100% {
    filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.5)) 
            drop-shadow(0 0 12px rgba(139, 92, 246, 0.25));
  }
}

.nav-links-wrapper {
  flex: 1;
  min-width: 0;
  margin: 0 0.5rem;
  overflow: hidden;
  position: relative;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 0.25rem 0;
  cursor: grab;
  user-select: none;
}

.nav-links.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.nav-links::-webkit-scrollbar {
  display: none;
}

.nav-links a {
  font-weight: 500;
  white-space: nowrap;
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
  flex-shrink: 0;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links a:hover {
  color: var(--neon-blue);
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.3);
}

.nav-sub-btn {
  padding: 0.35rem 0.8rem !important;
  font-size: 0.8rem !important;
  border-radius: var(--radius-full) !important;
}

/* AI Search Bar */
.ai-search-container {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.ai-search-input {
  padding: 0.45rem 1rem 0.45rem 2.25rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  width: 200px;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: all 0.3s ease;
}

.ai-search-input:focus {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--neon-purple);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.3);
  width: 240px;
}

.ai-search-icon {
  position: absolute;
  left: 12px;
  color: #a1a1aa;
  width: 18px;
  height: 18px;
  transition: color 0.3s ease;
  pointer-events: none;
}

.ai-search-input:focus + .ai-search-icon {
  color: var(--neon-purple);
}

.ai-search-results {
  position: absolute;
  top: calc(100% + 15px);
  right: 0;
  width: 320px;
  background: rgba(18, 18, 26, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.5rem;
  z-index: 1000;
  box-shadow: 0 15px 50px rgba(0,0,0,0.8), 0 0 20px rgba(139, 92, 246, 0.1);
  animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 992px) {
  .nav-links-wrapper {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.85);
    display: none;
    padding: 1.25rem 1.5rem;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    z-index: 999;
  }

  .nav-links-wrapper.active {
    display: block !important;
    animation: slideDown 0.25s ease-out;
  }

  .nav-links {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.6rem;
    overflow-x: visible;
    padding: 0;
  }

  .nav-links a {
    text-align: center;
    width: 100%;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    flex-shrink: 0;
  }

  .ai-search-container {
    margin-right: 0;
  }
  
  .ai-search-input {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: transparent;
  }
  
  .ai-search-input::placeholder {
    color: transparent;
  }
  
  .ai-search-input:focus {
    width: 180px;
    height: 38px;
    padding: 0.5rem 1rem 0.5rem 2.25rem;
    border-radius: 9999px;
    background: rgba(18, 18, 26, 0.95);
    border-color: var(--neon-purple);
    color: white;
    cursor: text;
  }
  
  .ai-search-input:focus::placeholder {
    color: #a1a1aa;
  }
  
  .ai-search-icon {
    left: 10px;
    right: auto;
  }
  
  .ai-search-results {
    width: 280px;
    right: 0;
  }
}

.mobile-menu-btn {
  display: none;
}

/* Hero Section */
.hero {
  padding: 10rem 0 6rem;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 5.5rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.15;
  letter-spacing: -1.5px;
  animation: heroTitleGlow 6s infinite alternate ease-in-out;
}

@keyframes heroTitleGlow {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(139, 92, 246, 0.2)) drop-shadow(0 0 20px rgba(139, 92, 246, 0.1));
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(34, 211, 238, 0.45)) drop-shadow(0 0 45px rgba(34, 211, 238, 0.2));
  }
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Category Sections */
.section-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

/* Tool Cards */
.tool-card {
  position: relative;
  z-index: 1;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: border-color var(--transition-normal);
  cursor: pointer;
  text-align: left;
  height: 100%;
}

.tool-card:hover {
  border-color: var(--neon-purple);
}

/* Card Hover Background Effect */
.card-hover-highlight {
  position: absolute;
  background: rgba(139, 92, 246, 0.25);
  border-radius: calc(var(--radius-lg) + 8px);
  z-index: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.15);
}

.tool-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--neon-blue);
}

.tool-card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.tool-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex-grow: 1;
}

/* Tool Workspace (Hidden by default) */
.tool-workspace {
  display: none;
  padding: 6rem 0 4rem;
  min-height: calc(100vh - 200px);
}

.tool-workspace.active {
  display: block;
}

.workspace-header {
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--neon-blue);
}

/* File Dropzone */
.dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 4rem 2rem;
  text-align: center;
  transition: all var(--transition-normal);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--neon-purple);
  background: rgba(139, 92, 246, 0.05);
}

.dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  font-size: 3rem;
  color: var(--neon-blue);
  margin-bottom: 1rem;
}

/* Processing UI */
.processing-container {
  display: none;
  margin-top: 2rem;
  padding: 2rem;
  text-align: center;
}

.progress-bar-container {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-full);
  margin: 1.5rem 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

/* Form Controls */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: white;
  font-family: inherit;
  transition: border-color var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 0 2px var(--neon-blue-glow);
}

/* Footer */
footer {
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: 4rem;
  background: rgba(10, 10, 15, 0.8);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-col h4 {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a:hover {
  color: var(--neon-purple);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

/* ── Learning Hub Section ── */
.learning-hub-section {
  margin-top: 4rem;
  margin-bottom: 2rem;
}

.learning-hub-header {
  text-align: center;
  margin-bottom: 3rem;
}

.learning-hub-header .section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0.75rem auto 0;
  line-height: 1.6;
}

.learning-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.learning-card {
  position: relative;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  overflow: hidden;
}

.learning-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-purple), var(--neon-blue));
  opacity: 0;
  transition: opacity 0.35s ease;
}

.learning-card:hover {
  border-color: var(--neon-purple);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

.learning-card:hover::before {
  opacity: 1;
}

.learning-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}

.learning-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.learning-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  flex-grow: 1;
}

.learning-card-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-top: 1rem;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Responsive */
@media (max-width: 768px) {
  .learning-hub-grid {
    grid-template-columns: 1fr;
  }
  
  .hero h1 {
    font-size: 2.5rem;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
  }

  /* ── Global Mobile Overflow Fix ── */
  body, html {
    overflow-x: hidden;
  }

  .container, .glass-panel, .tool-workspace, #tool-custom-ui, #tool-interface, pre, code, textarea {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .tool-workspace > .glass-panel {
    padding: 0.75rem 0.4rem !important;
  }

  pre {
    white-space: pre-wrap;
    word-break: break-all;
  }

  /* Force inline grids to stack on mobile */
  [style*="grid-template-columns: 1fr 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  .md\:grid-cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Font Pairer preview heading shrink */
  #preview-h1 {
    font-size: 1.75rem !important;
  }
}

/* Comparison Slider */
.comparison-slider {
  position: relative;
  width: 100%;
  max-width: 650px;
  aspect-ratio: 16 / 9;
  margin: 0 auto 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
  border: 2px solid var(--border-color);
  background: #000;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.comparison-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 3px;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.comparison-handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  border: 4px solid var(--bg-dark);
}

.badge-before, .badge-after {
  position: absolute;
  top: 15px;
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  z-index: 5;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge-before {
  left: 15px;
  background: rgba(239, 68, 68, 0.85);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

.badge-after {
  right: 15px;
  background: rgba(34, 197, 94, 0.85);
  color: white;
  border: 1px solid rgba(255,255,255,0.2);
}

/* Animations */
.animate-spin {
  animation: spin 1s linear infinite;
}

/* Extra Utilities */
.w-full { width: 100%; }
.h-full { height: 100%; }
.max-w-2xl { max-width: 42rem; }
.max-w-4xl { max-width: 56rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-1 { flex: 1 1 0%; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
@media (min-width: 768px) {
  .md\:flex-row { flex-direction: row; }
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-10 { padding-left: 2.5rem; padding-right: 2.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2\.5 { padding-top: 0.625rem; padding-bottom: 0.625rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.pl-12 { padding-left: 3rem; }
.pr-4 { padding-right: 1rem; }

.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-1\/2 { top: 50%; }
.-translate-y-1\/2 { transform: translateY(-50%); }

.rounded-xl { border-radius: 1rem; }
.rounded-2xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

.bg-black\/20 { background-color: rgba(0, 0, 0, 0.2); }
.bg-black\/40 { background-color: rgba(0, 0, 0, 0.4); }
.bg-black\/60 { background-color: rgba(0, 0, 0, 0.6); }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.bg-red-600 { background-color: #dc2626; }

.border { border-width: 1px; border-style: solid; }
.border-white\/5 { border-color: rgba(255, 255, 255, 0.05); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.border-dashed { border-style: dashed; }

.opacity-0 { opacity: 0; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

.aspect-video { aspect-ratio: 16 / 9; }
.object-cover { object-fit: cover; }

.group:hover .group-hover\:opacity-100 { opacity: 1; }
.group:hover .group-hover\:scale-105 { transform: scale(1.05); }
.group:hover .group-hover\:scale-110 { transform: scale(1.1); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

/* ==========================================
   PREMIUM CUSTOM MOUSE CURSOR STYLES
   ========================================== */
@media (pointer: fine) {
  /* Only hide default cursor when JS successfully loads custom cursor */
  body.has-custom-cursor,
  body.has-custom-cursor *,
  body.has-custom-cursor a,
  body.has-custom-cursor button,
  body.has-custom-cursor input,
  body.has-custom-cursor textarea,
  body.has-custom-cursor select,
  body.has-custom-cursor .tool-card,
  body.has-custom-cursor .dropzone,
  body.has-custom-cursor .back-btn,
  body.has-custom-cursor .navbar .brand,
  body.has-custom-cursor #mv-player-modal,
  body.has-custom-cursor #mv-player-modal *,
  body.has-custom-cursor .mv-modal-box,
  body.has-custom-cursor .mv-modal-close,
  body.has-custom-cursor .mv-footer-btn,
  body.has-custom-cursor .mv-video-element,
  body.has-custom-cursor video {
    cursor: none !important;
  }
}

/* Core Pointer Dot */
.custom-cursor-core {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999999; /* Above everything including player modals */
  transform: translate3d(-50%, -50%, 0);
  will-change: transform, width, height, background-color, opacity;
  box-shadow: 0 0 10px var(--neon-blue), 0 0 5px rgba(255, 255, 255, 0.8);
  opacity: 0;
  transition: width 0.2s ease, 
              height 0.2s ease, 
              background-color 0.2s ease, 
              opacity 0.2s ease,
              box-shadow 0.2s ease;
}

/* Trailing Outer Ring */
.custom-cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  border: 1.5px solid var(--neon-blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999998; /* Above everything including player modals */
  transform: translate3d(-50%, -50%, 0);
  will-change: transform, width, height, border-color, background-color, opacity;
  box-shadow: 0 0 12px var(--neon-blue-glow);
  opacity: 0;
  transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1),
              height 0.3s cubic-bezier(0.19, 1, 0.22, 1),
              border-color 0.3s cubic-bezier(0.19, 1, 0.22, 1),
              background-color 0.3s cubic-bezier(0.19, 1, 0.22, 1),
              opacity 0.3s ease,
              box-shadow 0.3s ease;
}

/* Cosmic spinning accent for trailing outer ring */
.custom-cursor-ring::before {
  content: '';
  position: absolute;
  inset: -5px;
  border: 1px dashed rgba(139, 92, 246, 0.4);
  border-radius: 50%;
  pointer-events: none;
  animation: rotate-cursor-ring 12s linear infinite;
  transition: border-color 0.3s ease, inset 0.3s ease, opacity 0.3s ease;
}

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

/* --- Interactive States --- */

/* Hovering over clickable items */
body.custom-cursor-hovering .custom-cursor-ring {
  width: 52px;
  height: 52px;
  border-color: var(--neon-purple);
  background-color: rgba(139, 92, 246, 0.12);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  box-shadow: 0 0 20px var(--neon-purple-glow), inset 0 0 10px rgba(139, 92, 246, 0.2);
}

body.custom-cursor-hovering .custom-cursor-ring::before {
  inset: -8px;
  border-color: rgba(34, 211, 238, 0.8);
  border-style: solid;
  border-width: 1px;
  border-top-color: transparent;
  border-bottom-color: transparent;
  animation-duration: 4s;
}

body.custom-cursor-hovering .custom-cursor-core {
  width: 8px;
  height: 8px;
  background-color: var(--neon-purple);
  box-shadow: 0 0 12px var(--neon-purple-glow), 0 0 6px rgba(255, 255, 255, 0.6);
}

/* Hovering over text selection areas */
body.custom-cursor-text-mode .custom-cursor-ring {
  width: 4px;
  height: 22px;
  border-radius: 2px;
  border: none;
  background-color: var(--neon-blue);
  box-shadow: 0 0 8px var(--neon-blue-glow);
}

body.custom-cursor-text-mode .custom-cursor-ring::before {
  opacity: 0;
}

body.custom-cursor-text-mode .custom-cursor-core {
  opacity: 0;
}

/* Clicking feedback */
body.custom-cursor-clicking .custom-cursor-ring {
  transform: translate3d(-50%, -50%, 0) scale(0.8) !important;
  border-color: #ffffff;
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
}

/* Dynamic Click Ripple */
.cursor-ripple {
  position: fixed;
  top: 0;
  left: 0;
  border: 1.5px solid var(--neon-blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999997; /* Above modals, below cursor */
  transform: translate3d(-50%, -50%, 0);
  animation: ripple-out-glow 0.65s cubic-bezier(0.1, 0.8, 0.3, 1) forwards;
  will-change: width, height, opacity;
}

@keyframes ripple-out-glow {
  0% {
    width: 0;
    height: 0;
    opacity: 1;
    border-color: var(--neon-blue);
    box-shadow: 0 0 10px var(--neon-blue-glow), inset 0 0 5px var(--neon-blue-glow);
  }
  50% {
    border-color: var(--neon-purple);
    box-shadow: 0 0 20px var(--neon-purple-glow), inset 0 0 10px var(--neon-purple-glow);
  }
  100% {
    width: 90px;
    height: 90px;
    opacity: 0;
    border-color: transparent;
  }
}

/* Subscribe Gateway */
.subscribe-gateway {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.subscribe-gateway.active {
  opacity: 1;
  pointer-events: all;
}

.sg-modal {
  max-width: 90%;
  width: 480px;
  padding: 3rem 2rem;
  text-align: center;
  transform: translateY(20px) scale(0.95);
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 50px rgba(139, 92, 246, 0.15);
}

.subscribe-gateway.active .sg-modal {
  transform: translateY(0) scale(1);
}

.sg-icon-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(139, 92, 246, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

.sg-lock-icon {
  width: 40px;
  height: 40px;
  color: var(--neon-purple);
  transition: all 0.5s ease;
}

.sg-icon-container.unlocked {
  background: rgba(16, 185, 129, 0.1);
  box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
}
.sg-icon-container.unlocked .sg-lock-icon {
  color: #10b981;
}

.sg-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.sg-desc {
  margin-bottom: 2rem;
  font-size: 1rem;
}

.sg-buttons {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sg-btn {
  width: 100%;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: white !important;
  transition: all 0.3s ease;
}

.sg-btn:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

.sg-btn.subscribed {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: #10b981 !important;
  color: #10b981 !important;
}

/* Ensure global before/after pseudo elements don't override the dark simple look of sg-btn */
.sg-btn::before, .sg-btn::after {
  display: none !important;
}

@keyframes slideInRight {
    from { transform: translateX(20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ==========================================
   SUNOKARTEL World Radio Sphere Styles
   ========================================== */

/* Remove glass-panel padding when world-radio occupies the tool interface */
.glass-panel:has(.world-radio-container) {
  padding: 0 !important;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.world-radio-container {
  position: relative;
  width: 100%;
  height: 75vh;
  min-height: 600px;
  max-height: calc(100vh - 80px);
  overflow: hidden;
  background: #050505;
  border-radius: var(--radius-lg);
  display: flex;
  font-family: 'Inter', sans-serif;
}

.globe-container {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 1;
  touch-action: none; /* Let Leaflet handle all touch gestures */
}

/* Ensure Leaflet vector layer paths have pointer events while overlay container stays transparent */
.leaflet-overlay-pane path.leaflet-interactive {
  pointer-events: auto;
  cursor: pointer;
}

/* Leaflet specific overrides */
.leaflet-container {
  background: #0a0a0f !important;
  font-family: 'Inter', sans-serif;
  touch-action: none; /* Prevent browser from consuming touch events */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on iOS */
}

.leaflet-control-attribution {
  display: none !important; /* Hide attribution for cleaner UI */
}

.leaflet-bar a {
  background-color: rgba(18, 18, 26, 0.8) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  backdrop-filter: blur(10px);
}

.leaflet-bar a:hover {
  background-color: rgba(139, 92, 246, 0.4) !important;
}

.wr-loading {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 5, 0.9);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 0.5s ease;
}

.wr-loading-spinner {
  width: 50px; height: 50px;
  border: 3px solid rgba(139, 92, 246, 0.3);
  border-top-color: var(--neon-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.wr-panel {
  position: relative;
  z-index: 10;
  background: rgba(18, 18, 26, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.wr-left-panel {
  width: 320px;
  height: calc(100% - 40px);
  margin: 20px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.wr-panel-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.wr-panel-header h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  color: var(--neon-blue);
  margin-bottom: 0.25rem;
}

.wr-search-box {
  position: relative;
  margin: 1rem;
}

.wr-search-box input {
  width: 100%;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: var(--radius-md);
  color: white;
  outline: none;
  transition: all 0.3s ease;
}

.wr-search-box input:focus {
  border-color: var(--neon-purple);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.wr-search-box i {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: #a1a1aa;
  width: 16px; height: 16px;
}

.wr-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.wr-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s ease;
}

.wr-tab.active {
  color: white;
  border-bottom: 2px solid var(--neon-blue);
}

.wr-list-container {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.wr-list-container::-webkit-scrollbar, .wr-stations-list::-webkit-scrollbar {
  width: 6px;
}
.wr-list-container::-webkit-scrollbar-thumb, .wr-stations-list::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
}

.wr-list-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.wr-list-item:hover {
  background: rgba(255,255,255,0.05);
}

.wr-item-icon {
  width: 32px; height: 32px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
}

.wr-item-info {
  flex: 1;
  overflow: hidden;
}

.wr-item-info h4 {
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.1rem;
}

.wr-player-panel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 400px;
  background: rgba(18, 18, 26, 0.8);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0,0,0,0.8), 0 0 20px rgba(139, 92, 246, 0.1);
  z-index: 10;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wr-player-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.wr-station-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.wr-station-info img {
  width: 60px; height: 60px;
  border-radius: var(--radius-md);
  object-fit: cover;
  background: #000;
  border: 1px solid rgba(255,255,255,0.1);
}

.wr-station-meta {
  flex: 1;
  overflow: hidden;
}

.wr-station-meta h3 {
  font-size: 1.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.wr-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.wr-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

.wr-badge.hl {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

.wr-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.wr-control-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wr-control-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.1);
}

.wr-control-btn.primary {
  width: 54px; height: 54px;
  background: var(--neon-purple);
  border: none;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.wr-control-btn.primary:hover:not(:disabled) {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.wr-control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.wr-volume-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.wr-volume-control i {
  width: 16px; height: 16px;
  color: var(--text-muted);
  cursor: pointer;
}

.wr-volume-control input {
  flex: 1;
  height: 4px;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
}
.wr-volume-control input::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--neon-blue);
  cursor: pointer;
}

.wr-visualizer {
  width: 100%;
  height: 40px;
  background: rgba(0,0,0,0.2);
}

.wr-stations-modal {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%; max-width: 500px;
  max-height: 80%;
  background: rgba(18, 18, 26, 0.95);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px rgba(0,0,0,0.8);
  z-index: 20;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.wr-stations-modal.active {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.wr-modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wr-modal-header h3 {
  font-size: 1.25rem;
}

.wr-modal-header button {
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.wr-modal-header button:hover { color: white; }

.wr-stations-list {
  padding: 1rem;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.wr-station-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  background: rgba(0,0,0,0.3);
  border-radius: var(--radius-md);
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.wr-station-item:hover {
  background: rgba(255,255,255,0.05);
  border-color: rgba(139, 92, 246, 0.3);
}

.wr-station-item img {
  width: 40px; height: 40px;
  border-radius: 8px;
  background: #000;
}

.wr-play-small {
  background: rgba(139, 92, 246, 0.1);
  color: var(--neon-purple);
  border: none;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

.wr-station-item.active-playing {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--neon-purple);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.25);
}

.wr-station-item.active-playing .wr-play-small {
  background: var(--neon-purple);
  color: white;
}

@media (max-width: 768px) {
  .world-radio-container {
    flex-direction: column;
    height: calc(100dvh - 80px);
  }
  
  .wr-left-panel {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    height: 60vh;
    margin: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 50;
  }
  
  .wr-left-panel.active {
    transform: translateY(0);
  }
  
  .wr-player-panel {
    top: 20px; bottom: auto;
    left: 10px; right: 10px;
    width: auto;
    z-index: 40;
  }
  
  .globe-container {
    height: 100%;
  }
  
  .wr-stations-modal {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    max-height: 100%;
    max-width: 100%;
    border-radius: 0;
    z-index: 99; /* Ensure modal is completely on top of map and player panel */
    display: flex;
    flex-direction: column;
    background: rgba(10, 10, 18, 0.98);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
  }

  .wr-stations-modal.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .wr-modal-header {
    padding: 1rem 1.25rem;
    background: rgba(18, 18, 28, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
  }

  .wr-modal-header h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
  }

  .wr-modal-header button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .wr-stations-list {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 1rem;
    padding-bottom: 5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
  }
}

/* Mobile Toggle Buttons */
.wr-mobile-toggle {
  display: none;
  position: absolute;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  background: var(--neon-purple);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 10px 20px rgba(139, 92, 246, 0.4);
  align-items: center; gap: 0.5rem;
  cursor: pointer;
}

@media (max-width: 768px) {
  .wr-mobile-toggle {
    display: flex;
  }
  .wr-player-panel {
    top: 20px; bottom: auto;
    left: 10px; right: 10px;
  }
}

.wr-close-panel-btn {
  display: none;
  background: none; border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
}

.wr-close-panel-btn:hover { color: white; }

@media (max-width: 768px) {
  .wr-close-panel-btn {
    display: block;
  }
}

