/* ======= CSS VARIABLES ======= */
:root {
  /* Website Color Palette */
  --color-primary-green: #7ED4AD;
  --color-primary-blue: #87CEEB;
  --color-accent-green: #B8E6B8;
  --color-accent-blue: #B0E0E6;
  --color-dark: #2C3E50;
  --color-light: #F7FFFE;
  --color-white: #FFFFFF;
  --color-tennis-yellow: #FFE066;
  --color-gray-light: #F3F4F6;
  --color-gray-medium: #9CA3AF;

  /* Legacy colors for transition */
  --color-accent: var(--color-tennis-yellow);
  
  /* Fonts */
  --font-primary: 'Source Sans Pro', sans-serif;
  --font-accent: 'Bangers', cursive;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* ======= GLOBAL STYLES ======= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body, html {
  height: 100%;
  font-family: var(--font-primary);
  scroll-behavior: smooth;
  font-weight: 700;
  font-style: italic;
  color: var(--color-dark);
  background-color: var(--color-light);
  line-height: 1.6;
  /* Add scroll snap functionality
  scroll-snap-type: y mandatory;
  overflow-y: scroll; */
}

button, input, select {
  font-family: var(--font-primary);
  font-weight: 400;
  font-style: italic;
}

/* Remove default italic styling */
body, html, button, input, p, h1, h2, h3, h4, h5, h6 {
  font-style: italic;
}

/* ======= TYPOGRAPHY ======= */
h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--color-dark);
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--color-dark);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

p {
  font-size: 1.125rem;
  line-height: 1.75;
  margin-bottom: 1rem;
  color: var(--color-dark);
}

/* ======= LAYOUT ======= */
.landing {
  height: 100vh;
  background: linear-gradient(135deg, var(--color-primary-blue) 0%, var(--color-primary-green) 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
  /* scroll-snap-align: start; */
}

/* tennis court pattern overlay */
.landing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 100px,
      rgba(255, 255, 255, 0.03) 100px,
      rgba(255, 255, 255, 0.03) 102px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 100px,
      rgba(255, 255, 255, 0.03) 100px,
      rgba(255, 255, 255, 0.03) 102px
    );
  pointer-events: none;
}

.content {
  min-height: 100vh;
  background-color: var(--color-light);
  padding: 60px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  /* Add scroll snap alignment
  scroll-snap-align: start; */
}

.content-inner {
  max-width: 1200px;
  text-align: center;
}

/* .snap-section {
  scroll-snap-align: start;
  min-height: 100vh;
} */

/* ======= COMPONENTS ======= */
/* Card Section */
.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

/* Buttons Style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-green));
  color: var(--color-white);
}

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

.btn-secondary {
  background: var(--color-white);
  color: var(--color-primary-green);
  border: 2px solid var(--color-primary-green);
}

.btn-secondary:hover {
  background: var(--color-primary-green);
  color: var(--color-white);
}

/* Title */
.title {
  text-align: center;
  position: relative;
  z-index: 10;
}

.text {
  opacity: 0;
  transform: translateY(30px);
  transition: all 1s ease;
}

#tennis {
  font-family: var(--font-primary);
  font-size: clamp(4rem, 10vw, 7rem);
  font-weight: 800;
  color: var(--color-white);
  transform: rotate(-3deg);
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
  letter-spacing: -0.02em;
}

#for {
  font-family: var(--font-accent);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--color-tennis-yellow);
  margin-left: 20px;
  letter-spacing: 1px;
  transform: rotate(-5deg);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

#dummies {
  font-family: var(--font-accent);
  font-size: clamp(3rem, 8vw, 6rem);
  color: var(--color-tennis-yellow);
  text-transform: uppercase;
  margin-top: -25px;
  letter-spacing: 2px;
  transform: rotate(-8deg);
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
}

/* Cursor Menu */
.cursor-menu {
  position: fixed;
  top: 80px;
  right: 20px;
  background-color: var(--color-white);
  padding: 12px;
  border-radius: var(--radius-lg);
  z-index: 100;
  box-shadow: var(--shadow-md);
  display: flex;
  gap: 8px;
}

.cursor-option {
  width: 36px;
  height: 36px;
  background-color: var(--color-gray-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
}

.cursor-option:hover {
  transform: scale(1.1);
  background-color: var(--color-accent-blue);
}

.cursor-option img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.cursor-option.active {
  border-color: var(--color-primary-green);
  background-color: var(--color-accent-green);
}

.arrow {
  position: absolute;
  bottom: 70px;
  left: 50%;
  /* transform: translateX(-50%); */
  animation: bounce 2s infinite;
  cursor: pointer;
  background: var(--color-white);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}

.arrow svg {
  width: 24px;
  height: 24px;
  fill: var(--color-primary-green);
}

/* Tennis Info Box  */
.tennis-info-box {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-base);
}

.tennis-info-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary-blue), var(--color-primary-green));
}

.tennis-info-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* ======= ANIMATIONS & STATES ======= */
/* Show animations */
.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

#tennis.show {
  transform: translateY(0) rotate(-3deg) !important;
}

#for.show {
  transform: translateY(0) rotate(-5deg) !important;
}

#dummies.show {
  transform: translateY(0) rotate(-8deg) !important; 
}

/* Bounce animation */
@keyframes bounce {
  0%, 100% {
    transform: translateY(0) translateX(-50%);
  }
  50% {
    transform: translateY(-15px) translateX(-50%);
  }
}

/* Fade in animation */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide in animations */
@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Utility Classes */
.animate-fade-in {
  animation: fadeIn 0.6s ease forwards;
}

.animate-slide-left {
  animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-right {
  animation: slideInRight 0.6s ease forwards;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--color-primary-blue), var(--color-primary-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Section Styling */
.section {
  padding: 80px 0;
  position: relative;
}

.section-alt {
  background-color: var(--color-gray-light);
}

  /* ==== Players Overview ===== */

  .countrymap-popup-arrow {
    position: absolute;
    bottom: -10px; /* places it under the popup */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 10px solid white; /* match popup background */
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  }

  .countrymap-gridjs-container {
    max-height: 300px;
    overflow-y: auto !important;
  }

  .gridjs-table td:first-child,
  .gridjs-table th:first-child {
    width: 35px;           /* shrink as much as possible */
    white-space: nowrap;  /* prevent wrapping */
    max-width: 35px;       /* limit max width */
    overflow: hidden;     /* hide overflow */
    text-overflow: ellipsis; /* add ellipsis if content is too long */
  }

  .gridjs-tbody .gridjs-td {
    cursor: pointer;
  }

  .gridjs-tbody .gridjs-td:hover {
    background-color: #f0f8ff;
    transition: background-color 0.2s ease-in-out;
  }
