:root {
  --bg: #000000;
  --text: #dffbff;
  --muted: #9ddfec;
  --neon: #18fff3;
  --accent: #1e9bff;
  --card: #0d232b;
}

* {
  box-sizing: border-box;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-perspective: 1000;
  perspective: 1000;
}

html,
body {
  min-height: 100%;
  height: auto
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-display: swap;
}

body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: #000000;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  will-change: auto;
  transform: translateZ(0);
}

/* Animated background - Liquid Glass Bubbles Effect */
.bg-animated {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
  background: #000000
}

/* Liquid Glass Bubbles - INTENSIVE GLOWING Effect */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(85px) brightness(1.2);
  will-change: opacity, transform;
  animation: liquidBubble 8s ease-in-out infinite;
  box-shadow: 0 0 80px rgba(24, 255, 243, 0.3), 0 0 120px rgba(24, 255, 243, 0.2);
}

.blob.one {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle at center, rgba(24, 255, 243, 0.35), rgba(24, 255, 243, 0.15) 40%, rgba(24, 255, 243, 0.05) 60%, transparent 80%);
  right: 5%;
  top: 8%;
  animation-delay: 0s;
}

.blob.two {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle at center, rgba(30, 155, 255, 0.32), rgba(30, 155, 255, 0.14) 40%, rgba(30, 155, 255, 0.05) 60%, transparent 80%);
  left: 8%;
  bottom: 15%;
  animation-delay: -2.5s;
}

.blob.three {
  width: 480px;
  height: 480px;
  background: radial-gradient(circle at center, rgba(24, 255, 243, 0.28), rgba(24, 255, 243, 0.12) 40%, rgba(24, 255, 243, 0.04) 60%, transparent 80%);
  right: 40%;
  top: 50%;
  transform: translateY(-50%);
  animation-delay: -5s;
}

.blob.four {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at center, rgba(30, 155, 255, 0.3), rgba(30, 155, 255, 0.13) 40%, rgba(30, 155, 255, 0.04) 60%, transparent 80%);
  left: 60%;
  bottom: 25%;
  animation-delay: -1.5s;
}

.blob.five {
  width: 450px;
  height: 450px;
  background: radial-gradient(circle at center, rgba(24, 255, 243, 0.25), rgba(24, 255, 243, 0.1) 40%, rgba(24, 255, 243, 0.03) 60%, transparent 80%);
  left: 30%;
  top: 20%;
  animation-delay: -4s;
}

/* INTENSIVE Liquid Glass Bubble Animation - Dynamic Fade & Movement */
@keyframes liquidBubble {

  0%,
  100% {
    opacity: 0;
    transform: translate(0, 0) scale(0.85);
    filter: blur(85px) brightness(1);
  }

  20% {
    opacity: 0.9;
    transform: translate(-15px, 12px) scale(1.05);
    filter: blur(80px) brightness(1.3);
  }

  40% {
    opacity: 1;
    transform: translate(8px, -8px) scale(1.15);
    filter: blur(85px) brightness(1.4);
  }

  60% {
    opacity: 0.85;
    transform: translate(-10px, 10px) scale(1.08);
    filter: blur(90px) brightness(1.25);
  }

  80% {
    opacity: 1;
    transform: translate(12px, -6px) scale(0.95);
    filter: blur(85px) brightness(1.35);
  }
}

/* Mobile optimizations for background */
@media (max-width: 720px) {
  .blob.one {
    width: 400px;
    height: 400px;
    right: 0%;
    top: 0%
  }

  .blob.two {
    width: 350px;
    height: 350px;
    left: 0%;
    bottom: 5%
  }

  .blob.three {
    width: 300px;
    height: 300px;
    left: 50%;
    top: 30%
  }

  .blob.four {
    width: 380px;
    height: 380px;
    right: 20%;
    bottom: 15%
  }

  .blob.five {
    width: 280px;
    height: 280px;
    left: 20%;
    top: 10%
  }

  .blob {
    filter: blur(60px)
  }
}

/* Particles container - Cover entire page */
.particles {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
  pointer-events: none;
}

/* Individual particle styles - GLOWING & FAST */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(24, 255, 243, 0.9);
  border-radius: 50%;
  box-shadow: 0 0 20px rgba(24, 255, 243, 1),
    0 0 40px rgba(24, 255, 243, 0.7),
    0 0 60px rgba(24, 255, 243, 0.5),
    0 0 80px rgba(24, 255, 243, 0.3);
  animation: particleFloat linear infinite;
  opacity: 0;
}

/* Create variety in particle sizes and colors */
.particle.small {
  width: 2.5px;
  height: 2.5px;
  background: rgba(24, 255, 243, 0.8);
  box-shadow: 0 0 15px rgba(24, 255, 243, 1),
    0 0 30px rgba(24, 255, 243, 0.6),
    0 0 45px rgba(24, 255, 243, 0.4);
}

.particle.medium {
  width: 3.5px;
  height: 3.5px;
  background: rgba(30, 155, 255, 0.85);
  box-shadow: 0 0 18px rgba(30, 155, 255, 1),
    0 0 36px rgba(30, 155, 255, 0.7),
    0 0 54px rgba(30, 155, 255, 0.5);
}

.particle.large {
  width: 5px;
  height: 5px;
  background: rgba(24, 255, 243, 1);
  box-shadow: 0 0 25px rgba(24, 255, 243, 1),
    0 0 50px rgba(24, 255, 243, 0.8),
    0 0 75px rgba(24, 255, 243, 0.6),
    0 0 100px rgba(24, 255, 243, 0.4);
}

/* FAST & INTENSIVE Particle Float Animation - Dynamic drift and glow */
@keyframes particleFloat {
  0% {
    opacity: 0;
    transform: translate(0, 0) scale(0.3);
    filter: brightness(0.8);
  }

  15% {
    opacity: 1;
    filter: brightness(1.5);
  }

  35% {
    opacity: 0.95;
    transform: translate(calc(var(--driftX, 0px) * 0.7), calc(var(--driftY, 0px) * 0.7)) scale(1.2);
    filter: brightness(1.8);
  }

  50% {
    opacity: 0.9;
    transform: translate(var(--driftX, 0px), var(--driftY, 0px)) scale(1);
    filter: brightness(1.4);
  }

  70% {
    opacity: 1;
    transform: translate(calc(var(--driftX, 0px) * 1.5), calc(var(--driftY, 0px) * 1.5)) scale(1.15);
    filter: brightness(1.6);
  }

  85% {
    opacity: 0.85;
    filter: brightness(1.3);
  }

  100% {
    opacity: 0;
    transform: translate(calc(var(--driftX, 0px) * 2.5), calc(var(--driftY, 0px) * 2.5)) scale(0.4);
    filter: brightness(1);
  }
}

input[type="text"],
textarea {
  transition: all 0.3s ease;
  position: relative;
}

input[type="text"]:focus,
textarea:focus {
  transform: scale(1.02);
  box-shadow: 0 0 0 3px rgba(24, 255, 243, 0.2), 0 8px 32px rgba(24, 255, 243, 0.1);
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid rgba(24, 255, 243, 0.3);
  background: var(--card);
  color: var(--text);
  font-size: 1rem;
}

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

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

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(24, 255, 243, .8), rgba(24, 255, 243, .4));
  border-radius: 4px;
  transition: background .3s ease
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(24, 255, 243, 1), rgba(24, 255, 243, .6))
}

::-webkit-scrollbar-thumb:active {
  background: var(--neon)
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--neon) rgba(6, 16, 22, .5)
}

/* Enhanced focus states */
*:focus {
  outline: 2px solid rgba(24, 255, 243, .6);
  outline-offset: 2px
}

/* Enhanced loading states */
.loading {
  position: relative;
  overflow: hidden
}

.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(24, 255, 243, .3), transparent);
  animation: loading-shimmer 1.5s infinite
}

@keyframes loading-shimmer {
  0% {
    left: -100%
  }

  100% {
    left: 100%
  }
}

/* Enhanced progress bars */
.progress-bar {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, .1);
  border-radius: 10px
}

.progress-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .2), transparent);
  animation: loading-shimmer 2s infinite
}

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

.section {
  padding: 80px 0
}

/* Professional Card Animations - Smooth & Lightweight */
.card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, .4),
    0 0 24px rgba(24, 255, 243, .15);
  border-color: rgba(24, 255, 243, .5);
}

.card:active {
  transform: translateY(-2px) scale(0.99);
  transition: all 0.1s ease;
}

.button {
  --glow: rgba(24, 255, 243, .55);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 14px 28px;
  border-radius: 12px;
  border: 2px solid rgba(24, 255, 243, .3);
  background: linear-gradient(135deg, rgba(13, 35, 43, .8), rgba(11, 26, 33, .9));
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.5;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

/* Button Ripple Effect */
.button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, .3);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width .6s, height .6s;
  pointer-events: none;
}

.button:hover {
  transform: translateY(-2px);
  border-color: rgba(24, 255, 243, .5);
  box-shadow:
    0 6px 20px rgba(24, 255, 243, .25),
    0 0 16px rgba(24, 255, 243, .15);
  background: linear-gradient(135deg, rgba(24, 255, 243, .15), rgba(30, 155, 255, .12));
}

.button:hover::before {
  width: 300px;
  height: 300px;
}

.button:active {
  transform: translateY(0) scale(0.98);
  transition: all 0.1s ease;
}

.button.primary {
  background: linear-gradient(135deg, rgba(24, 255, 243, .2), rgba(30, 155, 255, .15));
  border-color: rgba(24, 255, 243, .5);
  box-shadow: 0 4px 16px rgba(24, 255, 243, .3);
}

.button.primary:hover {
  background: linear-gradient(135deg, rgba(24, 255, 243, .3), rgba(30, 155, 255, .2));
  border-color: rgba(24, 255, 243, .7);
  box-shadow:
    0 8px 24px rgba(24, 255, 243, .4),
    0 0 20px rgba(24, 255, 243, .2);
  transform: translateY(-2px);
}

.button.ghost {
  background: transparent;
  border-color: rgba(24, 255, 243, .25);
}

.button.ghost:hover {
  background: rgba(24, 255, 243, .08);
  border-color: rgba(24, 255, 243, .4);
}

/* Loading state for primary button */
.button.primary.is-loading {
  pointer-events: none
}

.button.primary.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: var(--neon);
  animation: spin .8s linear infinite
}

/* Removed continuous glow animation for better performance */
.glow {
  box-shadow: 0 0 16px rgba(24, 255, 243, .3);
}

.glow:hover {
  box-shadow: 0 0 24px rgba(24, 255, 243, .5);
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--text);
}

h1 {
  font-size: clamp(32px, 5vw, 48px)
}

h2 {
  font-size: clamp(24px, 4vw, 36px);
  margin-bottom: 24px
}

h3 {
  font-size: clamp(20px, 3.5vw, 28px);
  color: var(--neon);
  margin-bottom: 16px
}

p {
  line-height: 1.8;
  margin: 0 0 18px
}

/* Special headline font utility */
.ruqaa {
  filter: invert(1);

  font-family: "Aref Ruqaa Ink", serif;
  font-weight: 700
}

.ruqaa-blue {

  color: var(--accent)
}

.neon-title.ruqaa-blue {
  color: var(--accent) !important
}

.ruqaa.glow-strong,
.ruqaa-blue.glow-strong {
  animation: glowPulse 2.2s ease-in-out infinite;
  text-shadow: 0 0 14px rgba(30, 155, 255, .6), 0 0 34px rgba(30, 155, 255, .35)
}

.ruqaa-invert {
  filter: invert(1)
}

.nav-glow {
  animation: glowPulse 2.2s ease-in-out infinite;
  text-shadow: 0 0 14px rgba(30, 155, 255, .6), 0 0 34px rgba(30, 155, 255, .35)
}

/* Big CTA button variant - Professional & Lightweight */
.button.cta-big {
  padding: 1.1rem 1.6rem;
  font-size: 1.15rem;
  border-radius: 14px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Accessibility - Reduce motion preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .glow,
  .blob,
  .bg-animated::before,
  .parse-output .token {
    animation: none;
  }
}

/* ============================================
   NAVBAR STYLES - CLEAN VERSION
   ============================================ */

/* Header Container */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(3, 15, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(24, 255, 243, 0.2);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
}

.site-header.scrolled {
  background: rgba(3, 15, 20, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5), 0 0 20px rgba(24, 255, 243, 0.15);
}

/* Header Inner Container */
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 80px;
  padding: 0 24px;
  transition: height 0.3s ease;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.site-header.scrolled .header-inner {
  height: 70px;
}

/* Navigation Area */
.nav-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  order: 1;
}

/* Brand Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  z-index: 1001;
  order: 2;
}

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

.brand .logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 0 16px rgba(24, 255, 243, 0.7));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand:hover .logo {
  filter: drop-shadow(0 0 24px rgba(24, 255, 243, 1)) drop-shadow(0 0 40px rgba(30, 155, 255, 0.6));
  transform: rotate(-5deg) scale(1.05);
}

.site-header.scrolled .brand .logo {
  width: 56px;
  height: 56px;
}

/* Desktop Navigation */
.site-nav {
  display: flex;
  z-index: 1001;
}

.site-nav ul {
  display: flex;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  background: transparent;
  overflow: hidden;
}

.site-nav a::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(24, 255, 243, 0.2), transparent);
  transition: left 0.5s ease;
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.site-nav a.active {
  background: rgba(24, 255, 243, 0.08);
  border-color: rgba(24, 255, 243, 0.3);
  color: var(--neon);
}

.site-nav a.active::after {
  width: 60%;
}

.site-nav a:hover {
  background: rgba(24, 255, 243, 0.12);
  border-color: rgba(24, 255, 243, 0.4);
  color: var(--neon);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(24, 255, 243, 0.2);
}

.site-nav a:hover::before {
  left: 100%;
}

.site-nav a:hover::after {
  width: 70%;
}

.site-nav a .ruqaa {
  font-size: 15px;
  font-weight: 600;
}

/* Tablet responsive - prevent nav items wrapping to two lines */
@media (max-width: 1400px) {
  body .site-nav ul {
    gap: 8px;
  }

  body .site-nav a {
    padding: 8px 12px;
    font-size: 14px;
  }

  body .site-nav a .ruqaa {
    font-size: 14px;
  }
}

@media (max-width: 1200px) {
  body .site-nav ul {
    gap: 6px;
  }

  body .site-nav a {
    padding: 8px 10px;
    font-size: 13px;
  }

  body .site-nav a .ruqaa {
    font-size: 13px;
  }
}

@media (max-width: 1024px) {
  body .site-nav ul {
    gap: 4px;
  }

  body .site-nav a {
    padding: 7px 8px;
    font-size: 12px;
  }

  body .site-nav a .ruqaa {
    font-size: 12px;
  }

  body .site-nav a .ruqaa {
    font-size: 12px;
  }
}

/* ============================================
   NAV EXTRAS (Performance & User) - Unified Container
   ============================================ */
.nav-extras {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  /* Push to left in RTL */
}

/* Mobile Nav Extras */
@media (max-width: 768px) {
  .nav-extras {
    flex-direction: column;
    width: 100%;
    margin-right: 0;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(24, 255, 243, 0.1);
  }

  .nav-extras .performance-toggle,
  .nav-extras .user-account,
  .nav-extras .login-button {
    width: 100%;
    justify-content: center;
  }

  .nav-extras .user-info {
    width: 100%;
    max-width: none;
  }

  .nav-extras .user-account {
    margin-left: 0;
    order: unset;
  }
}


/* ============================================
   PERFORMANCE TOGGLE - NEON CYBERPUNK DESIGN
   ============================================ */

.performance-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(13, 35, 43, 0.8), rgba(11, 26, 33, 0.9));
  border: 1.5px solid rgba(24, 255, 243, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  order: 2.5;
  user-select: none;
  -webkit-user-select: none;
}

.performance-toggle:hover {
  border-color: rgba(24, 255, 243, 0.5);
  box-shadow:
    0 4px 16px rgba(24, 255, 243, 0.25),
    0 0 12px rgba(24, 255, 243, 0.15);
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.12), rgba(30, 155, 255, 0.1));
}

.performance-toggle:active {
  transform: translateY(0) scale(0.98);
  transition: all 0.1s ease;
}

.performance-toggle.active {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(255, 71, 71, 0.15));
  border-color: rgba(255, 107, 107, 0.5);
  box-shadow:
    0 4px 16px rgba(255, 107, 107, 0.3),
    0 0 12px rgba(255, 107, 107, 0.2);
}

.performance-toggle.active:hover {
  border-color: rgba(255, 107, 107, 0.7);
  box-shadow:
    0 5px 20px rgba(255, 107, 107, 0.4),
    0 0 16px rgba(255, 107, 107, 0.25);
}

.toggle-icon {
  font-size: 14px;
  line-height: 1;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 0 6px rgba(24, 255, 243, 0.6));
}

.performance-toggle.active .toggle-icon {
  filter: drop-shadow(0 0 6px rgba(255, 107, 107, 0.6));
  transform: rotate(180deg);
}

.toggle-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  text-shadow: 0 0 6px rgba(24, 255, 243, 0.4);
  line-height: 1;
}

.performance-toggle.active .toggle-label {
  color: #ff6b6b;
  text-shadow: 0 0 6px rgba(255, 107, 107, 0.5);
}

/* Tablet and smaller - hide label earlier to prevent navbar corruption */
@media (max-width: 1200px) {
  .toggle-label {
    display: none;
  }

  .performance-toggle {
    padding: 6px 8px;
    gap: 0;
  }
}

/* Mobile - further size reduction */
@media (max-width: 768px) {
  .performance-toggle {
    padding: 5px 7px;
  }

  .toggle-icon {
    font-size: 15px;
  }
}

/* Very small screens */
@media (max-width: 480px) {
  .performance-toggle {
    padding: 4px 6px;
  }

  .toggle-icon {
    font-size: 14px;
  }
}

/* ============================================
   USER ACCOUNT UI - NEON CYBERPUNK DESIGN
   ============================================ */

.user-account {
  display: flex;
  align-items: center;
  gap: 12px;
  gap: 12px;
  /* margin-left: auto; Removed as it's now in nav-extras */
  /* order: 3; Removed */
  z-index: 1001;
  position: relative;
}


/* User Info Card - Horizontal Navbar Design */
.user-info {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(13, 35, 43, 0.8), rgba(11, 26, 33, 0.9));
  border: 2px solid rgba(24, 255, 243, 0.3);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  cursor: pointer;
  min-width: auto;
  max-width: 220px;
}

.user-info:hover {
  border-color: rgba(24, 255, 243, 0.5);
  box-shadow:
    0 6px 24px rgba(24, 255, 243, 0.25),
    0 0 20px rgba(24, 255, 243, 0.15);
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.12), rgba(30, 155, 255, 0.1));
}

.user-info.active {
  border-color: rgba(24, 255, 243, 0.6);
  box-shadow:
    0 8px 32px rgba(24, 255, 243, 0.35),
    0 0 24px rgba(24, 255, 243, 0.2);
}

/* Dropdown Arrow - Right side */
.user-info::after {
  content: "▼";
  font-size: 8px;
  color: var(--neon);
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.6;
  pointer-events: none;
  z-index: 2;
  text-shadow: 0 0 4px rgba(24, 255, 243, 0.5);
  flex-shrink: 0;
  margin-right: -4px;
}

.user-info.active::after {
  transform: rotate(180deg);
  opacity: 1;
}

/* User Avatar - Neon Glow Effect */
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--neon);
  box-shadow:
    0 0 12px rgba(24, 255, 243, 0.5),
    0 0 24px rgba(24, 255, 243, 0.3),
    inset 0 0 8px rgba(24, 255, 243, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}

.user-info:hover .user-avatar {
  box-shadow:
    0 0 16px rgba(24, 255, 243, 0.7),
    0 0 32px rgba(24, 255, 243, 0.4),
    inset 0 0 12px rgba(24, 255, 243, 0.3);
  transform: scale(1.05);
}

/* User Details - Horizontal Layout */
.user-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--neon);
  line-height: 1.2;
  text-shadow: 0 0 8px rgba(24, 255, 243, 0.5);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.user-quota-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
  font-weight: 500;
}

/* Quota Progress Bar - Compact Horizontal */
.quota-bar {
  flex: 1;
  height: 3px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid rgba(24, 255, 243, 0.2);
  position: relative;
  min-width: 60px;
}

.quota-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon), var(--accent), var(--neon));
  background-size: 200% 100%;
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 0 8px rgba(24, 255, 243, 0.6),
    0 0 16px rgba(24, 255, 243, 0.3);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {

  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

/* Login Button - Matching Site Design */
.login-button {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(24, 255, 243, 0.3);
  background: linear-gradient(135deg, rgba(13, 35, 43, 0.8), rgba(11, 26, 33, 0.9));
  color: var(--neon);
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.login-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(24, 255, 243, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
}

.login-button:hover {
  border-color: rgba(24, 255, 243, 0.6);
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.15), rgba(30, 155, 255, 0.12));
  box-shadow:
    0 6px 24px rgba(24, 255, 243, 0.35),
    0 0 20px rgba(24, 255, 243, 0.2);
  transform: translateY(-2px);
  color: var(--neon);
  text-shadow: 0 0 8px rgba(24, 255, 243, 0.6);
}

.login-button:hover::before {
  width: 300px;
  height: 300px;
}

.login-button:active {
  transform: translateY(0) scale(0.98);
}

/* Logout Button - Subtle Red Accent */
.logout-button {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid rgba(255, 77, 77, 0.3);
  background: linear-gradient(135deg, rgba(50, 15, 15, 0.6), rgba(40, 10, 10, 0.7));
  color: #ff6b6b;
  cursor: pointer;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.logout-button::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 77, 77, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  pointer-events: none;
}

.logout-button:hover {
  border-color: rgba(255, 77, 77, 0.5);
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.15), rgba(255, 107, 107, 0.12));
  box-shadow:
    0 4px 16px rgba(255, 77, 77, 0.3),
    0 0 12px rgba(255, 77, 77, 0.2);
  transform: translateY(-2px);
  color: #ff9999;
}

.logout-button:hover::before {
  width: 200px;
  height: 200px;
}

.logout-button:active {
  transform: translateY(0) scale(0.98);
}

/* Quota Warning - Enhanced Design */
.quota-warning {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 152, 0, 0.08));
  border: 2px solid rgba(255, 193, 7, 0.4);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 20px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  color: #ffc107;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow:
    0 4px 16px rgba(255, 193, 7, 0.2),
    inset 0 0 20px rgba(255, 193, 7, 0.05);
  animation: pulse-warning 2s ease-in-out infinite;
}

@keyframes pulse-warning {

  0%,
  100% {
    box-shadow:
      0 4px 16px rgba(255, 193, 7, 0.2),
      inset 0 0 20px rgba(255, 193, 7, 0.05);
  }

  50% {
    box-shadow:
      0 6px 24px rgba(255, 193, 7, 0.3),
      inset 0 0 24px rgba(255, 193, 7, 0.1);
  }
}

.quota-warning.low {
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.15), rgba(255, 107, 107, 0.1));
  border-color: rgba(255, 77, 77, 0.5);
  color: #ff6b6b;
  box-shadow:
    0 4px 16px rgba(255, 77, 77, 0.25),
    inset 0 0 20px rgba(255, 77, 77, 0.08);
  animation: pulse-danger 1.5s ease-in-out infinite;
}

@keyframes pulse-danger {

  0%,
  100% {
    box-shadow:
      0 4px 16px rgba(255, 77, 77, 0.25),
      inset 0 0 20px rgba(255, 77, 77, 0.08);
  }

  50% {
    box-shadow:
      0 8px 32px rgba(255, 77, 77, 0.4),
      inset 0 0 28px rgba(255, 77, 77, 0.15);
  }
}

.quota-warning-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px currentColor);
  flex-shrink: 0;
}

.quota-warning-text {
  flex: 1;
  font-size: 14px;
  line-height: 1.6;
}

.quota-warning-text strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  text-shadow: 0 0 8px currentColor;
}

.quota-warning-link {
  color: var(--neon);
  text-decoration: underline;
  font-weight: 600;
  transition: all 0.3s ease;
  text-shadow: 0 0 8px rgba(24, 255, 243, 0.5);
}

.quota-warning-link:hover {
  color: var(--accent);
  text-shadow: 0 0 12px rgba(30, 155, 255, 0.7);
}

/* Profile Dropdown Menu */
.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  background: linear-gradient(135deg, rgba(13, 35, 43, 0.95), rgba(11, 26, 33, 0.98));
  border: 2px solid rgba(24, 255, 243, 0.4);
  border-radius: 16px;
  padding: 20px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 24px rgba(24, 255, 243, 0.2);
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;
}

.user-profile-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(24, 255, 243, 0.2);
}

.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--neon);
  box-shadow:
    0 0 20px rgba(24, 255, 243, 0.6),
    0 0 40px rgba(24, 255, 243, 0.3),
    inset 0 0 16px rgba(24, 255, 243, 0.2);
}

.profile-name-full {
  font-size: 16px;
  font-weight: 700;
  color: var(--neon);
  text-shadow: 0 0 12px rgba(24, 255, 243, 0.6);
  text-align: center;
}

.profile-email {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.profile-quota-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.profile-quota-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.profile-quota-bar {
  width: 100%;
  height: 6px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid rgba(24, 255, 243, 0.2);
}

.profile-quota-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon), var(--accent), var(--neon));
  background-size: 200% 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 0 12px rgba(24, 255, 243, 0.6),
    0 0 24px rgba(24, 255, 243, 0.3);
  animation: shimmer 2s ease-in-out infinite;
}

.profile-quota-text {
  font-size: 13px;
  color: var(--text);
  text-align: center;
  font-weight: 600;
}

.profile-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.profile-add-quota {
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.1), rgba(30, 155, 255, 0.08));
  border: 1px solid rgba(24, 255, 243, 0.3);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
}

.profile-add-quota-title {
  font-size: 13px;
  color: var(--neon);
  font-weight: 600;
  margin-bottom: 8px;
}

.profile-add-quota-text {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.profile-contact-links {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.profile-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(24, 255, 243, 0.08);
  border: 1px solid rgba(24, 255, 243, 0.2);
  color: var(--neon);
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.profile-contact-link:hover {
  background: rgba(24, 255, 243, 0.15);
  border-color: rgba(24, 255, 243, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(24, 255, 243, 0.2);
}

.profile-signout {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 2px solid rgba(255, 77, 77, 0.3);
  background: linear-gradient(135deg, rgba(50, 15, 15, 0.6), rgba(40, 10, 10, 0.7));
  color: #ff6b6b;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.profile-signout:hover {
  border-color: rgba(255, 77, 77, 0.5);
  background: linear-gradient(135deg, rgba(255, 77, 77, 0.15), rgba(255, 107, 107, 0.12));
  box-shadow:
    0 4px 16px rgba(255, 77, 77, 0.3),
    0 0 12px rgba(255, 77, 77, 0.2);
  transform: translateY(-2px);
}

/* Mobile Icon - Hidden on Desktop */
.user-mobile-icon {
  display: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px;
    height: 70px;
  }

  .user-account {
    margin-left: auto;
    width: auto;
    justify-content: flex-end;
    margin-top: 0;
    order: 3;
    padding: 0;
  }

  .user-info {
    max-width: none;
    width: auto;
    justify-content: center;
    padding: 6px;
    gap: 0;
    min-width: 44px;
    border-radius: 10px;
  }

  /* Hide desktop content on mobile */
  .user-info .user-avatar,
  .user-info .user-details,
  .user-info::after {
    display: none !important;
  }

  /* Show mobile icon */
  .user-mobile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--neon);
    transition: all 0.3s ease;
  }

  .user-info:hover .user-mobile-icon,
  .user-info.active .user-mobile-icon {
    color: var(--accent);
    transform: scale(1.1);
  }

  .user-profile-dropdown {
    right: 0;
    left: auto;
    transform: translateY(-10px);
    min-width: 280px;
    max-width: calc(100vw - 32px);
    margin-top: 8px;
  }

  .user-profile-dropdown.show {
    transform: translateY(0);
  }

  .login-button {
    width: auto;
    min-width: 44px;
    padding: 8px 12px;
    font-size: 13px;
    justify-content: center;
  }

  .login-button span:first-child {
    margin-left: 4px;
  }

  .login-button span:last-child {
    display: none;
  }
}

@media (max-width: 480px) {
  .header-inner {
    padding: 10px 12px;
    height: 65px;
  }

  .user-info {
    padding: 5px;
    min-width: 40px;
    border-radius: 8px;
  }

  .user-mobile-icon {
    width: 28px;
    height: 28px;
  }

  .user-mobile-icon svg {
    width: 18px;
    height: 18px;
  }

  .user-profile-dropdown {

    padding: 16px;
    gap: 12px;
    right: 12px;
  }

  .profile-header {
    gap: 10px;
    padding-bottom: 12px;
  }

  .profile-avatar-large {
    width: 70px;
    height: 70px;
  }

  .profile-name-full {
    font-size: 15px;
  }

  .profile-email {
    font-size: 11px;
  }

  .profile-contact-links {
    flex-direction: column;
    gap: 6px;
  }

  .profile-contact-link {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }

  .login-button {
    min-width: 40px;
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* Mobile Menu Toggle Button */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: rgba(24, 255, 243, 0.08);
  border: 2px solid rgba(24, 255, 243, 0.3);
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1002;
  width: 48px;
  height: 48px;
  justify-content: center;
  align-items: center;
}

.nav-toggle:hover {
  background: rgba(24, 255, 243, 0.15);
  border-color: rgba(24, 255, 243, 0.5);
  transform: scale(1.05);
}

.nav-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(24, 255, 243, 0.35);
}

.nav-toggle:active {
  transform: scale(0.95);
}

.nav-toggle span {
  width: 28px;
  height: 3px;
  background: var(--neon);
  border-radius: 2px;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
  box-shadow: 0 0 8px rgba(24, 255, 243, 0.6);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile Menu Elements - Hidden by default */
.nav-back {
  display: none !important;
}

.mobile-nav-header {
  display: none;
}

.mobile-nav-title {
  display: none;
}

.hero {
  position: relative;
  padding: 64px 0
}

.neon-title {
  font-size: clamp(28px, 5vw, 46px);
  margin: 0 0 12px;
  color: var(--neon);
  text-shadow: 0 0 24px rgba(24, 255, 243, .8), 0 0 60px rgba(0, 214, 201, .5);
  text-align: center
}

.neon-title.no-glow {
  text-shadow: none
}

.lead {
  margin: 0 auto 28px;
  max-width: 760px;
  color: var(--muted);
  text-align: center
}

.grid {
  display: grid;
  gap: 24px
}

.grid-2 {
  grid-template-columns: 1.6fr 1fr
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 28px
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .02));
  border: 1px solid rgba(24, 255, 243, .24);
  border-radius: 16px;
  box-shadow: inset 0 0 0 1px rgba(24, 255, 243, .12), 0 10px 30px rgba(0, 0, 0, .35);
  padding: 32px;
  margin-bottom: 28px;
  transition: transform .2s ease, box-shadow .2s ease;
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent, rgba(24, 255, 243, .05), transparent);
  opacity: 0;
  transition: opacity .3s ease
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .35)
}

.card:hover::before {
  opacity: 1
}

.parse-output {
  white-space: pre-wrap;
  background: linear-gradient(135deg, rgba(13, 35, 43, .8), rgba(11, 26, 33, .9));
  border: 2px solid rgba(24, 255, 243, .3);
  border-radius: 16px;
  padding: 24px;
  color: var(--text);
  transition: all .3s ease;
  backdrop-filter: blur(10px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2);
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  word-wrap: break-word
}

.parse-output.theme-alt {
  background: linear-gradient(135deg, rgba(30, 155, 255, .12), rgba(24, 255, 243, .08));
  border-color: rgba(30, 155, 255, .4);
  box-shadow: 0 0 20px rgba(30, 155, 255, .2), inset 0 2px 4px rgba(0, 0, 0, .2)
}

.token {
  display: block;
  padding: 12px 16px;
  border-radius: 10px;
  margin: 8px 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .03));
  border: 1px solid rgba(24, 255, 243, .25);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  position: relative;
  cursor: default;
  overflow: hidden;
  border-radius: 8px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
  overflow-wrap: break-word
}

.token::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(24, 255, 243, .08), rgba(30, 155, 255, .06));
  opacity: 0;
  transition: opacity .3s ease
}

.token:hover {
  background: linear-gradient(135deg, rgba(24, 255, 243, .1), rgba(30, 155, 255, .08));
  border-color: rgba(24, 255, 243, .4);
  transform: translateX(-4px) translateY(-1px);
  box-shadow: 4px 3px 16px rgba(24, 255, 243, .25), 0 0 12px rgba(24, 255, 243, .15)
}

.token:hover::before {
  opacity: 1
}

.token .interactive-word {
  position: relative;
  z-index: 1
}

.token.skeleton {
  border-color: rgba(24, 255, 243, .12);
  background: linear-gradient(90deg, rgba(24, 255, 243, .06), rgba(24, 255, 243, .12), rgba(24, 255, 243, .06));
  background-size: 200% 100%;
  animation: skeleton 1.2s ease-in-out infinite
}

/* Enhanced Interactive Tooltip System */
.grammar-tooltip {
  position: absolute;
  background: rgba(0, 0, 0, .98);
  border: 2px solid rgba(24, 255, 243, .7);
  border-radius: 12px;
  padding: 14px 18px;
  color: white;
  font-size: 14px;
  font-weight: 500;
  z-index: 1000;
  max-width: 320px;
  min-width: 200px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .6), 0 0 24px rgba(24, 255, 243, .4), inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(15px) scale(0.9);
  transition: all .4s cubic-bezier(.25, .46, .45, .94);
  pointer-events: none;
  font-family: "Cairo", sans-serif;
  line-height: 1.5;
}

.grammar-tooltip.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.grammar-tooltip::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 24px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-bottom: 10px solid rgba(24, 255, 243, .7);
  filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, .3));
}

.grammar-tooltip::after {
  content: "";
  position: absolute;
  top: -8px;
  left: 25px;
  width: 0;
  height: 0;
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-bottom: 9px solid rgba(0, 0, 0, .98);
}

/* Interactive Word Highlighting */
.interactive-word {
  color: var(--neon);
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all .2s ease;
  position: relative;
  display: inline-block;
}

.interactive-word:hover {
  background: rgba(24, 255, 243, .15);
  box-shadow: 0 0 8px rgba(24, 255, 243, .3);
  transform: translateY(-1px);
}

.interactive-word.active {
  background: rgba(24, 255, 243, .25);
  box-shadow: 0 0 12px rgba(24, 255, 243, .4);
  color: white;
}

/* Tooltip for grammar concepts */
.js-tooltip {
  position: absolute;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.97), rgba(20, 20, 20, 0.97));
  color: #ffffff;
  padding: 14px 18px;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 500;
  z-index: 99999;
  pointer-events: none;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7), 0 0 0 2px rgba(24, 255, 243, 0.4);
  border: 2px solid rgba(24, 255, 243, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 320px;
  white-space: normal;
  text-align: center;
  line-height: 1.5;
  font-family: "Cairo", sans-serif;
  direction: rtl;
}

.js-tooltip.show {
  opacity: 1;
  transform: translateY(4px);
}

/* Enhanced Token Styling */
.token-word {
  color: var(--neon);
  font-weight: 600;
  margin-bottom: 4px;
  display: block;
}

.token-explanation {
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
}

.token-explanation .grammar-term {
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(24, 255, 243, .5);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  padding: 2px 4px;
  border-radius: 4px;
  position: relative;
  display: inline-block;
}

.token-explanation .grammar-term:hover {
  color: var(--neon);
  text-decoration-color: var(--neon);
  text-shadow: 0 0 12px rgba(24, 255, 243, .6);
  background: rgba(24, 255, 243, .1);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(24, 255, 243, .3);
}

.token-explanation .grammar-term.active {
  color: white;
  background: rgba(24, 255, 243, .2);
  text-shadow: 0 0 16px rgba(24, 255, 243, .8);
  box-shadow: 0 4px 12px rgba(24, 255, 243, .4);
  transform: translateY(-2px);
}

/* Grammar color classes for word highlighting */
.grammar-verb {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(255, 107, 107, 0.15)) !important;
  color: #ff6b6b !important;
  border: 1px solid rgba(255, 107, 107, 0.5) !important;
}

.grammar-noun {
  background: linear-gradient(135deg, rgba(74, 207, 159, 0.3), rgba(74, 207, 159, 0.15)) !important;
  color: #4acf9f !important;
  border: 1px solid rgba(74, 207, 159, 0.5) !important;
}

.grammar-particle {
  background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 193, 7, 0.15)) !important;
  color: #ffc107 !important;
  border: 1px solid rgba(255, 193, 7, 0.5) !important;
}

.grammar-pronoun {
  background: linear-gradient(135deg, rgba(156, 136, 255, 0.3), rgba(156, 136, 255, 0.15)) !important;
  color: #9c88ff !important;
  border: 1px solid rgba(156, 136, 255, 0.5) !important;
}

.grammar-letter {
  background: linear-gradient(135deg, rgba(255, 159, 243, 0.3), rgba(255, 159, 243, 0.15)) !important;
  color: #ff9ff3 !important;
  border: 1px solid rgba(255, 159, 243, 0.5) !important;
}

.grammar-clause {
  background: linear-gradient(135deg, rgba(30, 155, 255, 0.3), rgba(30, 155, 255, 0.15)) !important;
  color: #1e9bff !important;
  border: 1px solid rgba(30, 155, 255, 0.5) !important;
}

.form-label {
  display: block;
  margin: 0 0 6px 0;
  color: var(--muted);
  font-size: .95rem;
  transition: all 0.3s ease
}

/* Professional Input Fields - Clean & Responsive */
.input {
  width: 100%;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 2px solid rgba(24, 255, 243, .3);
  background: linear-gradient(135deg, rgba(13, 35, 43, .7), rgba(11, 26, 33, .8));
  color: var(--text);
  outline: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2);
  font-size: 16px;
  line-height: 1.5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.input:hover {
  border-color: rgba(24, 255, 243, .4);
  box-shadow:
    inset 0 2px 4px rgba(0, 0, 0, .2),
    0 2px 8px rgba(24, 255, 243, .15);
}

.input:focus {
  border-color: rgba(24, 255, 243, .6);
  background: rgba(13, 35, 43, .9);
  box-shadow:
    0 0 0 4px rgba(24, 255, 243, .15),
    0 4px 16px rgba(24, 255, 243, .2);
  transform: translateY(-2px);
}

.input::placeholder {
  color: rgba(157, 223, 236, .5)
}

.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: var(--neon);
  display: inline-block;
  animation: spin .8s linear infinite
}

@keyframes spin {
  to {
    transform: rotate(360deg)
  }
}

@keyframes skeleton {
  0% {
    background-position: 200% 0
  }

  100% {
    background-position: -200% 0
  }
}

.parse-output .token {
  animation: popIn .28s ease both
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: translateY(6px) scale(.98)
  }

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

.parse-output .token:nth-child(1) {
  animation-delay: .02s
}

.parse-output .token:nth-child(2) {
  animation-delay: .04s
}

.parse-output .token:nth-child(3) {
  animation-delay: .06s
}

.parse-output .token:nth-child(4) {
  animation-delay: .08s
}

.parse-output .token:nth-child(5) {
  animation-delay: .1s
}

.parse-output .token:nth-child(6) {
  animation-delay: .12s
}

.parse-output .token:nth-child(7) {
  animation-delay: .14s
}

.parse-output .token:nth-child(8) {
  animation-delay: .16s
}

.parse-output .token:nth-child(9) {
  animation-delay: .18s
}

.parse-output .token:nth-child(10) {
  animation-delay: .2s
}

.loader-bar {
  height: 3px;
  border-radius: 999px;
  background: rgba(24, 255, 243, .15);
  overflow: hidden;
  margin-top: 10px
}

.loader-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  animation: slide 1.4s ease-in-out infinite
}

@keyframes slide {
  0% {
    transform: translateX(-100%)
  }

  50% {
    transform: translateX(120%)
  }

  100% {
    transform: translateX(220%)
  }
}

/* ============================================
   GOOGLE ADSENSE - PROFESSIONAL RESPONSIVE ADS
   ============================================ */

/* Main AdSense Container - Clean Integration */
.adsense-container {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 32px auto;
  text-align: center;
  overflow: hidden;
  position: relative;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(13, 35, 43, .5), rgba(11, 26, 33, .6));
  border: 1px solid rgba(24, 255, 243, .15);
  padding: 16px;
  box-sizing: border-box;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.adsense-container:hover {
  border-color: rgba(24, 255, 243, .25);
  box-shadow: 0 4px 16px rgba(24, 255, 243, .1);
}

/* AdSense Element */
.adsense-container .adsbygoogle {
  display: block !important;
  margin: 0 auto;
  max-width: 100%;
  background: transparent !important;
}

/* Ad Label - Subtle & Professional */
.adsense-container::before {
  content: 'إعلان';
  display: block;
  text-align: center;
  font-size: 11px;
  color: rgba(157, 223, 236, 0.5);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

/* Header/Top Banner Ad - Leaderboard */
.header-ad,
.top-banner-ad {
  max-width: 100%;
  min-height: 90px;
  margin: 24px auto;
}

.header-ad .adsbygoogle,
.top-banner-ad .adsbygoogle {
  min-height: 90px;
}

/* Sidebar Ad - Rectangle */
.sidebar-ad {
  max-width: 100%;
  min-height: 250px;
  margin: 24px auto;
}

.sidebar-ad .adsbygoogle {
  min-height: 250px;
  max-width: 300px;
  margin: 0 auto;
}

/* Content/In-Feed Ad - Large Rectangle */
.content-ad,
.in-feed-ad {
  max-width: 100%;
  min-height: 280px;
  margin: 40px auto;
}

.content-ad .adsbygoogle,
.in-feed-ad .adsbygoogle {
  min-height: 280px;
}

/* Footer Ad - Wide Banner */
.footer-ad {
  max-width: 100%;
  min-height: 100px;
  margin: 32px auto 24px;
}

.footer-ad .adsbygoogle {
  min-height: 100px;
}

/* Responsive/Auto Ad */
.responsive-ad {
  max-width: 100%;
  min-height: 200px;
  margin: 32px auto;
}

.responsive-ad .adsbygoogle {
  min-height: 200px;
}

/* Between Sections Ad */
.section-ad {
  max-width: 100%;
  margin: 48px auto;
  padding: 20px;
}

.section-ad .adsbygoogle {
  min-height: 250px;
}

/* Tool Page Ad - Above/Below Tool */
.tool-ad {
  max-width: 100%;
  margin: 32px auto;
}

.tool-ad .adsbygoogle {
  min-height: 280px;
}

/* AdSense Loading State - Elegant */
.adsense-container:empty::after {
  content: 'جاري تحميل الإعلان...';
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  color: rgba(157, 223, 236, 0.4);
  font-size: 0.875rem;
  animation: adPulse 2s ease-in-out infinite;
}

@keyframes adPulse {

  0%,
  100% {
    opacity: 0.4;
  }

  50% {
    opacity: 0.6;
  }
}

/* Legacy Support */
.ad-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 24px auto;
  border: 1px dashed rgba(24, 255, 243, .2);
  border-radius: 14px;
  min-height: 90px;
  max-width: 100%;
  background: rgba(13, 35, 43, .3);
  padding: 16px;
  box-sizing: border-box;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
  .adsense-container {
    margin: 24px auto;
    padding: 12px;
    border-radius: 12px;
  }

  .header-ad,
  .top-banner-ad {
    min-height: 100px;
    margin: 20px auto;
  }

  .sidebar-ad {
    max-width: 100%;
    min-height: 250px;
  }

  .sidebar-ad .adsbygoogle {
    max-width: 100%;
  }

  .content-ad,
  .in-feed-ad {
    min-height: 250px;
    margin: 32px auto;
  }

  .footer-ad {
    min-height: 100px;
    margin: 24px auto 20px;
  }

  .responsive-ad {
    min-height: 250px;
    margin: 24px auto;
  }

  .section-ad {
    margin: 32px auto;
    padding: 12px;
  }

  .tool-ad {
    margin: 24px auto;
  }
}

@media (max-width:720px) {
  .responsive-ad {
    min-height: 140px
  }

  /* MASTER MOBILE SPACING - ALL SECTIONS AND CONTAINERS */
  .section {
    padding: 70px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  .section .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 24px !important;
    box-sizing: border-box !important;
  }

  /* CARDS - GENEROUS SPACING */
  .card {
    padding: 32px 24px !important;
    margin: 0 auto 32px auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
  }

  .card+.card {
    margin-top: 32px !important;
  }

  /* TYPOGRAPHY SPACING */
  h1 {
    margin-bottom: 24px !important;
    line-height: 1.35 !important;
  }

  h2 {
    margin-bottom: 26px !important;
    line-height: 1.4 !important;
  }

  h3 {
    margin-bottom: 20px !important;
    line-height: 1.4 !important;
  }

  p {
    line-height: 1.8 !important;
    margin-bottom: 22px !important;
  }

  /* BUTTONS - OPTIMIZED SIZING */
  .button {
    padding: 14px 24px !important;
    font-size: 15px !important;
    white-space: nowrap;
    border-radius: 11px !important;
    line-height: 1.5;
    margin: 6px 0 !important;
  }

  .button.primary {
    padding: 15px 26px !important;
    font-size: 15px !important;
  }

  .button.cta-big {
    padding: 17px 28px !important;
    font-size: 17px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 8px 0 !important;
  }

  .button.glow {
    padding: 13px 22px !important;
    font-size: 14px !important;
  }

  .button.ghost {
    padding: 13px 22px !important;
    font-size: 14px !important;
  }

  /* COMPACT BUTTONS */
  .compact-btn {
    padding: 11px 16px !important;
    font-size: 14px !important;
    flex: 0 1 auto;
    margin: 4px !important;
  }

  .color-toggle {
    padding: 11px 16px !important;
    font-size: 14px !important;
  }

  /* BUTTON CONTAINERS */
  .card>div[style*="display:flex"] {
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin: 8px 0 !important;
  }

  .card>div>div[style*="display:flex"] {
    flex-wrap: wrap !important;
    gap: 12px !important;
  }

  /* GRID LAYOUTS */
  .grid {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 28px !important;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    padding: 0 20px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  /* BLOG GRID SPECIFIC */
  #blog-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 28px !important;
    padding: 0 20px !important;
    width: 100% !important;
  }

  /* ASIDE & SECTION CONTAINERS */
  aside,
  section {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* PARSE OUTPUT - API DATA CONTAINER */
  .parse-output {
    padding: 26px 20px !important;
    margin: 24px 0 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 14px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  #parse-output {
    padding: 26px 20px !important;
    margin: 24px 0 0 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* TOKENS - WORD ROWS */
  .token {
    padding: 14px 16px !important;
    margin: 12px 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 11px !important;
    font-size: 0.95rem !important;
    box-sizing: border-box !important;
    word-break: break-word !important;
  }

  .token:first-child {
    margin-top: 0 !important;
  }

  .token:last-child {
    margin-bottom: 0 !important;
  }

  /* TOOLTIPS */
  .js-tooltip {
    max-width: 85vw !important;
    padding: 14px 16px !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    border-radius: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) translateY(-100%) !important;
    white-space: normal;
    word-wrap: break-word;
    text-align: right;
  }

  /* INTERACTIVE WORDS */
  .interactive-word {
    padding: 4px 7px !important;
    font-size: 1rem;
    display: inline-block;
    max-width: 100%;
    word-break: break-word;
    margin: 2px !important;
  }

  /* STATS GRID */
  .stats-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 32px !important;
    padding: 0 20px !important;
    margin: 40px auto !important;
    width: 100% !important;
    align-items: center !important;
  }

  .stat-card {
    padding: 32px 26px !important;
    margin: 0 auto !important;
    max-width: 380px !important;
    width: 100% !important;
  }

  /* FEATURE CARDS */
  .feature-card {
    padding: 40px 28px !important;
    max-width: 420px !important;
    width: 100% !important;
    margin: 0 auto 32px auto !important;
  }

  /* TESTIMONIAL CARDS */
  .testimonial-card {
    padding: 36px 26px !important;
    max-width: 420px !important;
    width: 100% !important;
    margin: 0 auto 32px auto !important;
  }

  /* STEP CARDS */
  .step-card {
    max-width: 300px !important;
    min-width: 260px !important;
    width: auto !important;
    margin: 0 auto 36px !important;
    padding: 56px 30px 40px !important;
  }

  .step-arrow {
    display: none !important;
  }

  /* BLOG CARDS */
  .blog-card {
    max-width: 400px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 32px 26px !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 240px !important;
  }

  .blog-card h3 {
    margin-bottom: 14px !important;
    line-height: 1.4 !important;
  }

  .blog-card p {
    margin-bottom: 16px !important;
    line-height: 1.7 !important;
  }

  .blog-meta {
    margin-top: auto !important;
    padding-top: 18px !important;
  }

  /* HOME PAGE BLOG POSTS */
  #home-posts {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 28px !important;
    padding: 0 20px !important;
    width: 100% !important;
  }

  #home-posts .blog-card {
    max-width: 400px !important;
    width: 100% !important;
    margin: 0 !important;
  }

  /* TOOL PAGE SPECIFIC */
  .tool-card {
    padding: 32px 24px !important;
    margin: 0 auto !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tool-input {
    padding: 18px 110px 18px 20px !important;
    font-size: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
  }

  .tool-btn-overlay {
    padding: 13px 18px !important;
    font-size: 14px !important;
    right: 14px !important;
  }

  /* FORCE WIDTH CONSTRAINTS */
  .parse-output * {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .card>* {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* LEAD TEXT */
  .lead {
    font-size: 17px !important;
    line-height: 1.75 !important;
    padding: 0 20px !important;
    margin-bottom: 32px !important;
  }
}

.footer {
  margin-top: auto;
  padding: 32px 0;
  background: rgba(3, 15, 20, .9);
  border-top: 1px solid rgba(24, 255, 243, .2);
  text-align: center
}

.footer a {
  color: var(--muted);
  text-decoration: none;
  margin: 0 6px
}

.footer a:hover {
  color: var(--text)
}

/* ensure sticky footer */
.app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%
}

.content {
  flex: 1
}

@media (max-width:1024px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px
  }

  .grid-2 {
    grid-template-columns: 1fr;
    gap: 20px
  }
}

/* ============================================
   MOBILE RESPONSIVE STYLES (< 720px)
   ============================================ */
@media (max-width: 720px) {

  /* Header Adjustments */
  .header-inner {
    height: 70px;
    padding: 0 16px;
    position: relative;
    flex-direction: row-reverse;
  }

  .nav-area {
    order: 2;
  }

  .brand {
    order: 1;
  }

  .brand .logo {
    width: 50px;
    height: 50px;
  }

  /* Show Mobile Toggle */
  .nav-toggle {
    display: flex !important;
    z-index: 10000;
    position: relative;
  }

  /* Grid Adjustments */
  .grid-3 {
    grid-template-columns: 1fr;
  }

  /* Mobile Navigation Drawer */
  .site-nav {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    width: 100%;
    max-width: 100%;
    background: linear-gradient(135deg, rgba(6, 16, 22, 0.98) 0%, rgba(10, 28, 34, 0.98) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
      opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
      visibility 0.4s;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 100px 24px 40px;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.7);
  }

  .site-nav.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Body Lock When Nav Open */
  body.nav-open {
    overflow: hidden;
    height: 100vh;
  }

  /* Mobile Nav Header */
  .mobile-nav-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid rgba(24, 255, 243, 0.18);
    opacity: 0;
    transform: translateY(-20px);
    width: 100%;
    max-width: 360px;
  }

  .site-nav.open .mobile-nav-header {
    animation: fadeInDown 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s;
  }

  .mobile-nav-title {
    display: block;
    margin: 0;
    font-size: 22px;
    color: var(--neon);
    text-shadow: 0 0 12px rgba(24, 255, 243, 0.45);
  }

  /* Navigation List */
  .site-nav ul {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 360px;
  }

  .site-nav ul li {
    opacity: 0;
    transform: translateY(20px);
    list-style: none;
  }

  .site-nav.open ul li {
    animation: menuItemIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }

  .site-nav.open ul li:nth-child(1) {
    animation-delay: 0.15s;
  }

  .site-nav.open ul li:nth-child(2) {
    animation-delay: 0.2s;
  }

  .site-nav.open ul li:nth-child(3) {
    animation-delay: 0.25s;
  }

  .site-nav.open ul li:nth-child(4) {
    animation-delay: 0.3s;
  }

  .site-nav.open ul li:nth-child(5) {
    animation-delay: 0.35s;
  }

  .site-nav.open ul li:nth-child(6) {
    animation-delay: 0.4s;
  }

  .site-nav.open ul li:nth-child(7) {
    animation-delay: 0.45s;
  }

  .site-nav.open ul li:nth-child(8) {
    animation-delay: 0.5s;
  }

  /* Navigation Links */
  .site-nav a {
    width: 100%;
    text-align: center;
    padding: 16px 20px;
    border-radius: 12px;
    border: 2px solid rgba(24, 255, 243, 0.35);
    background: linear-gradient(135deg, rgba(13, 35, 43, 0.85), rgba(11, 26, 33, 0.9));
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35), 0 0 15px rgba(24, 255, 243, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    color: #dffbff;
  }

  .site-nav a::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(24, 255, 243, 0.15), transparent);
    transition: left 0.6s ease;
  }

  .site-nav a.active {
    background: linear-gradient(135deg, rgba(24, 255, 243, 0.2), rgba(30, 155, 255, 0.15));
    border-color: rgba(24, 255, 243, 0.6);
    box-shadow: 0 4px 20px rgba(24, 255, 243, 0.4), 0 0 25px rgba(24, 255, 243, 0.25);
  }

  .site-nav a:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(24, 255, 243, 0.35), 0 0 30px rgba(24, 255, 243, 0.25);
    border-color: rgba(24, 255, 243, 0.7);
  }

  .site-nav a:active {
    transform: translateY(-1px) scale(0.98);
  }

  .site-nav a:hover::before {
    left: 100%;
  }

  /* Close Button - Hidden */
  .nav-back {
    display: none !important;
  }
}

/* ============================================
   TABLET & DESKTOP RESPONSIVE STYLES
   ============================================ */

/* Two-column mobile nav for small devices */
@media (min-width: 481px) and (max-width: 720px) {
  .site-nav ul {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(140px, 1fr));
    gap: 14px !important;
    max-width: 520px !important;
  }

  .site-nav a {
    padding: 14px 16px !important;
    font-size: 15px !important;
  }

  .mobile-nav-header {
    margin-bottom: 28px;
  }
}

/* Tablet Spacing (721px - 1024px) */
@media (min-width: 721px) and (max-width: 1024px) {
  .container {
    padding: 0 28px;
  }

  .card {
    width: calc(100% - 56px);
    margin-left: auto;
    margin-right: auto;
    border-color: rgba(24, 255, 243, 0.18);
  }

  /* Reset nav to horizontal */
  .site-nav {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
  }

  .site-nav ul {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
  }

  .site-nav a {
    padding: 9px 14px !important;
    font-size: 14px !important;
    border: 2px solid transparent;
    background: transparent;
  }

  .nav-back,
  .mobile-nav-header {
    display: none !important;
  }
}

/* Desktop (1025px+) */
@media (min-width: 1025px) {
  .site-nav {
    position: static !important;
    transform: none !important;
    opacity: 1 !important;
    height: auto !important;
    padding: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
  }

  .site-nav ul {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    max-width: none !important;
  }

  .site-nav ul li {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
  }

  .site-nav a {
    padding: 10px 18px !important;
    border: 2px solid transparent;
    background: transparent;
  }

  .nav-back,
  .mobile-nav-header {
    display: none !important;
  }
}

/* ============================================
   NAVIGATION UTILITY STYLES
   ============================================ */

/* Hide header controls when mobile drawer is open */
body.nav-open .header-inner .brand {
  pointer-events: none;
  opacity: 0.3;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes menuItemIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }

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

/* Smooth scrollbar for mobile nav */
.site-nav::-webkit-scrollbar {
  width: 6px;
}

.site-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.site-nav::-webkit-scrollbar-thumb {
  background: rgba(24, 255, 243, 0.4);
  border-radius: 3px;
  transition: background 0.3s ease;
}

.site-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(24, 255, 243, 0.6);
}

/* Focus states for accessibility */
.site-nav a:focus-visible {
  outline: 3px solid rgba(24, 255, 243, 0.8);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(24, 255, 243, 0.2), 0 8px 24px rgba(24, 255, 243, 0.3);
}

.nav-toggle:focus-visible {
  outline: 3px solid rgba(24, 255, 243, 0.8);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(24, 255, 243, 0.25);
}

.nav-back:focus-visible {
  outline: 3px solid rgba(24, 255, 243, 0.8);
  outline-offset: 3px;
}

/* Loading state for navigation */
.site-nav.loading::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--neon), transparent);
  animation: loadingSlide 1.5s ease-in-out infinite;
}

@keyframes loadingSlide {
  0% {
    transform: translateX(-100%);
  }

  50% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(100%);
  }
}

/* Professional Statistics Cards - Smooth & Lightweight */
.stat-card {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 35, 43, .9) 0%, rgba(11, 26, 33, .95) 100%);
  border: 2px solid rgba(24, 255, 243, .35);
  border-radius: 20px;
  padding: 32px 24px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(24, 255, 243, .15), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 32px rgba(24, 255, 243, .25),
    0 0 24px rgba(24, 255, 243, .15);
  border-color: rgba(24, 255, 243, .6);
}

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

.stat-card:active {
  transform: translateY(-4px);
  transition: all 0.1s ease;
}

.stat-emoji {
  font-size: 56px;
  margin-bottom: 16px;
  line-height: 1;
  transition: all 0.3s ease;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(24, 255, 243, .3));
}

.stat-card:hover .stat-emoji {
  transform: scale(1.1);
  filter: drop-shadow(0 0 20px rgba(24, 255, 243, .5));
}

.stat-number {
  font-size: clamp(36px, 5vw, 48px);
  font-weight: 700;
  color: var(--neon);
  margin: 12px 0;
  text-shadow: 0 0 20px rgba(24, 255, 243, .6);
  line-height: 1;
}

.stat-label {
  font-size: 17px;
  color: var(--muted);
  margin-top: 12px;
  line-height: 1.4;
}

.accuracy-bar {
  height: 8px;
  background: rgba(255, 255, 255, .1);
  border-radius: 999px;
  margin-top: 12px;
  overflow: hidden;
}

.accuracy-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--neon));
  border-radius: 999px;
  animation: fillBar 2s ease-out;
}

@keyframes fillBar {
  from {
    width: 0
  }
}

/* Professional Feature Cards - Smooth & Elegant */
.feature-card {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 35, 43, .85) 0%, rgba(11, 26, 33, .9) 100%);
  border: 2px solid rgba(24, 255, 243, .3);
  border-radius: 20px;
  padding: 40px 28px;
  text-align: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(24, 255, 243, .2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(24, 255, 243, .6);
  box-shadow:
    0 16px 40px rgba(24, 255, 243, .3),
    0 0 32px rgba(24, 255, 243, .2);
}

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

.feature-card:active {
  transform: translateY(-6px);
  transition: all 0.1s ease;
}

.feature-icon {
  font-size: 56px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 16px rgba(24, 255, 243, .4));
  transition: all 0.3s ease;
  display: inline-block;
}

.feature-card:hover .feature-icon {
  filter: drop-shadow(0 0 24px rgba(24, 255, 243, .6));
  transform: scale(1.08);
}

/* Professional Step Cards - Clean & Smooth */
.step-card {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 35, 43, .9) 0%, rgba(11, 26, 33, .95) 100%);
  border: 2px solid rgba(24, 255, 243, .35);
  border-radius: 20px;
  padding: 48px 28px 32px;
  text-align: center;
  min-width: 220px;
  flex: 1;
  max-width: 300px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: visible;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

.step-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom, rgba(24, 255, 243, .15), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.step-card:hover {
  transform: translateY(-8px);
  box-shadow:
    0 16px 40px rgba(24, 255, 243, .3),
    0 0 32px rgba(24, 255, 243, .2);
  border-color: rgba(24, 255, 243, .6);
}

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

.step-number {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #1e9bff, #18fff3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 24px;
  color: #001419;
  box-shadow:
    0 6px 24px rgba(24, 255, 243, .6),
    0 0 30px rgba(24, 255, 243, .4),
    inset 0 2px 4px rgba(255, 255, 255, .3);
  border: 4px solid #061016;
  z-index: 10;
  line-height: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-card:hover .step-number {
  transform: translateX(-50%) scale(1.1);
  box-shadow:
    0 8px 32px rgba(24, 255, 243, .8),
    0 0 40px rgba(24, 255, 243, .6),
    inset 0 2px 4px rgba(255, 255, 255, .4);
}

.step-icon {
  font-size: 48px;
  margin-top: 8px;
  filter: drop-shadow(0 0 12px rgba(24, 255, 243, .4));
  transition: all 0.3s ease;
  display: inline-block;
}

.step-card:hover .step-icon {
  filter: drop-shadow(0 0 20px rgba(24, 255, 243, .6));
  transform: scale(1.08);
}

.step-arrow {
  font-size: 32px;
  color: var(--neon);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

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

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

/* Professional Testimonial Cards - Clean & Elegant */
.testimonial-card {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 35, 43, .85) 0%, rgba(11, 26, 33, .9) 100%);
  border: 2px solid rgba(24, 255, 243, .3);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

.testimonial-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(24, 255, 243, .2), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 32px rgba(24, 255, 243, .25),
    0 0 24px rgba(24, 255, 243, .15);
  border-color: rgba(24, 255, 243, .5);
}

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

.testimonial-stars {
  font-size: 22px;
  margin-bottom: 16px;
  filter: drop-shadow(0 0 8px rgba(255, 215, 0, .4));
}

.testimonial-author {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 2px solid rgba(24, 255, 243, .25);
}

/* Professional Blog Cards - Smooth & Clean */
.blog-card {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 35, 43, .85) 0%, rgba(11, 26, 33, .9) 100%);
  border: 2px solid rgba(24, 255, 243, .3);
  border-radius: 20px;
  padding: 32px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 280px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}

.blog-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--neon), var(--accent));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 32px rgba(24, 255, 243, .25),
    0 0 24px rgba(24, 255, 243, .15);
  border-color: rgba(24, 255, 243, .5);
}

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

.blog-card h3 {
  color: var(--neon);
  font-size: 22px;
  margin: 0 0 12px;
  line-height: 1.3;
}

.blog-card p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid rgba(24, 255, 243, .2);
  margin-top: auto;
}

.blog-date {
  color: var(--muted);
  font-size: 14px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 2px solid rgba(24, 255, 243, .3);
  background: rgba(24, 255, 243, .08);
  color: var(--neon);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
}

.read-more:hover {
  background: rgba(24, 255, 243, .15);
  border-color: rgba(24, 255, 243, .5);
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(24, 255, 243, .3);
}

/* Enhanced Animations - Fade In on Scroll */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px)
  }

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px)
  }

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px)
  }

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px)
  }

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(.9)
  }

  to {
    opacity: 1;
    transform: scale(1)
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px)
  }

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

/* Apply animations to sections */
.hero {
  animation: fadeInUp .8s ease-out
}

.stats-grid {
  animation: fadeInUp 1s ease-out .2s both
}

.section {
  animation: fadeInUp .8s ease-out
}

.card {
  animation: slideUp .6s ease-out;
  will-change: transform, opacity
}

.feature-card {
  animation: scaleIn .6s ease-out both
}

.feature-card:nth-child(1) {
  animation-delay: .1s
}

.feature-card:nth-child(2) {
  animation-delay: .2s
}

.feature-card:nth-child(3) {
  animation-delay: .3s
}

.feature-card:nth-child(4) {
  animation-delay: .4s
}

.step-card {
  animation: fadeInUp .6s ease-out both
}

.step-card:nth-child(1) {
  animation-delay: .1s
}

.step-card:nth-child(2) {
  animation-delay: .3s
}

.step-card:nth-child(3) {
  animation-delay: .5s
}

.testimonial-card {
  animation: fadeInUp .6s ease-out both
}

.testimonial-card:nth-child(1) {
  animation-delay: .15s
}

.testimonial-card:nth-child(2) {
  animation-delay: .3s
}

.testimonial-card:nth-child(3) {
  animation-delay: .45s
}

/* Enhanced Button Active State */
.button:active::before {
  width: 300px;
  height: 300px
}

/* Enhanced Card Glow on Hover */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 1px;
  background: linear-gradient(135deg, transparent, rgba(24, 255, 243, .3), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none
}

.card:hover::before {
  opacity: 1
}

/* Logo pulse animation */
.brand .logo {
  animation: logoPulse 3s ease-in-out infinite
}

@keyframes logoPulse {

  0%,
  100% {
    filter: drop-shadow(0 0 12px rgba(24, 255, 243, .55))
  }

  50% {
    filter: drop-shadow(0 0 20px rgba(24, 255, 243, .85)) drop-shadow(0 0 30px rgba(30, 155, 255, .5))
  }
}

/* Text shimmer animation for titles */
.neon-title {
  background: linear-gradient(90deg, var(--neon), var(--accent), var(--neon));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 3s linear infinite
}

.neon-title.no-glow {
  background: none;
  -webkit-text-fill-color: inherit;
  animation: none
}

@keyframes textShimmer {
  to {
    background-position: 200% center
  }
}

/* Enhanced hover effects for links */
a {
  transition: color .3s ease, transform .3s ease
}

a:hover {
  transform: translateY(-1px)
}

/* Floating animation for emojis - Now handled individually with liquid glass effects */

/* Input focus animation - Enhanced with liquid glass effect */

/* Loading spinner enhancement */
.spinner {
  box-shadow: 0 0 10px rgba(24, 255, 243, .4)
}

/* Skeleton loading shimmer */
@keyframes shimmerSkeleton {
  0% {
    background-position: -200% 0
  }

  100% {
    background-position: 200% 0
  }
}

.skeleton {
  background: linear-gradient(90deg, rgba(24, 255, 243, .06), rgba(24, 255, 243, .12), rgba(24, 255, 243, .06));
  background-size: 200% 100%;
  animation: shimmerSkeleton 1.5s ease-in-out infinite
}


/* Tool Page Specific Styles */
.tool-card {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.tool-input {
  width: 100%;
  padding: 15px 16px 15px 100px;
  font-size: 17px;
  border-radius: 12px;
  border: 2px solid rgba(24, 255, 243, .35);
  background: linear-gradient(135deg, rgba(13, 35, 43, .7), rgba(11, 26, 33, .8));
  color: var(--text);
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .2);
  line-height: 1.5;
  font-family: "Cairo", sans-serif;
}

.tool-input::placeholder {
  color: rgba(157, 223, 236, .45);
  font-size: 16px;
}

.tool-input:hover {
  border-color: rgba(24, 255, 243, .45);
}

.tool-input:focus {
  border-color: rgba(24, 255, 243, .6);
  box-shadow: 0 0 0 4px rgba(24, 255, 243, .15), 0 8px 24px rgba(24, 255, 243, .25), inset 0 1px 2px rgba(0, 0, 0, .15);
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(13, 35, 43, .75), rgba(11, 26, 33, .85));
}

.tool-btn-overlay {
  padding: 9px 16px;
  font-size: 15px;
  border-radius: 10px;
  border: 2px solid rgba(24, 255, 243, .4);
  background: linear-gradient(135deg, rgba(24, 255, 243, .2), rgba(30, 155, 255, .15));
  color: var(--text);
  font-weight: 600;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  white-space: nowrap;
  cursor: pointer;
  z-index: 2;
}

.tool-btn-overlay:hover {
  border-color: rgba(24, 255, 243, .6);
  background: linear-gradient(135deg, rgba(24, 255, 243, .3), rgba(30, 155, 255, .2));
  box-shadow: 0 4px 16px rgba(24, 255, 243, .35), 0 0 20px rgba(24, 255, 243, .2);
  transform: translateY(-50%) scale(1.05);
}

.tool-btn-overlay:active {
  transform: translateY(-50%) scale(0.97);
  box-shadow: 0 2px 8px rgba(24, 255, 243, .3);
}

/* Enhanced Compact Buttons for Tool Page */
.compact-btn {
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 8px;
  border: 1.5px solid rgba(24, 255, 243, .25);
  background: rgba(6, 16, 22, .7);
  color: var(--text);
  font-weight: 500;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  white-space: nowrap;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
}

.compact-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(24, 255, 243, .1), rgba(30, 155, 255, .08));
  opacity: 0;
  transition: opacity .3s ease;
}

.compact-btn:hover {
  border-color: rgba(24, 255, 243, .5);
  background: rgba(13, 35, 43, .9);
  box-shadow: 0 6px 16px rgba(24, 255, 243, .3), 0 0 20px rgba(24, 255, 243, .2);
  transform: translateY(-3px) scale(1.02);
}

.compact-btn:hover::before {
  opacity: 1;
}

.compact-btn:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(24, 255, 243, .4);
}

.compact-btn-theme {
  background: rgba(255, 200, 0, .15);
  border-color: rgba(255, 200, 0, .35);
}

.compact-btn-theme::before {
  background: linear-gradient(135deg, rgba(255, 200, 0, .2), rgba(255, 165, 0, .15));
}

.compact-btn-theme:hover {
  background: rgba(255, 200, 0, .25);
  border-color: rgba(255, 200, 0, .6);
  box-shadow: 0 6px 16px rgba(255, 200, 0, .4), 0 0 20px rgba(255, 200, 0, .3);
}

.compact-btn-save {
  background: rgba(46, 204, 113, .15);
  border-color: rgba(46, 204, 113, .35);
}

.compact-btn-save::before {
  background: linear-gradient(135deg, rgba(46, 204, 113, .2), rgba(39, 174, 96, .15));
}

.compact-btn-save:hover {
  background: rgba(46, 204, 113, .25);
  border-color: rgba(46, 204, 113, .6);
  box-shadow: 0 6px 16px rgba(46, 204, 113, .4), 0 0 20px rgba(46, 204, 113, .3);
}

/* Filter Buttons for Rules Page */
.filter-btn {
  padding: 8px 16px;
  font-size: 14px;
  border-radius: 8px;
  border: 2px solid rgba(24, 255, 243, .3);
  background: rgba(6, 16, 22, .6);
  color: var(--text);
  font-weight: 600;
  transition: all .3s cubic-bezier(.4, 0, .2, 1);
  cursor: pointer;
}

.filter-btn:hover {
  border-color: rgba(24, 255, 243, .5);
  background: rgba(24, 255, 243, .12);
  box-shadow: 0 6px 16px rgba(24, 255, 243, .25);
  transform: translateY(-2px);
  color: var(--neon);
}

.filter-btn.active {
  border-color: rgba(24, 255, 243, .6);
  background: linear-gradient(135deg, rgba(24, 255, 243, .25), rgba(30, 155, 255, .2));
  box-shadow: 0 0 20px rgba(24, 255, 243, .35), inset 0 0 20px rgba(24, 255, 243, .1);
  color: var(--neon);
  font-weight: 700;
}

.filter-btn:active {
  transform: translateY(0);
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed !important;
  bottom: 30px !important;
  left: 30px !important;
  width: 56px !important;
  height: 56px !important;
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.2), rgba(30, 155, 255, 0.2)) !important;
  border: 2px solid rgba(24, 255, 243, 0.5) !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  z-index: 99999 !important;
  opacity: 0;
  visibility: hidden;
  transform: translateY(100px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(24, 255, 243, 0.3), 0 0 40px rgba(24, 255, 243, 0.2) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  pointer-events: auto !important;
}

.scroll-to-top.visible {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) scale(1) !important;
  pointer-events: auto !important;
}

.scroll-to-top:hover {
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.3), rgba(30, 155, 255, 0.3));
  border-color: rgba(24, 255, 243, 0.8);
  box-shadow: 0 6px 30px rgba(24, 255, 243, 0.5), 0 0 60px rgba(24, 255, 243, 0.4);
  transform: translateY(-5px) scale(1.1);
}

.scroll-to-top:active {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 4px 20px rgba(24, 255, 243, 0.4), 0 0 40px rgba(24, 255, 243, 0.3);
}

.scroll-to-top svg {
  width: 24px;
  height: 24px;
  stroke: var(--neon);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  animation: bounce-arrow 2s infinite;
}

@keyframes bounce-arrow {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

.scroll-to-top::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.3), rgba(30, 155, 255, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {

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

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

.scroll-to-top:hover::before {
  opacity: 0.8;
  animation: pulse-glow 1s infinite;
}

/* Responsive sizes for scroll-to-top */
@media (max-width: 1200px) {
  .scroll-to-top {
    width: 52px;
    height: 52px;
    bottom: 25px;
    left: 25px;
  }

  .scroll-to-top svg {
    width: 22px;
    height: 22px;
  }
}

@media (max-width: 768px) {
  .scroll-to-top {
    width: 48px;
    height: 48px;
    bottom: 20px;
    left: 20px;
  }

  .scroll-to-top svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .scroll-to-top {
    width: 44px;
    height: 44px;
    bottom: 16px;
    left: 16px;
  }

  .scroll-to-top svg {
    width: 18px;
    height: 18px;
  }
}

/* Color Toggle Button */
.color-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 14px;
  border-radius: 8px;
  border: 1.5px solid rgba(24, 255, 243, 0.4);
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.15), rgba(30, 155, 255, 0.1));
  color: var(--text);
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  white-space: nowrap;
}

.color-toggle:hover {
  border-color: rgba(24, 255, 243, 0.6);
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.25), rgba(30, 155, 255, 0.15));
  box-shadow: 0 6px 16px rgba(24, 255, 243, 0.3), 0 0 20px rgba(24, 255, 243, 0.2);
  transform: translateY(-2px) scale(1.02);
}

.color-toggle:active {
  transform: translateY(0) scale(0.98);
}

.color-toggle[data-enabled="false"] {
  background: rgba(100, 100, 100, 0.3);
  border-color: rgba(150, 150, 150, 0.4);
  opacity: 0.6;
}

.color-toggle[data-enabled="false"]:hover {
  background: rgba(100, 100, 100, 0.4);
  border-color: rgba(150, 150, 150, 0.5);
}

/* Tool Page Mobile Responsive */
@media (max-width:720px) {

  /* Additional tool-specific overrides - merged with main mobile section above */
  .filter-btn {
    padding: 7px 14px !important;
    font-size: 13px !important;
    border-radius: 7px !important;
  }

  .rules-filter-card {
    padding: 5px 8px !important;
    max-width: 100% !important;
    border-radius: 10px !important;
  }
}

@media (max-width:480px) {

  /* EXTRA SMALL MOBILE - TIGHTER SPACING */
  .container {
    padding: 0 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .section {
    padding: 50px 0 !important;
  }

  .hero {
    padding: 36px 0 !important;
  }

  /* CARDS */
  .card {
    padding: 24px 20px !important;
    margin: 0 auto 26px auto !important;
    border-radius: 14px !important;
  }

  /* TYPOGRAPHY */
  h2 {
    margin-bottom: 22px !important;
    line-height: 1.35 !important;
  }

  h3 {
    margin-bottom: 18px !important;
    line-height: 1.35 !important;
  }

  p {
    margin-bottom: 18px !important;
    line-height: 1.7 !important;
  }

  /* SMALLER BUTTONS */
  .button {
    padding: 11px 18px !important;
    font-size: 14px !important;
  }

  .button.primary {
    padding: 12px 20px !important;
    font-size: 14px !important;
  }

  .button.cta-big {
    padding: 14px 22px !important;
    font-size: 16px !important;
  }

  .compact-btn,
  .color-toggle {
    padding: 9px 13px !important;
    font-size: 13px !important;
  }

  #diacritize-btn {
    padding: 11px 14px !important;
    font-size: 13px !important;
  }

  /* PARSE OUTPUT */
  .parse-output {
    padding: 20px 16px !important;
    margin: 20px 0 0 0 !important;
    border-radius: 12px !important;
  }

  /* TOKENS */
  .token {
    padding: 11px 13px !important;
    margin: 10px 0 !important;
    font-size: 0.9rem !important;
    border-radius: 9px !important;
  }

  /* TOOLTIPS */
  .js-tooltip {
    max-width: 92vw !important;
    padding: 12px 14px !important;
    font-size: 0.85rem !important;
    border-radius: 8px !important;
  }

  /* STATS */
  .stats-grid {
    gap: 24px !important;
    margin: 32px auto !important;
    padding: 0 16px !important;
    align-items: center !important;
  }

  .stat-card {
    padding: 28px 22px !important;
    border-radius: 14px !important;
    max-width: 360px !important;
    margin: 0 auto !important;
  }

  .stat-emoji {
    font-size: 48px !important;
    margin-bottom: 12px !important;
  }

  .stat-number {
    font-size: 40px !important;
    margin: 12px 0 !important;
  }

  .stat-label {
    font-size: 15px !important;
    margin-top: 10px !important;
  }

  .accuracy-bar {
    margin-top: 12px !important;
    height: 7px !important;
  }

  /* TOOL PAGE */
  .tool-card {
    padding: 26px 18px !important;
  }

  .tool-input {
    padding: 15px 100px 15px 16px !important;
    font-size: 15px !important;
  }

  .tool-btn-overlay {
    padding: 11px 14px !important;
    font-size: 13px !important;
  }

  .filter-btn {
    padding: 6px 12px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
  }

  .rules-filter-card {
    padding: 4px 6px !important;
    border-radius: 8px !important;
  }

  /* FEATURE CARDS */
  .feature-card {
    padding: 34px 24px !important;
    max-width: 400px !important;
    margin: 0 auto 28px auto !important;
  }

  /* TESTIMONIAL CARDS */
  .testimonial-card {
    padding: 30px 22px !important;
    max-width: 400px !important;
    margin: 0 auto 28px auto !important;
  }

  /* BLOG CARDS - SMALL MOBILE */
  .blog-card {
    max-width: 380px !important;
    padding: 28px 22px !important;
    min-height: 220px !important;
  }

  #blog-grid,
  #home-posts {
    gap: 24px !important;
    padding: 0 16px !important;
  }

  /* STEP CARDS */
  .step-card {
    padding: 50px 24px 34px !important;
    max-width: 280px !important;
    min-width: 240px !important;
    margin: 0 auto 28px !important;
  }

  /* MOBILE NAV */
  .mobile-nav-header {
    margin-bottom: 24px !important;
    gap: 10px !important;
  }

  .mobile-nav-logo {
    width: 50px !important;
    height: 50px !important;
  }

  .mobile-nav-title {
    font-size: 24px !important;
  }

  .site-nav ul {
    max-width: 320px !important;
    gap: 12px !important;
  }

  .site-nav a {
    padding: 15px 20px !important;
    font-size: 15px !important;
  }

  .nav-back {
    width: 40px !important;
    height: 40px !important;
    font-size: 20px !important;
  }
}

/* ============================================
   SPINNER DOTS ANIMATION
   ============================================ */

.spinner-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}

.spinner-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--neon);
  display: inline-block;
  animation: dotPulse 1.4s infinite ease-in-out;
  box-shadow: 0 0 8px rgba(24, 255, 243, 0.6);
}

.spinner-dots span:nth-child(1) {
  animation-delay: 0s;
}

.spinner-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.spinner-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {

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

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ============================================
   IMAGE MODE ANIMATIONS & PREVIEW
   ============================================ */

/* Input Container Wrapper - Proper Sizing */
#input-container {
  position: relative;
  min-height: 50px;
  width: 100%;
  box-sizing: border-box;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#input-container.image-mode {
  min-height: auto;
}

/* When in image mode, fade out input row */
#input-container.image-mode #input-row {
  opacity: 0;
  transform: scale(0.95) translateY(-10px);
  pointer-events: none;
}

/* Show image preview when in image mode */
#input-container.image-mode #image-preview-container {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Image Preview Wrapper - Fixed Layout */
.image-preview-wrapper {
  position: relative;
  width: 100%;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 5;
  margin-bottom: 16px;
}

.image-preview-wrapper[style*="opacity: 1"] {
  pointer-events: auto;
}

/* Image Preview Card - Proper Sizing */
.image-preview-card {
  position: relative;
  background: linear-gradient(135deg, rgba(13, 35, 43, 0.95), rgba(11, 26, 33, 0.95));
  border: 2px solid rgba(24, 255, 243, 0.4);
  border-radius: 16px;
  padding: 20px;
  padding-bottom: 50px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 40px rgba(24, 255, 243, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  box-sizing: border-box;
}

.image-preview-card:hover {
  border-color: rgba(24, 255, 243, 0.6);
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5), 0 0 60px rgba(24, 255, 243, 0.3);
  transform: translateY(-2px);
}

/* Preview Image Container - Better Sizing */
.preview-image-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  max-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.preview-image {
  width: 100%;
  height: auto;
  max-height: 350px;
  object-fit: contain;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  border-radius: 12px;
  filter: brightness(0.98);
  transition: all 0.3s ease;
  position: relative;
  z-index: 5;
}

.preview-image[src=""],
.preview-image:not([src]) {
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.05), rgba(30, 155, 255, 0.05));
  border: 2px dashed rgba(24, 255, 243, 0.3);
}

.preview-image[src]:not([src=""]) {
  background: transparent;
  border: none;
}

.image-preview-card:hover .preview-image {
  filter: brightness(1);
  transform: scale(1.02);
}

/* Preview Overlay Badge - Fixed Positioning */
.preview-overlay {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0;
  opacity: 1;
  transition: all 0.3s ease;
  z-index: 10;
  pointer-events: none;
}

.image-preview-card:hover .preview-overlay {
  bottom: 10px;
  transform: translateX(-50%) scale(1.05);
}

.preview-badge {
  pointer-events: auto;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.25), rgba(30, 155, 255, 0.2));
  border: 2px solid rgba(24, 255, 243, 0.6);
  border-radius: 12px;
  color: var(--neon);
  font-size: 15px;
  font-weight: 700;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(24, 255, 243, 0.4), 0 0 30px rgba(24, 255, 243, 0.2);
  text-shadow: 0 0 10px rgba(24, 255, 243, 0.6);
}

.preview-badge svg {
  filter: drop-shadow(0 0 6px rgba(24, 255, 243, 0.8));
  width: 22px;
  height: 22px;
}

/* Remove Image Button - Fixed Inside Card */
.remove-image-btn {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.95), rgba(235, 77, 75, 0.95));
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.5);
  z-index: 15;
  opacity: 0.95;
  transform: scale(1);
}

.image-preview-card:hover .remove-image-btn {
  opacity: 1;
  transform: scale(1.05);
}

.remove-image-btn:hover {
  background: linear-gradient(135deg, rgba(255, 71, 87, 1), rgba(255, 107, 107, 1));
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6), 0 0 20px rgba(255, 107, 107, 0.4);
  transform: scale(1.1);
}

.remove-image-btn:active {
  transform: scale(0.95);
}

.remove-image-btn svg {
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Submit button transforms */
#submit-btn {
  position: relative;
  overflow: hidden;
}

#submit-btn.uploading {
  padding-left: 60px !important;
}

#submit-btn #submit-text {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#submit-btn.uploading #submit-text {
  opacity: 0;
  transform: translateX(20px);
}

#submit-btn #submit-icon {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  transition: all 0.3s ease;
}

#submit-btn.uploading #submit-icon {
  display: inline-block !important;
  animation: arrowBounce 1s infinite;
}

@keyframes arrowBounce {

  0%,
  100% {
    transform: translate(-50%, -50%) translateX(0);
  }

  50% {
    transform: translate(-50%, -50%) translateX(-8px);
  }
}

/* Mobile Responsive for Image Preview */
@media (max-width: 720px) {

  /* Reduce card padding */
  .image-preview-card {
    padding: 16px !important;
    padding-bottom: 40px !important;
    border-radius: 14px;
  }

  /* Smaller preview image container */
  .preview-image-container {
    max-height: 250px !important;
    border-radius: 10px;
  }

  /* Smaller preview image */
  .preview-image {
    max-height: 250px !important;
    border-radius: 10px;
  }

  /* Position badge closer to bottom */
  .preview-overlay {
    bottom: 6px !important;
  }

  /* Smaller badge */
  .preview-badge {
    padding: 6px 12px !important;
    font-size: 12px !important;
    gap: 6px !important;
  }

  .preview-badge svg {
    width: 16px !important;
    height: 16px !important;
  }

  /* Smaller remove button */
  .remove-image-btn {
    width: 32px !important;
    height: 32px !important;
    top: 8px !important;
    left: 8px !important;
    opacity: 1 !important;
    transform: scale(1) !important;
  }

  .remove-image-btn svg {
    width: 14px !important;
    height: 14px !important;
  }

  /* Reduce margin below image preview */
  #submit-container {
    margin-top: 8px !important;
  }

  /* Disable hover effects on mobile */
  .image-preview-card:hover {
    transform: none !important;
  }

  .image-preview-card:hover .preview-image {
    transform: none !important;
  }

  .image-preview-card:hover .preview-overlay {
    bottom: 6px !important;
    transform: translateX(-50%) !important;
  }
}

/* ============================================
   IMAGE UPLOAD & CROP MODAL STYLES - MODERN REDESIGN
   ============================================ */

/* Modal Container */
.modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
  opacity: 1;
  visibility: visible;
}

/* Modal Overlay */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Modern Crop Modal */
.modal-content.crop-modal {
  position: relative;
  background: linear-gradient(135deg, rgba(3, 15, 20, 0.98), rgba(3, 15, 20, 0.95));
  border: 1px solid rgba(24, 255, 243, 0.2);
  border-radius: 24px;
  width: 90%;
  max-width: 500px;
  padding: 32px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 60px rgba(24, 255, 243, 0.15);
  transform: scale(0.9) translateY(30px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal.show .modal-content.crop-modal {
  transform: scale(1) translateY(0);
}

/* Close Button */
.crop-modal .modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 24px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  padding: 0;
  line-height: 1;
  z-index: 10;
}

.crop-modal .modal-close:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.4);
  color: #ff6b6b;
  transform: rotate(90deg);
}

/* Crop Workspace */
.crop-workspace {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
}

/* Canvas Wrapper */
.crop-canvas-wrapper {
  position: relative;
  flex: 1;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 1;
  min-width: 250px;
  min-height: 250px;
  border: 2px solid rgba(24, 255, 243, 0.2);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

#crop-canvas {
  max-width: 100%;
  max-height: 100%;
  cursor: move;
  display: block;
}

/* Crop Grid Overlay */
.crop-box {
  position: absolute;
  /* Position set by JavaScript */
  border: 2px solid rgba(24, 255, 243, 0.8);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5), 0 0 20px rgba(24, 255, 243, 0.6);
  cursor: move;
  z-index: 10;
  pointer-events: auto;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.crop-box:hover {
  border-color: rgba(24, 255, 243, 1);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6), 0 0 30px rgba(24, 255, 243, 0.8);
}

.crop-box:active {
  border-color: rgba(0, 255, 255, 1);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65), 0 0 40px rgba(24, 255, 243, 1);
}

/* Rule of thirds grid inside crop box */
.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.grid-line {
  position: absolute;
  background: rgba(24, 255, 243, 0.3);
  pointer-events: none;
}

.grid-line.grid-v-1 {
  left: 33.333%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.grid-line.grid-v-2 {
  left: 66.666%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.grid-line.grid-h-1 {
  top: 33.333%;
  left: 0;
  right: 0;
  height: 1px;
}

.grid-line.grid-h-2 {
  top: 66.666%;
  left: 0;
  right: 0;
  height: 1px;
}

.crop-handle {
  position: absolute;
  width: 16px;
  height: 16px;
  background: #18fff3;
  border: 3px solid #000;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(24, 255, 243, 1), 0 0 4px rgba(255, 255, 255, 0.8);
  pointer-events: auto;
  z-index: 20;
  transition: all 0.2s ease;
}

.crop-handle:hover {
  transform: scale(1.3);
  background: #00d4ff;
  box-shadow: 0 0 20px rgba(24, 255, 243, 1), 0 0 8px rgba(255, 255, 255, 1);
}

.crop-handle.nw {
  top: -8px;
  left: -8px;
  cursor: nw-resize;
}

.crop-handle.ne {
  top: -8px;
  right: -8px;
  cursor: ne-resize;
}

.crop-handle.sw {
  bottom: -8px;
  left: -8px;
  cursor: sw-resize;
}

.crop-handle.se {
  bottom: -8px;
  right: -8px;
  cursor: se-resize;
}

/* Preview Thumbnail */
.crop-preview {
  width: 120px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preview-label {
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  text-align: center;
  font-weight: 500;
}

#preview-canvas {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  border: 2px solid rgba(24, 255, 243, 0.3);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Action Buttons Row */
.crop-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 16px;
  margin-bottom: 20px;
}

.crop-action-btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.1), rgba(30, 155, 255, 0.1));
  border: 1px solid rgba(24, 255, 243, 0.3);
  color: var(--neon);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.crop-action-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(24, 255, 243, 0.2), rgba(30, 155, 255, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.crop-action-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(24, 255, 243, 0.6);
  box-shadow: 0 8px 20px rgba(24, 255, 243, 0.3), 0 0 20px rgba(24, 255, 243, 0.2);
}

.crop-action-btn:hover::before {
  opacity: 1;
}

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

.crop-action-btn svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 4px rgba(24, 255, 243, 0.5));
}

/* Footer Buttons - Optimized Layout */
.crop-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  width: 100%;
  box-sizing: border-box;
}

.crop-btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  flex-shrink: 0;
}

.cancel-btn {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cancel-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  transform: translateY(-2px);
}

.save-btn {
  background: linear-gradient(135deg, #18fff3, #00d4ff);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(24, 255, 243, 0.35);
}

.save-btn:hover {
  box-shadow: 0 6px 20px rgba(24, 255, 243, 0.5);
  transform: translateY(-2px);
  filter: brightness(1.05);
}

.save-btn:active {
  transform: translateY(0) scale(0.98);
  transition: all 0.1s ease;
}

/* Mobile Responsive */
@media (max-width: 720px) {
  .modal-content.crop-modal {
    width: 95%;
    max-width: none;
    padding: 24px;
    border-radius: 20px;
  }

  .crop-workspace {
    flex-direction: column;
    gap: 16px;
  }

  .crop-preview {
    width: 100%;
    max-width: 150px;
    margin: 0 auto;
  }

  .crop-actions {
    gap: 6px;
    padding: 12px;
    flex-wrap: wrap;
  }

  .crop-action-btn {
    width: 40px;
    height: 40px;
  }

  .crop-footer {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .crop-btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    box-sizing: border-box;
    padding: 14px 20px;
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .modal-content.crop-modal {
    max-width: 600px;
  }
}

/* ============================================
   NEW UI ENHANCEMENTS
   ============================================ */

/* 3D Tilt Effect Styles */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

.tilt-content {
  transform: translateZ(20px);
}

/* Text Reveal Animation */
.reveal-text {
  position: relative;
  overflow: hidden;
  display: block;
}

.reveal-text span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  animation: revealUp 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

@keyframes revealUp {
  0% {
    transform: translateY(100%);
    opacity: 0;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Staggered delays for reveal text */
.reveal-delay-1 {
  animation-delay: 0.1s;
}

.reveal-delay-2 {
  animation-delay: 0.2s;
}

.reveal-delay-3 {
  animation-delay: 0.3s;
}

/* Footer Enhancements */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
  text-align: right;
}

.footer-col h4 {
  color: var(--neon);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

/* Glassmorphism Refinements */
.glass-panel {
  background: rgba(13, 35, 43, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(24, 255, 243, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }

  .footer-col h4 {
    margin-bottom: 15px;
  }

  /* Disable tilt effect on mobile */
  .tilt-card {
    transform: none !important;
    transition: transform 0.3s ease !important;
  }

  .tilt-card:hover {
    transform: translateY(-5px) !important;
  }

  .tilt-content {
    transform: none !important;
  }
}

/* ============================================
   PERFORMANCE MODE - DISABLE ANIMATIONS
   ============================================ */

/* When performance mode is enabled, disable all resource-intensive effects */
body.performance-mode .blob {
  opacity: 0 !important;
  animation: none !important;
  display: none;
}

body.performance-mode .particles,
body.performance-mode #particles-container {
  display: none !important;
  opacity: 0 !important;
}

body.performance-mode .particle {
  display: none !important;
  animation: none !important;
}

body.performance-mode .tilt-card {
  transform: none !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

body.performance-mode .tilt-card:hover {
  transform: translateY(-4px) !important;
}

body.performance-mode .reveal-text span {
  animation: none !important;
  transform: none !important;
  opacity: 1 !important;
}

body.performance-mode .bg-animated {
  background: #000000 !important;
}

/* Simplify animations for better performance */
body.performance-mode * {
  animation-duration: 0.3s !important;
}

body.performance-mode .glow {
  animation: none !important;
}

/* Disable logo animations in performance mode */
body.performance-mode .brand .logo {
  filter: drop-shadow(0 0 8px rgba(24, 255, 243, 0.4)) !important;
  animation: none !important;
  transition: none !important;
}

body.performance-mode .brand:hover .logo {
  filter: drop-shadow(0 0 8px rgba(24, 255, 243, 0.4)) !important;
  transform: none !important;
  animation: none !important;
}