/* =============================================================================
   TennisHub Website - Advanced CSS Styling
   "Where Code Meets Court" - Visually Stunning Tennis-Themed Design
   ============================================================================= */

/* CSS Custom Properties - Design System */
:root {
  /* Color Palette */
  --tennis-green: #DAFF01;
  --tennis-green-dark: #B8D001;
  --court-blue: #0A2540;
  --court-blue-light: #1a3a52;
  --sky-blue: #00D4FF;
  --champion-gold: #FFD700;
  --champion-gold-dark: #DAA520;

  /* Realistic Tennis Ball Colors */
  --tennis-ball-yellow: #E5FF00;
  --tennis-ball-yellow-light: #FFFF99;
  --tennis-ball-yellow-dark: #C5D800;
  --tennis-ball-seam: #FFFFFF;
  --tennis-ball-shadow: rgba(229, 255, 0, 0.4);

  /* Glass & Transparency */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(20px) saturate(180%);

  /* Shadows & Glows */
  --neon-glow: 0 0 30px rgba(218, 255, 1, 0.6), 0 0 60px rgba(218, 255, 1, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;

  /* Spacing */
  --container-max: 1200px;
  --container-padding: clamp(1rem, 5vw, 2rem);
  --section-padding: clamp(4rem, 10vh, 8rem);

  /* Animation */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-quart: cubic-bezier(0.76, 0, 0.24, 1);
  --spring: cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
}

/* Modern CSS Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: clamp(16px, 1.2vw, 18px);
}

body {
  font-family: var(--font-family);
  line-height: 1.6;
  color: #ffffff;
  background: var(--court-blue);
  overflow-x: hidden;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at top left, rgba(218, 255, 1, 0.05), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(0, 212, 255, 0.08), transparent 50%),
    linear-gradient(135deg, var(--court-blue), var(--court-blue-light));
  background-attachment: fixed;
}

/* Selection styles */
::selection {
  background: var(--tennis-green);
  color: var(--court-blue);
}

::-moz-selection {
  background: var(--tennis-green);
  color: var(--court-blue);
}

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--tennis-green);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--tennis-green);
  color: var(--court-blue);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  z-index: 1000;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 6px;
}

/* =============================================================================
   TENNIS PARTICLE SYSTEM
   ============================================================================= */

.tennis-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.tennis-ball {
  position: absolute;
  width: 40px;
  height: 40px;
  background:
    /* Realistic tennis ball gradient */
    radial-gradient(circle at 25% 25%, var(--tennis-ball-yellow-light), var(--tennis-ball-yellow)),
    radial-gradient(circle at 75% 75%, var(--tennis-ball-yellow-dark), transparent);
  border-radius: 50%;
  opacity: 0.7;
  animation: float var(--duration, 20s) var(--delay, 0s) infinite linear;

  /* Fuzzy texture effect */
  box-shadow:
    /* Inner texture shadows for fuzziness */
    inset 0 0 0 1px rgba(255, 255, 255, 0.3),
    inset 1px 1px 2px rgba(255, 255, 255, 0.2),
    inset -1px -1px 2px rgba(0, 0, 0, 0.1),
    /* Outer glow */
    0 0 15px var(--tennis-ball-shadow),
    /* Multiple small shadows for texture */
    0 0 1px rgba(255, 255, 255, 0.4),
    1px 1px 1px rgba(0, 0, 0, 0.1);
}

.tennis-ball::before {
  content: '';
  position: absolute;
  top: 8%;
  left: 15%;
  width: 70%;
  height: 45%;
  border: 1.5px solid var(--tennis-ball-seam);
  border-top: 1.5px solid transparent;
  border-bottom: 1.5px solid transparent;
  border-radius: 50%;
  transform: rotate(-20deg) scaleY(0.6);
  box-shadow:
    0 0 2px rgba(255, 255, 255, 0.7),
    inset 0 0 1px rgba(255, 255, 255, 0.9);
  opacity: 0.95;
}

.tennis-ball::after {
  content: '';
  position: absolute;
  top: 47%;
  left: 15%;
  width: 70%;
  height: 45%;
  border: 1.5px solid var(--tennis-ball-seam);
  border-top: 1.5px solid transparent;
  border-bottom: 1.5px solid transparent;
  border-radius: 50%;
  transform: rotate(20deg) scaleY(0.6);
  box-shadow:
    0 0 2px rgba(255, 255, 255, 0.7),
    inset 0 0 1px rgba(255, 255, 255, 0.9);
  opacity: 0.95;
}

@keyframes float {
  0% {
    transform: translateY(100vh) translateX(-50px) rotate(0deg);
  }
  100% {
    transform: translateY(-100px) translateX(50px) rotate(360deg);
  }
}

/* =============================================================================
   NAVIGATION
   ============================================================================= */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(10, 37, 64, 0.8);
  backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: all 0.3s var(--ease-out-quart);
}

.navbar.scrolled {
  background: rgba(10, 37, 64, 0.95);
  box-shadow: var(--glass-shadow);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 1rem var(--container-padding);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--tennis-green);
  text-decoration: none;
}

.logo-icon {
  font-size: 1.5rem;
  animation: spin 20s linear infinite;
}

.logo-text {
  background: linear-gradient(135deg, var(--tennis-green), var(--sky-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s var(--ease-out-quart);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--tennis-green);
  transition: width 0.3s var(--ease-out-quart);
}

.nav-link:hover {
  color: var(--tennis-green);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 0.5rem;
}

.nav-mobile-toggle span {
  width: 24px;
  height: 3px;
  background: var(--tennis-green);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out-quart);
}

/* =============================================================================
   HERO SECTION
   ============================================================================= */

.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
}

.gradient-mesh {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(218, 255, 1, 0.15), transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(0, 212, 255, 0.15), transparent 50%),
    radial-gradient(ellipse at 40% 40%, rgba(255, 215, 0, 0.1), transparent 50%);
  animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { filter: hue-rotate(0deg); }
  50% { filter: hue-rotate(30deg); }
}

.court-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.1;
  background-image:
    linear-gradient(90deg, transparent 49%, rgba(255, 255, 255, 0.3) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(255, 255, 255, 0.3) 50%, transparent 51%);
  background-size: 100px 100px;
  animation: courtLines 30s linear infinite;
}

@keyframes courtLines {
  0% { transform: translateX(0) translateY(0); }
  100% { transform: translateX(100px) translateY(100px); }
}

.hero-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-padding);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  min-height: 100vh;
}

.hero-content {
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  opacity: 0;
  transform: translateY(50px);
  animation: titleReveal 0.8s var(--spring) forwards;
}

.title-line:nth-child(2) {
  animation-delay: 0.2s;
}

.title-line:nth-child(3) {
  animation-delay: 0.4s;
}

.title-line.highlight {
  background: linear-gradient(135deg, var(--tennis-green), var(--sky-blue), var(--champion-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.title-line.highlight::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tennis-green), var(--sky-blue));
  border-radius: 2px;
  opacity: 0;
  animation: underlineReveal 0.8s var(--ease-out-quart) 0.8s forwards;
}

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

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

.hero-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 3rem;
  max-width: 500px;
  line-height: 1.6;
}

.hero-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s var(--ease-out-quart);
  min-width: 120px;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow:
    var(--glass-shadow),
    0 0 30px rgba(218, 255, 1, 0.2);
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--tennis-green);
  display: block;
  line-height: 1;
}

.stat-label {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.5rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--tennis-green), var(--tennis-green-dark));
  color: var(--court-blue);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out-quart);
  box-shadow:
    0 4px 20px rgba(218, 255, 1, 0.3),
    0 0 0 0 rgba(218, 255, 1, 0.5);
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 8px 30px rgba(218, 255, 1, 0.4),
    0 0 0 8px rgba(218, 255, 1, 0.1);
}

.neon-button {
  animation: neonPulse 2s ease-in-out infinite alternate;
}

@keyframes neonPulse {
  from {
    box-shadow:
      0 4px 20px rgba(218, 255, 1, 0.3),
      0 0 30px rgba(218, 255, 1, 0.2);
  }
  to {
    box-shadow:
      0 4px 20px rgba(218, 255, 1, 0.5),
      0 0 50px rgba(218, 255, 1, 0.4);
  }
}

.button-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.cta-button:hover .button-shimmer {
  left: 100%;
}

.cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s var(--ease-out-quart);
  padding: 1rem 0;
}

.cta-secondary:hover {
  color: var(--tennis-green);
}

.arrow {
  transition: transform 0.3s var(--ease-out-quart);
}

.cta-secondary:hover .arrow {
  transform: translateY(3px);
}

.hero-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.floating-tennis-ball {
  position: relative;
  width: 300px;
  height: 300px;
  animation: float-gentle 6s ease-in-out infinite;
}

.tennis-ball-3d {
  width: 100%;
  height: 100%;
  background:
    /* Realistic 3D tennis ball gradients */
    radial-gradient(circle at 25% 25%, var(--tennis-ball-yellow-light), var(--tennis-ball-yellow)),
    radial-gradient(circle at 75% 75%, var(--tennis-ball-yellow-dark), transparent),
    radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.4), transparent);
  border-radius: 50%;
  position: relative;
  box-shadow:
    /* Main shadow */
    0 25px 60px rgba(0, 0, 0, 0.4),
    /* Tennis ball glow */
    0 0 120px var(--tennis-ball-shadow),
    /* Inner highlights for 3D effect */
    inset 0 0 60px rgba(255, 255, 255, 0.2),
    inset -20px -20px 40px rgba(0, 0, 0, 0.1),
    /* Fuzzy texture shadows */
    inset 2px 2px 4px rgba(255, 255, 255, 0.3),
    inset -2px -2px 4px rgba(0, 0, 0, 0.1);
  animation: rotateBall 20s linear infinite;
}

.tennis-ball-3d::before {
  content: '';
  position: absolute;
  top: 12%;
  left: 15%;
  width: 70%;
  height: 40%;
  border: 3px solid var(--tennis-ball-seam);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-radius: 50%;
  transform: rotate(-25deg) scaleY(0.7);
  box-shadow:
    /* Seam glow */
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(255, 255, 255, 0.5),
    /* Inner seam depth */
    inset 0 0 6px rgba(255, 255, 255, 1.0),
    inset 0 0 12px rgba(0, 0, 0, 0.3);
  opacity: 0.95;
  animation: seamRotate1 20s linear infinite;
}

.tennis-ball-3d::after {
  content: '';
  position: absolute;
  top: 48%;
  left: 15%;
  width: 70%;
  height: 40%;
  border: 3px solid var(--tennis-ball-seam);
  border-top: 3px solid transparent;
  border-bottom: 3px solid transparent;
  border-radius: 50%;
  transform: rotate(25deg) scaleY(0.7);
  box-shadow:
    /* Seam glow */
    0 0 10px rgba(255, 255, 255, 0.9),
    0 0 20px rgba(255, 255, 255, 0.5),
    /* Inner seam depth */
    inset 0 0 6px rgba(255, 255, 255, 1.0),
    inset 0 0 12px rgba(0, 0, 0, 0.3);
  opacity: 0.95;
  animation: seamRotate2 20s linear infinite;
}

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

@keyframes rotateBall {
  from { transform: rotateY(0deg); }
  to { transform: rotateY(360deg); }
}

@keyframes seamRotate1 {
  0% { transform: rotate(-25deg) scaleY(0.7); opacity: 0.95; }
  25% { transform: rotate(-20deg) scaleY(0.8); opacity: 1.0; }
  50% { transform: rotate(-25deg) scaleY(0.6); opacity: 0.8; }
  75% { transform: rotate(-30deg) scaleY(0.8); opacity: 1.0; }
  100% { transform: rotate(-25deg) scaleY(0.7); opacity: 0.95; }
}

@keyframes seamRotate2 {
  0% { transform: rotate(25deg) scaleY(0.7); opacity: 0.95; }
  25% { transform: rotate(30deg) scaleY(0.8); opacity: 1.0; }
  50% { transform: rotate(25deg) scaleY(0.6); opacity: 0.8; }
  75% { transform: rotate(20deg) scaleY(0.8); opacity: 1.0; }
  100% { transform: rotate(25deg) scaleY(0.7); opacity: 0.95; }
}

/* SVG Tennis Ball Styles */
.tennis-ball-svg {
  width: 100%;
  height: 100%;
  max-width: 300px;
  max-height: 300px;
  animation: rotateBall 20s linear infinite;
}

.tennis-seam {
  animation: seamPulse 8s ease-in-out infinite;
}

@keyframes seamPulse {
  0%, 100% {
    opacity: 0.95;
    stroke-width: 6;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
  }
  50% {
    opacity: 1.0;
    stroke-width: 7;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
  }
}

/* Small SVG Tennis Balls for Background Animation */
.tennis-ball-svg-small {
  position: absolute;
  width: 40px;
  height: 40px;
  opacity: 0.7;
  animation: float var(--duration, 20s) var(--delay, 0s) infinite linear;
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  animation: bounce 2s infinite;
}

.scroll-ball {
  width: 8px;
  height: 8px;
  background: var(--tennis-green);
  border-radius: 50%;
  animation: scrollBounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-10px); }
  60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes scrollBounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-15px); }
  60% { transform: translateY(-8px); }
}

/* =============================================================================
   LOADING ANIMATIONS
   ============================================================================= */

.loading {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s var(--ease-out-quart);
}

.loaded {
  opacity: 1;
  transform: translateY(0);
}

.loading[style*="--delay"] {
  transition-delay: var(--delay);
}

/* =============================================================================
   SECTIONS LAYOUT
   ============================================================================= */

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

section {
  padding: var(--section-padding) 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #ffffff, rgba(255, 255, 255, 0.8));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-title.gold {
  background: linear-gradient(135deg, var(--champion-gold), var(--champion-gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255, 255, 255, 0.7);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* =============================================================================
   FEATURES SECTION
   ============================================================================= */

.features {
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.02), transparent 70%);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: all 0.5s var(--ease-out-quart);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--tennis-green), var(--sky-blue));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out-quart);
}

.feature-card:hover {
  transform: translateY(-10px);
  box-shadow:
    var(--glass-shadow),
    0 20px 50px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(218, 255, 1, 0.2);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 0 20px rgba(218, 255, 1, 0.3));
  transition: all 0.3s var(--ease-out-quart);
}

.feature-card:hover .feature-icon {
  transform: scale(1.1) rotateY(10deg);
  filter: drop-shadow(0 0 30px rgba(218, 255, 1, 0.5));
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffffff;
}

.feature-description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.feature-tech {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tech-tag {
  background: rgba(218, 255, 1, 0.1);
  color: var(--tennis-green);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(218, 255, 1, 0.2);
}

/* =============================================================================
   COMMANDS SECTION
   ============================================================================= */

.commands {
  background:
    linear-gradient(135deg, rgba(10, 37, 64, 0.8), rgba(26, 58, 82, 0.8)),
    radial-gradient(ellipse at top, rgba(0, 212, 255, 0.1), transparent 50%);
}

.command-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-quart);
  font-family: inherit;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--tennis-green);
  color: var(--court-blue);
  border-color: var(--tennis-green);
  transform: translateY(-2px);
}

.command-search {
  position: relative;
  max-width: 400px;
  margin: 0 auto 3rem;
}

.command-search input {
  width: 100%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem 1rem 1rem 3rem;
  color: #ffffff;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s var(--ease-out-quart);
}

.command-search input:focus {
  outline: none;
  border-color: var(--tennis-green);
  box-shadow: 0 0 0 3px rgba(218, 255, 1, 0.1);
}

.command-search input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
}

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

.command-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s var(--ease-out-quart);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.command-card:hover {
  transform: translateY(-5px) rotateX(5deg);
  box-shadow:
    var(--glass-shadow),
    0 20px 40px rgba(0, 0, 0, 0.2);
}

.command-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.command-name {
  font-family: var(--font-mono);
  color: var(--tennis-green);
  font-weight: 700;
  font-size: 1.1rem;
  background: rgba(218, 255, 1, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.command-category {
  background: var(--sky-blue);
  color: var(--court-blue);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

.command-description {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.command-example {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 1rem;
  border-left: 3px solid var(--tennis-green);
}

.discord-message {
  font-family: var(--font-family);
}

.message-content {
  color: rgba(255, 255, 255, 0.9);
}

.embed {
  background: rgba(47, 49, 54, 0.8);
  border-left: 4px solid var(--tennis-green);
  border-radius: 4px;
  padding: 1rem;
  margin: 0.5rem 0;
}

.embed-title {
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.embed-field {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.4;
}

.commands-cta {
  text-align: center;
  padding: 3rem 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  margin-top: 3rem;
}

.commands-cta p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.cta-button.secondary {
  background: transparent;
  border: 2px solid var(--tennis-green);
  color: var(--tennis-green);
}

.cta-button.secondary:hover {
  background: var(--tennis-green);
  color: var(--court-blue);
}

/* =============================================================================
   PREMIUM SECTION
   ============================================================================= */

.premium {
  position: relative;
  background:
    linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(218, 165, 32, 0.05)),
    radial-gradient(ellipse at center, rgba(255, 215, 0, 0.05), transparent 70%);
}

.premium-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
}

.premium-gradient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(255, 215, 0, 0.1), transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(218, 165, 32, 0.1), transparent 50%);
  animation: premiumShimmer 15s ease-in-out infinite;
}

@keyframes premiumShimmer {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.premium-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.premium-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 2px solid rgba(255, 215, 0, 0.3);
  border-radius: var(--radius-xl);
  padding: 3rem;
  box-shadow:
    var(--glass-shadow),
    0 0 50px rgba(255, 215, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.premium-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--champion-gold), var(--champion-gold-dark));
}

.premium-header {
  text-align: center;
  margin-bottom: 2rem;
}

.premium-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--champion-gold);
  margin-bottom: 1rem;
}

.premium-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
}

.price-amount {
  font-size: 3rem;
  font-weight: 800;
  color: #ffffff;
}

.price-period {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
}

.premium-features {
  margin-bottom: 2rem;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.5rem 0;
}

.feature-icon {
  color: var(--champion-gold);
  font-size: 1.2rem;
}

.feature-text {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.premium-button {
  width: 100%;
  background: linear-gradient(135deg, var(--champion-gold), var(--champion-gold-dark));
  color: var(--court-blue);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.2rem;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out-quart);
  box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
  display: block;
}

.premium-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(255, 215, 0, 0.4);
}

.comparison-table {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
}

.comparison-table table {
  width: 100%;
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.comparison-table th {
  background: rgba(255, 255, 255, 0.05);
  font-weight: 700;
  color: var(--tennis-green);
}

.comparison-table td {
  color: rgba(255, 255, 255, 0.9);
}

.comparison-table .check {
  color: var(--champion-gold);
}

.comparison-table .cross {
  color: #ff6b6b;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.footer {
  background:
    linear-gradient(135deg, var(--court-blue), #051122),
    radial-gradient(ellipse at bottom, rgba(218, 255, 1, 0.05), transparent 50%);
  position: relative;
  overflow: hidden;
}

.footer-waves {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  overflow: hidden;
}

.footer-waves svg {
  width: 100%;
  height: 100%;
  fill: rgba(218, 255, 1, 0.1);
  animation: waveMotion 20s ease-in-out infinite;
}

@keyframes waveMotion {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-50px); }
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  padding: 6rem 0 3rem;
}

.footer-section {
  position: relative;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--tennis-green);
  margin-bottom: 1rem;
}

.footer-description {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  max-width: 300px;
}

.footer-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 1.5rem;
  position: relative;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--tennis-green);
  border-radius: 2px;
}

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

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

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s var(--ease-out-quart);
  position: relative;
}

.footer-links a:hover {
  color: var(--tennis-green);
  padding-left: 5px;
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  transition: all 0.3s var(--ease-out-quart);
  font-size: 1.2rem;
}

.social-link:hover {
  background: var(--tennis-green);
  color: var(--court-blue);
  transform: translateY(-3px);
  box-shadow: 0 5px 20px rgba(218, 255, 1, 0.3);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copyright p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
}

.footer-badge span {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

/* =============================================================================
   UTILITY COMPONENTS
   ============================================================================= */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: var(--tennis-green);
  color: var(--court-blue);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(218, 255, 1, 0.3);
  transition: all 0.3s var(--ease-out-quart);
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  font-size: 1.5rem;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(218, 255, 1, 0.4);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1001;
}

.progress-ball {
  height: 100%;
  background: linear-gradient(90deg, var(--tennis-green), var(--sky-blue));
  border-radius: 0 2px 2px 0;
  transition: width 0.1s ease;
  position: relative;
}

.progress-ball::after {
  content: '🎾';
  position: absolute;
  right: -10px;
  top: -8px;
  font-size: 20px;
  filter: drop-shadow(0 0 10px rgba(218, 255, 1, 0.5));
}

/* =============================================================================
   RESPONSIVE DESIGN
   ============================================================================= */

@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    padding: var(--container-padding);
  }

  /* Ensure hero visual doesn't overflow */
  .hero-visual {
    max-width: 100%;
    overflow: hidden;
  }

  .premium-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  }

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

@media (max-width: 768px) {
  :root {
    --section-padding: clamp(3rem, 8vh, 5rem);
  }

  .nav-menu {
    display: none;
  }

  .nav-mobile-toggle {
    display: flex;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-cta {
    justify-content: center;
  }

  /* Fix hero text overlap issues */
  .hero-title {
    line-height: 1.2;
    margin-bottom: 2rem;
  }

  .title-line.highlight::after {
    bottom: -8px;
    height: 3px;
  }

  /* Fix tennis ball sizing and positioning */
  .floating-tennis-ball {
    width: 250px;
    height: 250px;
    margin: 0 auto;
  }

  /* Fix premium section alignment */
  .premium-content {
    text-align: center;
    gap: 1.5rem;
  }

  .premium-card {
    margin: 0 auto;
    max-width: 100%;
  }

  .command-filters {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .back-to-top {
    bottom: 1rem;
    right: 1rem;
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
  }

  /* Further adjust title line spacing for very small screens */
  .title-line.highlight::after {
    bottom: -6px;
    height: 2px;
    left: 10%;
    right: 10%;
  }

  .stat-card {
    min-width: 100px;
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .cta-button {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
  }

  /* Fix tennis ball for small screens */
  .floating-tennis-ball {
    width: 180px;
    height: 180px;
    margin: 0 auto;
  }

  .feature-card,
  .command-card {
    padding: 1.5rem;
  }

  .premium-card {
    padding: 1.5rem;
    margin: 0 1rem;
  }

  /* Fix small floating tennis balls */
  .tennis-ball {
    width: 25px;
    height: 25px;
  }

  /* Ensure premium section doesn't shift */
  .premium {
    padding-left: 0;
    padding-right: 0;
  }
}

/* =============================================================================
   ACCESSIBILITY & PERFORMANCE
   ============================================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .tennis-particles {
    display: none;
  }

  .floating-tennis-ball {
    animation: none;
  }

  .tennis-ball-3d {
    animation: none;
  }
}

@media (prefers-color-scheme: light) {
  /* Light mode adjustments if needed */
  .glass-bg {
    --glass-bg: rgba(255, 255, 255, 0.1);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .feature-card,
  .command-card,
  .premium-card {
    border-width: 2px;
  }

  .nav-link::after {
    height: 3px;
  }
}

/* =============================================================================
   CSS CONTAINMENT FOR PERFORMANCE
   ============================================================================= */

.feature-card,
.command-card,
.premium-card {
  contain: layout style paint;
}

.tennis-particles {
  contain: layout style paint;
  will-change: transform;
}

.hero-visual {
  contain: layout style paint;
}

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
  .tennis-particles,
  .nav-mobile-toggle,
  .back-to-top,
  .scroll-progress,
  .scroll-indicator {
    display: none !important;
  }

  .hero,
  .features,
  .commands,
  .premium {
    break-inside: avoid;
  }

  .cta-button {
    color: var(--court-blue) !important;
    text-decoration: underline;
  }
}

/* =============================================================================
   CUSTOM SCROLLBAR
   ============================================================================= */

::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--court-blue);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--tennis-green), var(--tennis-green-dark));
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--tennis-green-dark), var(--tennis-green));
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--tennis-green) var(--court-blue);
}

/* =============================================================================
   END OF STYLES
   ============================================================================= */