/* ================================================================
   Zynta — Design System & Global Styles
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ─── CSS Custom Properties ─────────────────────────────────────── */
:root {
  /* Primary palette */
  --clr-primary: #10b981;
  --clr-primary-light: #34d399;
  --clr-primary-dark: #059669;
  --clr-primary-glow: rgba(16, 185, 129, 0.35);

  /* Accent */
  --clr-accent: #6366f1;
  --clr-accent-light: #818cf8;

  /* Neutrals (dark theme) */
  --clr-bg: #0a0f1a;
  --clr-surface: #111827;
  --clr-surface-2: #1f2937;
  --clr-surface-3: #374151;
  --clr-border: rgba(255, 255, 255, 0.08);

  /* Text */
  --clr-text: #f1f5f9;
  --clr-text-muted: #94a3b8;
  --clr-text-dim: #64748b;

  /* Feedback */
  --clr-error: #ef4444;
  --clr-error-bg: rgba(239, 68, 68, 0.12);
  --clr-success: #22c55e;
  --clr-success-bg: rgba(34, 197, 94, 0.12);

  /* Glass */
  --glass-bg: rgba(17, 24, 39, 0.6);
  --glass-border: rgba(255, 255, 255, 0.06);
  --glass-blur: 20px;

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

  /* Sizing */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px var(--clr-primary-glow);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.3s;
}

/* ─── Reset & Base ──────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--clr-bg);
  color: var(--clr-text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: var(--clr-primary-light);
  text-decoration: none;
  transition: color var(--duration) var(--ease);
}

a:hover {
  color: var(--clr-primary);
}

img {
  max-width: 100%;
  display: block;
}

/* ─── Background Gradient Orbs (animated) ───────────────────────── */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.18;
  z-index: -1;
  pointer-events: none;
  animation: orbFloat 20s ease-in-out infinite alternate;
}

body::before {
  width: 650px;
  height: 650px;
  background: radial-gradient(circle, var(--clr-primary), var(--clr-primary-dark));
  top: -200px;
  right: -150px;
}

body::after {
  width: 550px;
  height: 550px;
  background: radial-gradient(circle, var(--clr-accent), #4f46e5);
  bottom: -150px;
  left: -100px;
  animation-delay: -10s;
}

@keyframes orbFloat {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(30px, -40px) scale(1.1);
  }

  100% {
    transform: translate(-20px, 20px) scale(0.95);
  }
}

/* ─── Navigation ────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 15, 26, 0.8);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom: 1px solid var(--clr-border);
  transition: background var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}

.navbar.scrolled {
  background: rgba(10, 15, 26, 0.95);
  box-shadow: var(--shadow-md);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--clr-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-logo span {
  color: var(--clr-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links a {
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  transition: all var(--duration) var(--ease);
}

.nav-links a:hover {
  color: var(--clr-text);
  background: var(--clr-surface-2);
}

.nav-links a.active {
  color: var(--clr-primary);
  background: rgba(16, 185, 129, 0.1);
}

/* Auth buttons in nav */
.nav-auth {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-auth .btn-ghost {
  padding: 8px 20px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
}

.nav-auth .btn-ghost:hover {
  color: var(--clr-text);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-text);
  border-radius: 2px;
  transition: all var(--duration) var(--ease);
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  border: none;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  position: relative;
  overflow: hidden;
}

/* Shimmer sweep on hover */
.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s var(--ease);
  pointer-events: none;
}

.btn:hover::after {
  left: 120%;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 4px 15px var(--clr-primary-glow);
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {

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

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

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 30px var(--clr-primary-glow);
}

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

.btn-outline {
  background: transparent;
  color: var(--clr-primary-light);
  border: 1.5px solid var(--clr-primary);
}

.btn-outline:hover {
  background: rgba(16, 185, 129, 0.1);
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.15);
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1.05rem;
}

.btn-sm {
  padding: 8px 20px;
  font-size: 0.85rem;
}

.btn-block {
  width: 100%;
}

.btn .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: none;
}

.btn.loading .spinner {
  display: inline-block;
}

.btn.loading .btn-text {
  opacity: 0.5;
}

/* ─── Cards ─────────────────────────────────────────────────────── */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all var(--duration) var(--ease);
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-md);
}

/* ─── Form Elements ─────────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text-muted);
}

.form-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: all 0.35s var(--ease);
  outline: none;
}

.form-input::placeholder {
  color: var(--clr-text-dim);
}

.form-input:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.form-input:focus {
  border-color: var(--clr-primary);
  box-shadow: 0 0 0 3px var(--clr-primary-glow), 0 4px 16px rgba(16, 185, 129, 0.1);
  background: rgba(17, 24, 39, 0.9);
}

.form-input.error {
  border-color: var(--clr-error);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--clr-error);
  display: none;
}

.form-error.visible {
  display: block;
}

.password-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--clr-text-dim);
  cursor: pointer;
  font-size: 1.1rem;
  transition: color var(--duration) var(--ease);
}

.password-toggle:hover {
  color: var(--clr-text);
}

/* ─── Alert / Toast ─────────────────────────────────────────────── */
.alert {
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  animation: slideDown 0.3s var(--ease);
}

.alert.visible {
  display: flex;
}

.alert-error {
  background: var(--clr-error-bg);
  color: var(--clr-error);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
  background: var(--clr-success-bg);
  color: var(--clr-success);
  border: 1px solid rgba(34, 197, 94, 0.2);
}

/* ─── Hero Section ──────────────────────────────────────────────── */
.hero {
  min-height: auto;
  display: flex;
  align-items: flex-start;
  padding-top: 72px;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 60px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.hero-badge {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-primary-light);
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero h1 .highlight {
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--clr-text-muted);
  margin-bottom: 32px;
  max-width: 520px;
}

.hero-actions {
  gap: 16px;
  flex-wrap: wrap;
}

.hero-actions.desktop-only {
  display: flex;
}

.hero-actions.mobile-only {
  display: none;
}

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

/* ─── Browse Turfs Feature Navigation Card ──────────────────────── */
.browse-turfs-card {
  display: block;
  width: 100%;
  max-width: 850px;
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-decoration: none;
  color: var(--clr-text);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.browse-turfs-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

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

.browse-turfs-card:hover {
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--clr-primary-glow);
  transform: translateY(-4px);
  color: var(--clr-text);
}

.browse-turfs-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}

.browse-turfs-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-accent));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
  transition: transform 0.3s var(--ease);
}

.browse-turfs-card:hover .browse-turfs-icon {
  transform: scale(1.1) rotate(-3deg);
}

.browse-turfs-title {
  flex: 1;
}

.browse-turfs-title h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.browse-turfs-title p {
  font-size: 0.82rem;
  color: var(--clr-text-muted);
  margin: 0;
}

.browse-turfs-arrow {
  font-size: 1.4rem;
  color: var(--clr-primary);
  font-weight: 700;
  transition: transform 0.3s var(--ease);
  flex-shrink: 0;
}

.browse-turfs-card:hover .browse-turfs-arrow {
  transform: translateX(6px);
}

.browse-turfs-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--clr-surface);
  border: 1.5px solid var(--clr-border);
  border-radius: var(--radius-md);
}

.preview-search-icon {
  font-size: 0.9rem;
  opacity: 0.6;
}

.preview-search-text {
  font-size: 0.85rem;
  color: var(--clr-text-dim);
  font-family: var(--font-body);
}

.preview-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preview-filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--clr-surface-2);
  color: var(--clr-text-muted);
  border: 1px solid var(--clr-border);
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.preview-filter-active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--clr-primary-light);
  border-color: rgba(16, 185, 129, 0.25);
}

.preview-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  box-shadow: 0 2px 10px var(--clr-primary-glow);
  transition: all var(--duration) var(--ease);
  width: fit-content;
}

/* Light theme overrides for Browse Turfs card */
[data-theme="light"] .browse-turfs-card {
  background: rgba(255, 255, 255, 0.75);
  border-color: var(--clr-border);
}

[data-theme="light"] .browse-turfs-card:hover {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 0 30px var(--clr-primary-glow);
}

[data-theme="light"] .preview-filter-chip {
  background: var(--clr-surface);
  color: var(--clr-text);
}

/* ─── Features Section ──────────────────────────────────────────── */
.features {
  padding: 100px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
}

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

.feature-card {
  padding: 32px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease);
}

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

.feature-card:hover {
  transform: translateY(-6px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 40px var(--clr-primary-glow);
}

.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
  background: rgba(16, 185, 129, 0.1);
  transition: transform 0.3s var(--ease), background 0.3s;
}

.feature-card:hover .feature-icon {
  transform: scale(1.15);
  background: rgba(16, 185, 129, 0.18);
}

.feature-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.feature-card p {
  color: var(--clr-text-muted);
  font-size: 0.9rem;
}

/* ─── Auth Pages Layout ─────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 40px;
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--clr-text-muted);
  font-size: 0.95rem;
}

.auth-card {
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Gradient top accent line */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--clr-primary), var(--clr-accent-light), var(--clr-primary));
  background-size: 200% 100%;
  animation: gradientSlide 3s linear infinite;
}

@keyframes gradientSlide {
  0% {
    background-position: 200% 0;
  }

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

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--clr-text-muted);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 24px 0;
  color: var(--clr-text-dim);
  font-size: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--clr-border), transparent);
}

/* ─── Footer ────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--clr-border);
  padding: 48px 24px 24px;
  margin-top: 80px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-brand span {
  color: var(--clr-primary);
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--clr-text-dim);
  font-size: 0.85rem;
}

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

.footer-copy {
  width: 100%;
  text-align: center;
  margin-top: 24px;
  font-size: 0.8rem;
  color: var(--clr-text-dim);
}

/* ─── Animations ────────────────────────────────────────────────── */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

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

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

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

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

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

.fade-in-up {
  animation: fadeInUp 0.7s var(--ease) both;
}

.fade-in-up:nth-child(2) {
  animation-delay: 0.08s;
}

.fade-in-up:nth-child(3) {
  animation-delay: 0.16s;
}

.fade-in-up:nth-child(4) {
  animation-delay: 0.24s;
}

.fade-in-up:nth-child(5) {
  animation-delay: 0.32s;
}

.fade-in-up:nth-child(6) {
  animation-delay: 0.40s;
}

/* ─── Selection color ───────────────────────────────────────────── */
::selection {
  background: rgba(16, 185, 129, 0.3);
  color: #fff;
}

/* ─── Scrollbar styling ─────────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--clr-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-surface-3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--clr-primary-dark);
}

/* ─── Role Tags ─────────────────────────────────────────────────── */
.role-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
  vertical-align: middle;
}

.role-user {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.role-owner {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.role-admin {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

/* ─── District Badge ────────────────────────────────────────────── */
.district-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-primary-light) !important;
  transition: all var(--duration);
  white-space: nowrap;
}

.district-badge:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: var(--clr-primary) !important;
}

.district-badge-empty {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
  color: #f59e0b !important;
  animation: pulse 2s ease-in-out infinite;
}

/* ─── Notification Bell ─────────────────────────────────────────── */
.notif-bell-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell {
  background: none;
  border: none;
  color: var(--clr-text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-full);
  transition: all var(--duration);
  position: relative;
}

.notif-bell:hover {
  color: var(--clr-text);
  background: var(--clr-surface-2);
}

.notif-bell .notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--clr-error);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  animation: bellPulse 2s ease-in-out infinite;
}

.notif-bell .notif-badge.visible {
  display: flex;
}

@keyframes bellPulse {

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

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

/* Bell ring animation */
.notif-bell.ring {
  animation: bellRing 0.5s ease;
}

@keyframes bellRing {
  0% {
    transform: rotate(0);
  }

  15% {
    transform: rotate(14deg);
  }

  30% {
    transform: rotate(-14deg);
  }

  45% {
    transform: rotate(8deg);
  }

  60% {
    transform: rotate(-8deg);
  }

  75% {
    transform: rotate(3deg);
  }

  100% {
    transform: rotate(0);
  }
}

/* Notification Dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-height: 460px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  display: none;
  flex-direction: column;
  overflow: hidden;
  animation: slideDown 0.2s var(--ease);
}

.notif-dropdown.open {
  display: flex;
}

.notif-dropdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--clr-border);
}

.notif-dropdown-header h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
}

.notif-mark-all {
  background: none;
  border: none;
  color: var(--clr-primary-light);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all var(--duration);
}

.notif-mark-all:hover {
  background: rgba(16, 185, 129, 0.1);
}

.notif-dropdown-body {
  overflow-y: auto;
  flex: 1;
  max-height: 340px;
}

.notif-item {
  padding: 14px 20px;
  border-bottom: 1px solid var(--clr-border);
  cursor: pointer;
  transition: all var(--duration);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  position: relative;
}

.notif-item:hover {
  background: var(--clr-surface-2);
}

.notif-item.unread {
  background: rgba(16, 185, 129, 0.03);
}

.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clr-primary);
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.notif-icon.high {
  background: rgba(239, 68, 68, 0.12);
}

.notif-icon.normal {
  background: rgba(16, 185, 129, 0.12);
}

.notif-icon.low {
  background: rgba(100, 116, 139, 0.12);
}

.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--clr-text);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-msg {
  font-size: 0.75rem;
  color: var(--clr-text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  /* Standard property for forward compatibility */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-time {
  font-size: 0.65rem;
  color: var(--clr-text-dim);
  margin-top: 4px;
}

.notif-dropdown-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--clr-border);
  text-align: center;
}

.notif-dropdown-footer a {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--clr-primary-light);
}

.notif-dropdown-footer a:hover {
  color: var(--clr-primary);
}

.notif-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--clr-text-dim);
  font-size: 0.85rem;
}

.notif-empty .icon {
  font-size: 2rem;
  margin-bottom: 8px;
}

/* ─── Desktop-Only Nav Wrapper ──────────────────────────────────── */
.desktop-nav-only {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ─── Bottom Navigation ─────────────────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  height: 64px;
  background: rgba(10, 15, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--clr-border);
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 12px;
  color: var(--clr-text-dim);
  text-decoration: none;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: color var(--duration) var(--ease);
  position: relative;
  min-width: 56px;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
  transition: transform var(--duration) var(--ease);
}

.bottom-nav-item.active {
  color: var(--clr-primary);
}

.bottom-nav-item.active svg {
  transform: scale(1.08);
}

.bottom-nav-item:hover {
  color: var(--clr-primary-light);
}

/* ─── Bottom Sheet ──────────────────────────────────────────────── */
.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 3000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s var(--ease), visibility 0.3s;
}

.sheet-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sheet-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3001;
  background: var(--clr-surface);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px 24px 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.35s var(--ease);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.3);
}

.sheet-panel.open {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--clr-surface-3);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.sheet-panel h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.sheet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  margin-bottom: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--clr-text);
}

.sheet-option:hover {
  background: var(--clr-surface-2);
}

.sheet-option-active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--clr-primary-light);
}

.sheet-check {
  margin-left: auto;
  color: var(--clr-primary);
  font-weight: 700;
}

/* ─── Sports Categories Section ─────────────────────────────────── */
.sports-categories {
  padding: 48px 24px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Sports Section Header (Desktop) */
.sports-section-header {
  text-align: center;
  margin-bottom: 60px;
}

/* Sports Section Title (Desktop) */
.sports-section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 12px;
  text-align: center;
  color: var(--clr-text);
}

/* Sports Section Subtitle (Desktop) */
.sports-section-subtitle {
  color: var(--clr-text-muted);
  font-size: 1.05rem;
  text-align: center;
}

.sports-scroll-container {
  overflow-x: auto;
  padding: 12px 4px;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Hide scrollbar */
}

.sports-scroll-container::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar for Chrome/Safari */
}

.sports-grid {
  display: flex;
  gap: 24px;
  justify-content: center;
  width: 100%;
}

.sport-card {
  display: flex;
  flex-direction: column;
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--duration) var(--ease);
  cursor: pointer;
  color: var(--clr-text);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  flex: 1;
  min-width: 160px;
  max-width: 240px;
}

/* --- Independent Sport Card Styles (Desktop) --- */
.cricket-card {
  /* Customize Cricket card independently on desktop if needed */
}

.football-card {
  /* Customize Football card independently on desktop if needed */
}

.pickleball-card {
  /* Customize Pickleball card independently on desktop if needed */
}

.badminton-card {
  /* Customize Badminton card independently on desktop if needed */
}

.sport-card-img-wrapper {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  position: relative;
}

.sport-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration) var(--ease);
  display: block;
}

.sport-card-content {
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  flex-grow: 1;
}

.sport-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--clr-text);
  margin: 0;
  letter-spacing: 0.5px;
}

/* Hover effect on desktop */
@media (hover: hover) {
  .sport-card:hover {
    border-color: rgba(16, 185, 129, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35), 0 0 24px var(--clr-primary-glow);
    transform: translateY(-6px);
  }

  .sport-card:hover img {
    transform: scale(1.06);
  }
}

/* Light theme support */
[data-theme="light"] .sport-card {
  background: rgba(255, 255, 255, 0.8);
  border-color: var(--clr-border);
}

[data-theme="light"] .sport-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 0 24px var(--clr-primary-glow);
}

/* --- Independent Light Theme overrides --- */
[data-theme="light"] .cricket-card {
  /* Customize Cricket card light theme independently */
}

[data-theme="light"] .football-card {
  /* Customize Football card light theme independently */
}

[data-theme="light"] .pickleball-card {
  /* Customize Pickleball card light theme independently */
}

[data-theme="light"] .badminton-card {
  /* Customize Badminton card light theme independently */
}

/* Responsive / Mobile Behavior */
@media (max-width: 768px) {
  .sports-categories {
    padding: 32px 16px;
  }

  /* Sports Section Header (Mobile) */
  .sports-section-header {
    width: 100%;
    text-align: left;
    margin-bottom: 24px;
    padding-left: 4px;
    /* Align perfectly with Cricket card */
  }

  /* Sports Section Title (Mobile) */
  .sports-section-title {
    font-size: 1.8rem;
    text-align: left;
  }

  /* Sports Section Subtitle (Mobile) */
  .sports-section-subtitle {
    font-size: 0.85rem;
    text-align: left;
  }

  .sports-grid {
    justify-content: flex-start;
    /* Do not center on mobile, allow scrolling */
    width: max-content;
    /* Ensure container expands to hold cards */
    padding-right: 16px;
    /* Spacing at the end of scroll */
    gap: 16px;
  }

  .sport-card {
    min-width: 160px;
    max-width: 160px;
    flex: 0 0 auto;
  }

  /* --- Independent Sport Card Styles (Mobile) --- */
  .cricket-card {
    /* Customize Cricket card independently on mobile if needed */
  }

  .football-card {
    /* Customize Football card independently on mobile if needed */
  }

  .pickleball-card {
    /* Customize Pickleball card independently on mobile if needed */
  }

  .badminton-card {
    /* Customize Badminton card independently on mobile if needed */
  }

  .sport-card-content {
    padding: 14px 12px;
  }

  .sport-card h3 {
    font-size: 1.05rem;
  }

  /* Active tap feedback (mobile) */
  .sport-card:active {
    transform: scale(0.96);
    background: rgba(16, 185, 129, 0.08);
    border-color: var(--clr-primary-light);
  }
}

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {

  /* Hide desktop nav, show bottom nav */
  .nav-links {
    display: none !important;
  }

  .nav-toggle {
    display: none !important;
  }

  .desktop-nav-only {
    display: none !important;
  }

  .bottom-nav {
    display: flex;
  }

  .footer {
    display: none;
  }

  body {
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  }

  .nav-container {
    height: 60px;
  }

  /* Typography & spacing (Tablet) */
  h1 {
    font-size: 2.4rem;
  }

  h2 {
    font-size: 1.6rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  /* Hero adjustments */
  .hero-container {
    text-align: center;
    padding: 32px 20px 20px;
    gap: 24px;
  }

  .hero p {
    margin-left: auto;
    margin-right: auto;
    max-width: 480px;
  }

  .hero-actions {
    justify-content: center;
    gap: 12px;
  }

  .hero-actions.desktop-only {
    display: none !important;
  }

  .hero-actions.mobile-only {
    display: flex;
    margin-bottom: 16px;
  }

  #heroActionsMobile .btn {
    padding: 10px 20px;
    font-size: 0.8rem;
  }

  .browse-turfs-card {
    max-width: 100%;
    padding: 20px;
  }

  .auth-card {
    padding: 20px;
  }

  /* Grid gaps & button touch targets */
  .features-grid {
    gap: 16px;
  }

  .btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
  }
}

@media (max-width: 768px) {

  /* Typography & spacing (Phone) */
  h1 {
    font-size: 1.75rem !important;
  }

  h2 {
    font-size: 1.3rem !important;
  }

  h3 {
    font-size: 1.1rem !important;
  }

  body,
  p {
    font-size: 0.92rem;
  }

  label,
  .form-label {
    font-size: 0.78rem;
  }

  .hero {
    padding-top: 56px;
  }

  .hero-container {
    padding: 48px 16px 16px;
    gap: 16px;
  }

  .nav-login-mobile {
    display: inline-flex;
    margin-left: auto;
  }

  #heroCtaPrimaryMobile,
  #heroCtaSecondaryMobile,
  #navLoginMobile {
    -webkit-tap-highlight-color: transparent;
    outline: none !important;
  }

  #heroCtaPrimaryMobile span,
  #heroCtaSecondaryMobile span,
  #navLoginMobile span {
    position: relative;
    z-index: 2;
  }

  .hero-badge {
    margin-bottom: 12px;
  }

  .hero p {
    font-size: 0.80rem;
    margin-bottom: 20px;
  }

  .browse-turfs-card {
    padding: 16px;
    -webkit-tap-highlight-color: transparent;
  }

  .browse-turfs-card:active {
    transform: scale(0.97);
  }

  .browse-turfs-title {
    text-align: left;
  }

  .browse-turfs-icon {
    position: relative;
    top: -9px;
  }

  .browse-turfs-arrow {
    position: relative;
    top: -9px;
  }

  .preview-filter-chip {
    font-size: 0.65rem;
  }

  .hero h1 .highlight {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--clr-primary);
    background-clip: unset;
    color: var(--clr-primary);
  }

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

  .feature-card {
    padding: 16px;
  }
}

@media (max-width: 480px) {
  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ─── Light Theme Overrides ─────────────────────────────────────── */
[data-theme="light"] {
  /* Colors */
  --clr-bg: #F4FFF7;
  --clr-surface: #FFFFFF;
  --clr-surface-2: #F0FAF3;
  --clr-surface-3: #E1F5E8;
  --clr-border: #D9F5E3;

  /* Primary */
  --clr-primary: #00C16A;
  --clr-primary-light: #22D17E;
  --clr-primary-dark: #00A358;
  --clr-primary-glow: rgba(0, 193, 106, 0.2);

  /* Text */
  --clr-text: #1B2A20;
  --clr-text-muted: #5E6D64;
  --clr-text-dim: #8BA093;

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(0, 193, 106, 0.08);
}

/* Scrollbar, backgrounds, navbar & components for Light Theme */
[data-theme="light"] body::before {
  background: radial-gradient(circle, rgba(0, 193, 106, 0.25), rgba(0, 193, 106, 0.05));
  opacity: 0.4;
}

[data-theme="light"] body::after {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.02));
  opacity: 0.4;
}

[data-theme="light"] .navbar {
  background: rgba(244, 255, 247, 0.8);
}

[data-theme="light"] .navbar.scrolled {
  background: rgba(244, 255, 247, 0.95);
}

[data-theme="light"] .btn-primary {
  background: linear-gradient(135deg, #00C16A 0%, #22D17E 100%);
  box-shadow: 0 4px 15px rgba(0, 193, 106, 0.2);
}

[data-theme="light"] .btn-primary:hover {
  box-shadow: 0 8px 30px rgba(0, 193, 106, 0.35);
}

[data-theme="light"] .sticky-nav-container {
  background: rgba(244, 255, 247, 0.75);
}

/* Theme Switcher Dropdown Styles */
.theme-switcher-wrapper {
  position: relative;
  display: inline-block;
}

.theme-switcher-btn {
  background: transparent;
  border: 1px solid var(--clr-border);
  color: var(--clr-text-muted);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all var(--duration) var(--ease);
}

.theme-switcher-btn:hover {
  color: var(--clr-text);
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.02);
}

[data-theme="light"] .theme-switcher-btn:hover {
  background: rgba(0, 0, 0, 0.02);
}

.theme-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: 6px;
  min-width: 140px;
  box-shadow: var(--shadow-md);
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1100;
  animation: slideDown 0.2s var(--ease);
}

.theme-dropdown.open {
  display: flex;
}

.theme-dropdown-item {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--clr-text-muted);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.theme-dropdown-item:hover {
  color: var(--clr-text);
  background: var(--clr-surface-2);
}

.theme-dropdown-item.active {
  color: var(--clr-primary-light);
  background: rgba(16, 185, 129, 0.08);
  font-weight: 600;
}

/* ─── Light Theme Form Input Fixes ─────────────────────────────── */
[data-theme="light"] .form-input:hover {
  border-color: rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .form-input:focus {
  background: var(--clr-surface);
  border-color: var(--clr-primary);
}

[data-theme="light"] .form-input::placeholder {
  color: var(--clr-text-muted);
}

/* ─── Light Theme: Bottom Nav & Sheet ──────────────────────────── */
[data-theme="light"] .bottom-nav {
  background: rgba(244, 255, 247, 0.95);
}

[data-theme="light"] .sheet-panel {
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.1);
}

/* ─── Modern Toggle Switch UI ─────────────────────────────────── */
.switch-container {
  display: flex;
  align-items: center;
  gap: 12px;
}

.switch-label {
  font-weight: 500;
  color: var(--clr-text);
  font-size: 0.9rem;
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--clr-border, #ccc);
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: var(--clr-primary, #10b981);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--clr-primary, #10b981);
}

input:checked + .slider:before {
  transform: translateX(24px);
}