/* ===================================
   OCTAVIA - LIQUID GLASS DESIGN SYSTEM
   Inspired by Modern Glassmorphism
   =================================== */

/* === ROOT VARIABLES === */
:root {
  /* Colors - LION Purple Palette (matches landing page) */
  --primary-purple: #a352cc;
  --primary-purple-bright: #c4b5fd;
  --primary-purple-dark: #7c3aed;
  --accent-cyan: #06B6D4;
  --accent-pink: #EC4899;

  /* Backgrounds - Ultimate Dark for Elegance */
  --bg-dark: #080012;
  --bg-darker: #050008;
  --bg-glass: #0a0014;
  --bg-surface: #0a0010;

  /* Glass Opacities - LION Style */
  --glass-low: rgba(5, 0, 8, 0.4);
  --glass-medium: rgba(5, 0, 8, 0.6);
  --glass-high: rgba(5, 0, 8, 0.8);

  /* Borders - LION Subtle White */
  --border-glass: rgba(255, 255, 255, 0.05);
  --border-glass-hover: rgba(255, 255, 255, 0.1);

  /* Shadows - LION Purple Glow */
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(163, 82, 204, 0.1);
  --shadow-glass-hover: 0 12px 48px rgba(0, 0, 0, 0.6), 0 0 40px rgba(163, 82, 204, 0.2);
  --shadow-glow: 0 0 60px rgba(163, 82, 204, 0.4), 0 0 100px rgba(163, 82, 204, 0.2);
  --shadow-glow-strong: 0 0 80px rgba(163, 82, 204, 0.6), 0 0 120px rgba(163, 82, 204, 0.3);
}

/* === GLOBAL TYPOGRAPHY === */
body {
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, .font-display {
  letter-spacing: -0.02em;
}

.text-glow-purple {
  text-shadow: 0 0 40px rgba(163, 82, 204, 0.3), 0 0 80px rgba(124, 58, 237, 0.15);
}

/* === LION AMBIENT ORBS === */
@keyframes lionOrb1 { 
  0%, 100% { transform: translate(-25%, -15%) scale(1); } 
  50% { transform: translate(25%, 15%) scale(1.15); } 
}

@keyframes lionOrb2 { 
  0%, 100% { transform: translate(20%, 20%) scale(1.1); } 
  50% { transform: translate(-20%, -20%) scale(0.9); } 
}

.lion-orb-1 { 
  position: absolute; 
  width: 500px; 
  height: 500px; 
  border-radius: 50%; 
  background: radial-gradient(circle, rgba(163, 82, 204, 0.15), transparent 65%); 
  top: -15%; 
  left: -8%; 
  animation: lionOrb1 12s ease-in-out infinite; 
  z-index: -1;
}

.lion-orb-2 { 
  position: absolute; 
  width: 400px; 
  height: 400px; 
  border-radius: 50%; 
  background: radial-gradient(circle, rgba(124, 58, 237, 0.12), transparent 65%); 
  bottom: -8%; 
  right: -5%; 
  animation: lionOrb2 15s ease-in-out infinite; 
  z-index: -1;
}

/* === GLASS PANEL UTILITIES === */
.glass-panel {
  background: var(--glass-medium);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: 1rem;
  box-shadow: var(--shadow-glass);
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-panel-low {
  background: var(--glass-low);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.glass-panel-high {
  background: var(--glass-high);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
}

.glass-panel:hover {
  background: rgba(15, 18, 24, 0.7);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-glass-hover);
}

/* Glass Shine Effect Overlay */
.glass-shine::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg,
      rgba(255, 255, 255, 0.1) 0%,
      transparent 50%,
      rgba(255, 255, 255, 0.05) 100%);
  pointer-events: none;
  opacity: 0.5;
}

/* === ANIMATED BORDER BEAM BUTTON === */
.btn-border-beam {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  border-radius: 9999px;
  padding: 2px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-border-beam:active {
  transform: scale(0.98);
}

/* Spinning Gradient Beam */
.btn-border-beam::before {
  content: '';
  position: absolute;
  inset: -1000%;
  background: conic-gradient(from 90deg at 50% 50%,
      transparent 0%,
      var(--primary-purple) 50%,
      transparent 100%);
  animation: spin-slow 4s linear infinite;
}

/* Ambient Glow Behind Beam */
.btn-border-beam::after {
  content: '';
  position: absolute;
  inset: -100%;
  background: conic-gradient(from 90deg at 50% 50%,
      transparent 0%,
      var(--primary-purple) 50%,
      transparent 100%);
  filter: blur(48px);
  opacity: 0.4;
  animation: spin-slow 4s linear infinite;
}

/* Button Inner Face */
.btn-border-beam-inner {
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  height: 100%;
  width: 100%;
  border-radius: 9999px;
  background: var(--bg-surface);
  padding: 0.75rem 2rem;
  font-weight: 600;
  color: white;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.btn-border-beam-inner:hover {
  background: #1c2230;
}

/* Inner Highlight */
.btn-border-beam-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Cyan Variant */
.btn-border-beam-cyan::before,
.btn-border-beam-cyan::after {
  background: conic-gradient(from 90deg at 50% 50%,
      transparent 0%,
      var(--accent-cyan) 50%,
      transparent 100%);
}

/* === GLOW EFFECTS === */
.glow-purple {
  position: absolute;
  pointer-events: none;
  opacity: 0.35;
  filter: blur(100px);
  border-radius: 9999px;
  background: radial-gradient(circle, var(--primary-purple) 0%, var(--primary-purple-bright) 50%, transparent 100%);
  animation: pulse-glow 4s ease-in-out infinite;
}

.glow-purple-strong {
  opacity: 0.5;
  filter: blur(120px);
  animation: pulse-glow-strong 3s ease-in-out infinite;
}

.glow-cyan {
  background: radial-gradient(circle, var(--accent-cyan) 0%, #22D3EE 50%, transparent 100%);
  opacity: 0.3;
  filter: blur(100px);
  animation: pulse-glow 4s ease-in-out infinite 1s;
}

.glow-pink {
  background: radial-gradient(circle, var(--accent-pink) 0%, #F472B6 50%, transparent 100%);
  opacity: 0.3;
  filter: blur(100px);
  animation: pulse-glow 4s ease-in-out infinite 2s;
}

/* === ANIMATIONS === */
@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(1.05);
  }
}

@keyframes pulse-glow-strong {

  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }

  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fade-in-up 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  opacity: 0;
  /* Start hidden */
}

.delay-100 {
  animation-delay: 100ms;
}

.delay-200 {
  animation-delay: 200ms;
}

.delay-300 {
  animation-delay: 300ms;
}

/* === CUSTOM SCROLLBAR === */
.custom-scrollbar::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.3);
  border-radius: 4px;
  transition: background 0.2s ease;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.5);
}

/* === GLASS INPUTS === */
.glass-input,
.glass-select {
  background: var(--glass-medium) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-glass) !important;
  border-radius: 0.75rem;
  color: white !important;
  padding: 0.75rem 1rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-input:focus,
.glass-select:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.glass-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* === GLASS BUTTON VARIANTS === */
.btn-glass-secondary {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgb(203, 213, 225);
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-glass-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: white;
}

.btn-glass-outline {
  background: transparent;
  border: 1px solid rgb(51, 65, 85);
  color: rgb(203, 213, 225);
  padding: 0.625rem 1.5rem;
  border-radius: 9999px;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-glass-outline:hover {
  border-color: var(--primary-purple);
  color: var(--primary-purple);
}

/* === PROGRESS BAR === */
.progress-glass {
  height: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9999px;
  overflow: hidden;
  position: relative;
}

.progress-glass-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-purple), var(--accent-cyan));
  border-radius: 9999px;
  transition: width 0.5s ease;
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.5);
}

/* === UTILITY CLASSES === */
.interactive {
  cursor: pointer;
  user-select: none;
}

.interactive:active {
  transform: scale(0.98);
}

.text-gradient-purple {
  background: linear-gradient(135deg, var(--primary-purple), var(--accent-cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === HOVER LIFT EFFECT === */
.hover-lift {
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-elegant {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-elegant:hover {
  transform: scale(1.005);
  /* Very subtle scale for elegance */
  background: rgba(255, 255, 255, 0.03);
  /* Smoother background change */
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-glass-hover);
}

/* === GLASS CARD === */
.glass-card {
  background: var(--glass-medium);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: 1rem;
  padding: 1.5rem;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.glass-card:hover {
  border-color: var(--border-glass-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glass-hover);
}

/* === PREMIUM BACKGROUND EFFECTS === */
.premium-bg {
  background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(147, 51, 234, 0.15), transparent),
    radial-gradient(ellipse 60% 50% at 50% 120%, rgba(147, 51, 234, 0.1), transparent),
    var(--bg-dark);
}

/* === ENHANCED GLASS WITH INNER GLOW === */
.glass-panel-glow {
  background: var(--glass-medium);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-glass);
  border-radius: 1rem;
  position: relative;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-glass), inset 0 1px 1px rgba(255, 255, 255, 0.05);
  /* Constrain card heights */
  max-height: 280px;
}

.glass-panel-glow:hover {
  background: rgba(13, 2, 33, 0.6);
  border-color: var(--border-glass-hover);
  box-shadow: var(--shadow-glass-hover), inset 0 1px 1px rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  /* Added subtle lift */
}

/* === TEXT GLOW === */
.text-glow-purple {
  text-shadow: 0 0 20px rgba(147, 51, 234, 0.5), 0 0 40px rgba(147, 51, 234, 0.3);
}

/* === BORDER GLOW === */
.border-glow {
  border: 1px solid rgba(147, 51, 234, 0.3);
  box-shadow: 0 0 20px rgba(147, 51, 234, 0.2), inset 0 0 20px rgba(147, 51, 234, 0.1);
}

/* === POWERFUL GLOW BUTTON === */
.btn-glow-purple {
  background: linear-gradient(135deg, #a855f7, #7e22ce);
  color: white;
  font-weight: 700;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow:
    0 0 30px rgba(168, 85, 247, 0.6),
    0 0 60px rgba(168, 85, 247, 0.4),
    inset 0 0 20px rgba(255, 255, 255, 0.2);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.btn-glow-purple::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #c084fc, #9333ea);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: -1;
}

.btn-glow-purple:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 0 50px rgba(168, 85, 247, 0.8),
    0 0 100px rgba(168, 85, 247, 0.5),
    inset 0 0 30px rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.6);
}

.btn-glow-purple:hover::before {
  opacity: 1;
}

.btn-glow-purple:active {
  transform: translateY(0) scale(0.98);
}

.btn-glow-purple:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
  background: #333;
}

/* Hide default select arrow */
select.appearance-none {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* === DEDICATED TRANSLATE HANDBOOK BUTTON === */
.btn-translate-handbook {
  position: relative;
  display: inline-flex;
  overflow: hidden;
  border-radius: 9999px;
  padding: 2px;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  appearance: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
}

.btn-translate-handbook:active {
  transform: scale(0.98);
}

.btn-translate-handbook:hover {
  transform: scale(1.05);
}

.btn-translate-handbook:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Spinning Gradient Beam */
.btn-translate-handbook::before {
  content: '';
  position: absolute;
  inset: -1000%;
  background: conic-gradient(from 90deg at 50% 50%,
      transparent 0%,
      var(--primary-purple) 50%,
      transparent 100%);
  animation: spin-slow 4s linear infinite;
}

/* Ambient Glow Behind Beam */
.btn-translate-handbook::after {
  content: '';
  position: absolute;
  inset: -100%;
  background: conic-gradient(from 90deg at 50% 50%,
      transparent 0%,
      var(--primary-purple) 50%,
      transparent 100%);
  filter: blur(48px);
  opacity: 0.4;
  animation: spin-slow 4s linear infinite;
}

/* Button Inner Face */
.btn-translate-handbook-inner {
  position: relative;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  height: 100%;
  width: 100%;
  border-radius: 9999px;
  background: var(--bg-surface);
  padding: 0.75rem 2rem;
  font-weight: 600;
  color: white;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-translate-handbook-inner:hover {
  background: #1c2230;
}

/* Inner Highlight */
.btn-translate-handbook-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}