:root {
  /* Graphite Teal Pro - Primitive Tokens */
  --color-white: #FFFFFF;
  --color-black: #000000;

  /* Graphite Base Scale */
  --color-graphite-900: #0E1114; /* Base Background */
  --color-graphite-800: #14181C; /* Surface / Cards */
  --color-graphite-700: #1B2126; /* Elevated */

  /* Teal Pro Accent Scale */
  --color-teal-500: #00C2A8; /* Primary Accent */
  --color-teal-600: #00AA96; /* Hover */
  --color-teal-700: #009182; /* Active */

  /* Data / Utility Scale */
  --color-status-success: #3BD671;
  --color-status-error: #FF6B6B;
  --color-status-warning: #FFB86B;
  --color-status-info: #98A0A6;
  --color-elite: #4DA8FF;


  /* Text Scale */
  --color-text-primary: #E6EEF2;
  --color-text-muted: #98A0A6;

  /* RGB versions for opacity control */
  --color-teal-rgb: 0, 194, 168;         /* #00C2A8 */
  --color-success-rgb: 59, 214, 113;     /* #3BD671 */
  --color-error-rgb: 255, 107, 107;      /* #FF6B6B */
  --color-warning-rgb: 255, 184, 107;    /* #FFB86B */
  --color-info-rgb: 152, 160, 166;       /* #98A0A6 */

  /* Background color tokens - Graphite Theme */
  --color-bg-1: var(--color-graphite-900);
  --color-bg-2: var(--color-graphite-800);
  --color-bg-3: rgba(59, 214, 113, 0.1);  /* Success Tint */
  --color-bg-4: rgba(255, 107, 107, 0.1); /* Error Tint */
  --color-bg-5: var(--color-graphite-700);
  --color-bg-6: rgba(255, 184, 107, 0.1); /* Warning Tint */
  --color-bg-7: var(--color-graphite-900);
  --color-bg-8: var(--color-graphite-800);

  /* Semantic Color Tokens - Graphite Teal Pro */
  --color-background: var(--color-graphite-900);
  --color-surface: var(--color-graphite-800);
  --color-text: var(--color-text-primary);
  --color-text-secondary: var(--color-text-muted);

  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);

  --color-secondary: rgba(255, 255, 255, 0.05);
  --color-secondary-hover: rgba(255, 255, 255, 0.08);
  --color-secondary-active: rgba(255, 255, 255, 0.12);

  --color-border: rgba(255, 255, 255, 0.08);
  --color-btn-primary-text: var(--color-graphite-900); /* Dark text on Teal button for contrast */

  --color-card-border: rgba(255, 255, 255, 0.06);
  --color-card-border-inner: rgba(255, 255, 255, 0.04);

  --color-error: var(--color-status-error);
  --color-success: var(--color-status-success);
  --color-warning: var(--color-status-warning);
  --color-info: var(--color-status-info);

  --color-focus-ring: rgba(var(--color-teal-rgb), 0.4);
  --color-select-caret: rgba(230, 238, 242, 0.8);

  /* Common style patterns */
  --focus-ring: 0 0 0 3px var(--color-focus-ring);
  --focus-outline: 2px solid var(--color-primary);
  --status-bg-opacity: 0.15;
  --status-border-opacity: 0.20;

  /* SVG Carets - Updated to be light for dark background */
  --select-caret-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23E6EEF2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  --select-caret-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23E6EEF2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");




  /* Typography Defaults */
  --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows - Minimal for Dark Mode */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.05);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100vw !important;
  overflow-x: hidden !important;
}


@font-face {
    font-family: "CruyffSans";
    src: url("assets/fonts/CruyffSansCondensed-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}


/* Dark mode colors - Enforced Graphite Teal Pro */
@media (prefers-color-scheme: dark) {
  :root {
    /* Identical to default root because Graphite is dark-first */
    --color-background: var(--color-graphite-900);
    --color-surface: var(--color-graphite-800);
    --color-text: var(--color-text-primary);
    --color-text-secondary: var(--color-text-muted);

    --color-primary: var(--color-teal-500);
    --color-primary-hover: var(--color-teal-600);
    --color-primary-active: var(--color-teal-700);

    --color-border: rgba(255, 255, 255, 0.08);
    --color-card-border: rgba(255, 255, 255, 0.06);
    --color-select-caret: rgba(230, 238, 242, 0.8);
  }
}

/* Force Graphite Theme on Data Attributes */
[data-color-scheme="dark"],
[data-color-scheme="light"] {
  /* Override "light" scheme to use Graphite because the palette is dark-only */
  --color-background: var(--color-graphite-900);
  --color-surface: var(--color-graphite-800);
  --color-text: var(--color-text-primary);
  --color-text-secondary: var(--color-text-muted);
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);
  --color-secondary: rgba(255, 255, 255, 0.05);
  --color-secondary-hover: rgba(255, 255, 255, 0.08);
  --color-secondary-active: rgba(255, 255, 255, 0.12);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-btn-primary-text: var(--color-graphite-900);
  --color-card-border: rgba(255, 255, 255, 0.06);

  /* Utilities */
  --color-error: var(--color-status-error);
  --color-success: var(--color-status-success);
  --color-warning: var(--color-status-warning);
  --color-info: var(--color-status-info);

  /* RGB Maps */
  --color-teal-rgb: 0, 194, 168;
  --color-success-rgb: 59, 214, 113;
  --color-error-rgb: 255, 107, 107;
  --color-warning-rgb: 255, 184, 107;
  --color-info-rgb: 152, 160, 166;
}

/* Force H2/Headings elements to always be white */
h1, h2, h3, h4, h5, h6 {
  color: #FFFFFF !important;
}

/* Base styles */
html {
  font-size: var(--font-size-base);
  font-family: var(--font-family-base);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-background);
  -webkit-font-smoothing: antialiased;
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--font-weight-semibold);
  line-height: var(--line-height-tight);
  color: #FFFFFF; /* Graphite Headings */
  letter-spacing: var(--letter-spacing-tight);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-md); }

p {
  margin: 0 0 var(--space-16) 0;
  color: var(--color-text-primary);
}

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

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

code,
pre {
  font-family: var(--font-family-mono);
  font-size: calc(var(--font-size-base) * 0.95);
  background-color: var(--color-secondary);
  border-radius: var(--radius-sm);
  color: var(--color-text-primary);
}

code {
  padding: var(--space-1) var(--space-4);
}

pre {
  padding: var(--space-16);
  margin: var(--space-16) 0;
  overflow: auto;
  border: 1px solid var(--color-border);
}

pre code {
  background: none;
  padding: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
}



.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-btn-primary-text);
  font-weight: 600; /* Extra weight for contrast on Teal */
}

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

.btn--primary:active {
  background: var(--color-primary-active);
}

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-text);
}

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

.btn--secondary:active {
  background: var(--color-secondary-active);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--outline:hover {
  background: var(--color-secondary);
  border-color: var(--color-text-secondary);
}

.btn--sm {
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: var(--space-10) var(--space-20);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
}

.btn--full-width {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Form elements */
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

textarea.form-control {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
}

select.form-control {
  padding: var(--space-8) var(--space-12);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: var(--select-caret-light);
  background-repeat: no-repeat;
  background-position: right var(--space-12) center;
  background-size: 16px;
  padding-right: var(--space-32);
}

/* Unified dark caret for all modes */
@media (prefers-color-scheme: dark) {
  select.form-control {
    background-image: var(--select-caret-dark);
  }
}

[data-color-scheme="dark"] select.form-control,
[data-color-scheme="light"] select.form-control {
  background-image: var(--select-caret-dark);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: var(--focus-outline);
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
}

.form-group {
  margin-bottom: var(--space-16);
}

/* Card component */
.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-base);
  border: 1px solid var(--color-card-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all 200ms ease;
}

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

.card__body {
  padding: var(--space-16);
}

.card__header,
.card__footer {
  padding: var(--space-16);
  border-bottom: 1px solid var(--color-card-border-inner);
  background-color: var(--color-graphite-700); /* Elevated header */
}

/* Status indicators */
.status {
  display: inline-flex;
  align-items: center;
  padding: var(--space-6) var(--space-12);
  border-radius: var(--radius-full);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.status--success {
  background-color: rgba(var(--color-success-rgb), var(--status-bg-opacity));
  color: var(--color-success);
  border: 1px solid rgba(var(--color-success-rgb), var(--status-border-opacity));
}

.status--error {
  background-color: rgba(var(--color-error-rgb), var(--status-bg-opacity));
  color: var(--color-error);
  border: 1px solid rgba(var(--color-error-rgb), var(--status-border-opacity));
}

.status--warning {
  background-color: rgba(var(--color-warning-rgb), var(--status-bg-opacity));
  color: var(--color-warning);
  border: 1px solid rgba(var(--color-warning-rgb), var(--status-border-opacity));
}

.status--info {
  background-color: rgba(var(--color-info-rgb), var(--status-bg-opacity));
  color: var(--color-info);
  border: 1px solid rgba(var(--color-info-rgb), var(--status-border-opacity));
}

/* Container layout */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: var(--space-16);
  padding-left: var(--space-16);
}











/* FIRST BADGE FOR TEAL PRO */
@media (min-width: 640px) {
  .container {
    max-width: var(--container-sm);
  }
}

@media (min-width: 768px) {
  .container {
    max-width: var(--container-md);
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: var(--container-lg);
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: var(--container-xl);
  }
}

/* Utility classes */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

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

.justify-between {
  justify-content: space-between;
}

.gap-4 {
  gap: var(--space-4);
}

.gap-8 {
  gap: var(--space-8);
}

.gap-16 {
  gap: var(--space-16);
}

.m-0 {
  margin: 0;
}

.mt-8 {
  margin-top: var(--space-8);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

.mx-8 {
  margin-left: var(--space-8);
  margin-right: var(--space-8);
}

.my-8 {
  margin-top: var(--space-8);
  margin-bottom: var(--space-8);
}

.p-0 {
  padding: 0;
}

.py-8 {
  padding-top: var(--space-8);
  padding-bottom: var(--space-8);
}

.px-8 {
  padding-left: var(--space-8);
  padding-right: var(--space-8);
}

.py-16 {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.px-16 {
  padding-left: var(--space-16);
  padding-right: var(--space-16);
}

.block {
  display: block;
}

.hidden {
  display: none;
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

:focus-visible {
  outline: var(--focus-outline);
  outline-offset: 2px;
}

/* Dark mode specifics */
[data-color-scheme="dark"] .btn--outline {
  border: 1px solid var(--color-border);
}

@font-face {
  font-family: 'FKGroteskNeue';
  src: url('https://r2cdn.perplexity.ai/fonts/FKGroteskNeue.woff2') format('woff2');
}

/* END PERPLEXITY DESIGN SYSTEM */


/*
   GRAPHITE TEAL PRO THEME INTEGRATION
   Note: Old "Futbin-Inspired" root variables removed to use
   the unified system from Part 1.
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}


/* ----------------- Graphite Teal Pro Part 2 ----------------- */

/* Toast Notifications */
#toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--color-graphite-700); /* Elevated background */
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 300px;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-primary);
}

.toast.success {
  border-color: rgba(var(--color-success-rgb), 0.3);
  border-left: 4px solid var(--color-status-success);
}

.toast.error {
  border-color: rgba(var(--color-error-rgb), 0.3);
  border-left: 4px solid var(--color-status-error);
}

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

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

/* Header */
.header {
  background: rgba(14, 17, 20, 0.85); /* Graphite 900 with opacity */
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background-color: transparent; /* Let the blur show through */
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  /* Replaced gradient with solid text or simple Teal accent if desired */
  white-space: nowrap;
  line-height: 1;
}

/* Responsive logo image */
.logo-image {
  --logo-size: clamp(2.8rem, 6vw, 4rem);
  width: var(--logo-size);
  height: var(--logo-size);
  max-height: 120%;
  max-width: 120%;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(14, 17, 20, 0.85);
  border: 1px solid rgba(0, 194, 168, 0.35);
  padding: clamp(0.12rem, 0.3vw, 0.24rem);
  box-sizing: border-box;
}

/* Optional: If you want the logo to pop with Teal */
.logo-text {
  color: var(--color-teal-500);
  font-size: clamp(1.2rem, 1.8vw, 1.8rem);
  font-weight: 700;
}

.nav-desktop {
  display: flex;
  gap: 8px;
  flex: 1;
  justify-content: center;
}

.nav-link {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}


.nav-link:hover {
  color: #00C2A8;
  background-color: rgba(0, 194, 168, 0.05);
  transform: translateY(-2px);
  text-shadow: 0 0 10px rgba(0,194,168,0.35);
}

.nav-link:hover::after {
  transform: scaleX(1);
}


.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #00C2A8;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}


.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-container-header {
  position: relative;
}

.search-input-header {
  background: var(--color-graphite-800); /* Surface color */
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 4px 12px;
  color: var(--color-text-primary);
  width: 200px;
  font-size: 6px;
  transition: all 0.1s;
}

.search-input-header:focus {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 2px rgba(var(--color-teal-rgb), 0.2);
  width: 280px;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-teal-500);
  cursor: pointer;
  transition: transform 0.2s;
}

.avatar-circle:hover {
  transform: scale(1.1);
  border-color: var(--color-teal-500);
  background: rgba(0, 194, 168, 0.1);
}

/* Main Content */
.main-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 26px; /*26 can be better */
}

.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section */
.hero {
  /* Dark Graphite Gradient Background */
  background: linear-gradient(135deg, #14181C 0%, #0E1114 100%);
  border: 1px solid var(--color-border);
  border-radius: 24px;
  padding: 80px 60px;
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Ambient Glow Effects - Teal */
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 194, 168, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(80px);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 194, 168, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(60px);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 52px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-text-primary);
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 20px;
  color: var(--color-text-muted);
  margin-bottom: 32px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-primary {
  background: var(--color-teal-500);
  color: var(--color-graphite-900); /* High contrast dark text */
  opacity: 1 !important;
  box-shadow: 0 4px 15px rgba(0, 194, 168, 0.2);
}

.btn-primary:hover {
  background: var(--color-teal-600);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 194, 168, 0.3);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-primary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

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

.btn-text {
  background: transparent;
  color: var(--color-teal-500);
  padding: 8px 16px;
}

.btn-text:hover {
  background: rgba(0, 194, 168, 0.1);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* Section */
.section {
  margin-bottom: 48px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 25px;
  font-weight: 700;
  color: var(--color-text-primary);
  /* Removed gradient for cleaner, professional look */
}

@media (max-width: 768px) {
  .section-header h2 {
    font-size: 17px;
    font-weight: 700;
  }
}

/* Horizontal Scroll */
.horizontal-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 0;
  scroll-behavior: smooth;
}

.horizontal-scroll::-webkit-scrollbar {
  height: 6px;
}

.horizontal-scroll::-webkit-scrollbar-track {
  background: var(--color-graphite-800);
  border-radius: 3px;
}

.horizontal-scroll::-webkit-scrollbar-thumb {
  background: var(--color-teal-600);
  border-radius: 3px;
}

/* Player Card */
.player-card {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 20px;
  min-width: 280px;
  transition: all 0.3s;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 194, 168, 0.05) 0%, rgba(0, 145, 130, 0.05) 100%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.player-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--color-teal-500);
}

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

.player-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.player-avatar {
  width: 80px;
  height: 80px;
  border-radius: 12px;
  background: var(--color-graphite-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}

.player-rating {
  background: rgba(0, 194, 168, 0.1);
  border: 1px solid rgba(0, 194, 168, 0.3);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-teal-500);
}

.player-info h3 {
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--color-text-primary);
  position: relative;
  z-index: 1;
}

.player-position {
  display: inline-block;
  background: var(--color-teal-600);
  color: var(--color-graphite-900); /* Dark text on Teal badge */
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.player-details {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.player-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
  position: relative;
  z-index: 1;
}

.price-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.price-change {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-left: 70%;
  margin-top: -22px;
}

.price-change.up {
  color: var(--color-status-success);
}

.price-change.down {
  color: var(--color-status-error);
}

.player-actions {
  display: flex;
  gap: 8px;
  position: relative;
  z-index: 1;
}

.btn-icon {
  width: 25px;
  height: 25px;
  border-radius: 8px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-icon.active {
  background: var(--color-status-error); /* Solid Red for favorited state */
  color: #FFFFFF;
  border-color: var(--color-status-error);
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.2);
}

/* Updates List */
/* Recent Price Updates - 4 per row */
.updates-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 100%;
  margin: 0 auto;
}

/* ----------------------- Graphite Teal Pro Part 3 ----------------- */

.update-item {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
}

.update-item:hover {
  border-color: var(--color-teal-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Responsive breakpoints */
@media (max-width: 1200px) {
  .updates-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .updates-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .updates-list {
    grid-template-columns: 1fr;
  }
}

.update-player {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}

.update-avatar {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text-primary);
  box-shadow: var(--shadow-sm);
}

.update-info h4 {
  font-size: 14px;
  font-weight: 650;
  margin-top: 3px;
  margin-bottom: 2px;
  color: var(--color-text-primary);
}

.update-info p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 5px;
}

.update-price {
  text-align: right;
}

.update-price .price-value {
  font-size: 15px;
  font-weight: 620;
  margin-bottom: -20px;
  margin-top: -40px;
  color: var(--color-text-primary);
}

/* Database View */
.view-header {
  margin-bottom: 32px;
}

.view-header h1 {
  font-size: 40px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--color-text-primary);
}

.database-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.filters-sidebar {
  border-radius: 8px;
  padding: 20px;
  height: fit-content;
  position: sticky;
  top: 100px;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border);
}

.filters-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
}

.filter-group {
  margin-bottom: 20px;
}

.filter-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .update-info h4 {
    font-size: 12px;
  }

  .update-info p {
    font-size: 9px;
    letter-spacing: 1px;
  }
}

.filter-select,
.filter-input {
  width: 100%;
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--color-text-primary);
  font-size: 14px;
  transition: all 150ms ease;
}

.filter-select:focus,
.filter-input:focus {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 2px rgba(var(--color-teal-rgb), 0.15);
}

.range-inputs {
  display: flex;
  align-items: center;
  gap: 8px;
}

.range-input {
  width: 103px;
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--color-text-primary);
  font-size: 14px;
}

.range-input:focus {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 2px rgba(var(--color-teal-rgb), 0.15);
}

.database-content {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}


.database-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}

.search-container {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 12px 40px 12px 52px;
  color: var(--color-text-primary);
  font-size: 14px;
  height: 44px;
  transition: all 150ms ease;
}

.search-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.6;
}

.search-input:focus {
  outline: none;
  border-color: var(--color-teal-500);
  border-width: 2px;
  padding: 11px 39px 11px 51px;
  box-shadow: 0 0 0 2px rgba(var(--color-teal-rgb), 0.15);
}

/* Mobile Search Container for Watchlist */
.watchlist-mobile-search {
  display: none;
  position: relative;
  margin-bottom: 16px;
}

.watchlist-mobile-search .search-input {
  width: 100%;
  padding: 12px 40px 12px 56px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
}

.watchlist-mobile-search .search-input:hover {
  border-color: var(--color-teal-500);
}

.watchlist-filter-btn {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 150ms ease;
  z-index: 1;
}

.watchlist-filter-btn:hover {
  background: var(--color-graphite-700);
  color: var(--color-text-primary);
}

.watchlist-filter-btn svg {
  width: 20px;
  height: 20px;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 150ms ease;
}

.search-clear-btn:hover {
  background: var(--color-graphite-700);
  color: var(--color-text-primary);
}

.sort-select {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 10px 32px 10px 12px;
  color: var(--color-text-primary);
  font-size: 14px;
  cursor: pointer;
  min-width: 160px;
  transition: all 150ms ease;
}

.sort-select:hover {
  border-color: var(--color-text-muted);
}

.sort-select:focus {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 2px rgba(var(--color-teal-rgb), 0.15);
}

.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.filter-chip {
  background: var(--color-teal-600);
  color: var(--color-graphite-900); /* Dark text for contrast */
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.2s ease;
  border: 1px solid rgba(0, 194, 168, 0.5);
  box-shadow: 0 4px 12px rgba(0, 194, 168, 0.2);
  font-weight: 600;
}

.filter-chip button {
  background: none;
  border: none;
  color: var(--color-graphite-900);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  transition: transform 0.2s;
}

.filter-chip button:hover {
  transform: scale(1.2);
}

.players-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}



/* FIRST BADGE FOR TEAL PRO 3 */

/* Market View */
.market-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.market-card {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.market-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(0, 194, 168, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.market-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-teal-500);
  box-shadow: var(--shadow-lg);
}

.market-label {
  font-size: 11.4px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 1;
}

.market-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  position: relative;
  z-index: 1;
}

.time-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.time-btn {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 10px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.time-btn:hover {
  border-color: var(--color-teal-500);
  color: var(--color-text-primary);
  background: rgba(0, 194, 168, 0.05);
}

.time-btn.active {
  background: var(--color-teal-600);
  border-color: transparent;
  color: var(--color-graphite-900); /* Dark text for contrast */
  box-shadow: 0 4px 15px rgba(0, 194, 168, 0.2);
}

.market-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 32px;
}

.market-section {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 24px;
  transition: all 0.3s;
}

.market-section.gainers {
  border-color: rgba(59, 214, 113, 0.3); /* Green Tint */
}

.market-section.gainers:hover {
  box-shadow: 0 12px 40px rgba(59, 214, 113, 0.1);
}

.market-section.losers {
  border-color: rgba(255, 107, 107, 0.3); /* Red Tint */
}

.market-section.losers:hover {
  box-shadow: 0 12px 40px rgba(255, 107, 107, 0.1);
}

.market-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.update-indicator {
  font-size: 12px;
  color: var(--color-teal-500);
  font-weight: 500;
  animation: pulse 2s infinite;
  display: flex;
  align-items: center;
  gap: 4px;
}

.update-indicator::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-teal-500);
  border-radius: 50%;
  animation: pulseCircle 2s infinite;
}

@keyframes pulseCircle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

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

.market-table {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.market-row {
  display: grid;
  grid-template-columns: 1fr 80px 100px 100px;
  gap: 16px;
  padding: 16px;
  background: var(--color-graphite-700);
  border-radius: 10px;
  align-items: center;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.market-row:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(4px);
  border-color: var(--color-border);
}

.market-player {
  display: flex;
  align-items: center;
  gap: 12px;
}

.market-player-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-text-primary);
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.market-player-info h4 {
  font-size: 15px;
  margin-bottom: 2px;
  color: var(--color-text-primary);
}

.market-player-info p {
  font-size: 12px;
  color: var(--color-text-muted);
}

.market-ovr {
  font-weight: 700;
  font-size: 16px;
  color: var(--color-text-primary);
}

.market-price {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-text-primary);
}

.market-change {
  font-weight: 700;
  font-size: 15px;
  text-align: right;
}

.market-change.positive {
  color: var(--color-status-success);
}

.market-change.negative {
  color: var(--color-status-error);
}

/* Detail View */
.back-btn {
  margin-bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 194, 168, 0.1);
  border: 1px solid rgba(0, 194, 168, 0.2);
  color: var(--color-teal-500);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.back-btn:hover {
  background: rgba(0, 194, 168, 0.2);
  transform: translateX(-2px);
}

.detail-layout {
  display: grid;
  gap: 32px;
}

.detail-header {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

.detail-card {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 32px;
  text-align: center;
}

.detail-avatar {
  width: 150px;
  height: 150px;
  border-radius: 16px;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 60px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 auto 24px;
  box-shadow: var(--shadow-lg);
}

.detail-rating {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--color-teal-500);
}

.detail-info {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 32px;
}

.detail-name {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}

.detail-meta {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.detail-badge {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.detail-badge:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-text-muted);
}

.stats-grid-detail {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-bar {
  margin-bottom: 8px;
}

.stat-bar-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
}

.stat-bar-bg {
  height: 8px;
  background: var(--color-graphite-700);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-bar-fill {
  height: 100%;
  background: var(--color-teal-600);
  border-radius: 4px;
  transition: width 0.6s ease;
  box-shadow: 0 0 8px rgba(0, 194, 168, 0.3);
}

.detail-price-section {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 32px;
}

.detail-current-price {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--color-text-primary);
}

.chart-container {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 24px;
  height: 400px;
  position: relative;
}

/* ------------------------- Graphite Teal Pro Part 4 --------------------------*/

.empty-state {
  text-align: center;
  padding: 80px 32px;
  display: none;
}

.empty-state.visible {
  display: block;
}

.empty-state svg {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.empty-state h3 {
  font-size: 24px;
  margin-bottom: 12px;
  color: var(--color-text-primary);
}

.empty-state p {
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

/* Price History */
.history-controls {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
  align-items: center;
  flex-wrap: wrap;
}

.history-select {
  flex: 1;
  min-width: 250px;
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--color-text-primary);
  font-size: 15px;
  transition: all 0.2s;
}

.history-select:hover {
  border-color: var(--color-text-muted);
}

.history-select:focus {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 3px rgba(var(--color-teal-rgb), 0.15);
}

.date-range {
  display: flex;
  gap: 12px;
  align-items: center;
}

.date-input {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--color-text-primary);
  font-size: 14px;
  transition: all 0.2s;
}

.date-input:hover {
  border-color: var(--color-text-muted);
}

.date-input:focus {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 3px rgba(var(--color-teal-rgb), 0.15);
}

.history-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

.history-stat {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-card-border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s;
}

.history-stat:hover {
  transform: translateY(-4px);
  border-color: var(--color-teal-500);
  box-shadow: var(--shadow-md);
}

.history-stat h4 {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.history-stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
}

/* Mobile Navigation */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(14, 17, 20, 0.95); /* Graphite 900 */
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--color-border);
  padding: 8px;
  z-index: 1000;
}

/* FIRST BADGE FOR TEAL PRO 4 */
.mobile-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: #FFFFFF;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 11px;
}

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

.mobile-nav-btn.active {
  color: var(--color-teal-500);
  background: rgba(0, 194, 168, 0.15);
}

/* Responsive */
@media (max-width: 1024px) {
  .database-layout {
    grid-template-columns: 1fr;
  }

  .filters-sidebar {
    position: static;
  }

  .market-sections {
    grid-template-columns: 1fr;
  }

  .detail-header {
    grid-template-columns: 1fr;
  }
}

/* Watchlist Mobile Styles */
@media (max-width: 768px) {
  /* Hide desktop search/toolbar on watchlist mobile */
  #watchlist-view .database-toolbar {
    display: none;
  }

  /* Show mobile search container */
  #watchlist-view .watchlist-mobile-search {
    display: block;
  }

  /* Hide filters sidebar on mobile */
  #watchlist-view .filters-sidebar {
    display: none;
  }

  /* Full width for database content */
  #watchlist-view .database-layout {
    display: block;
  }
}

@media (max-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
  }
}

@media (max-width: 768px) {
  .nav-desktop {
    display: none;
  }

  .mobile-nav {
    display: flex;
  }

  .main-content {
    padding: 20px;
    padding-bottom: 80px;
  }

  .header-content {
    padding: 12px 16px;
  }

  .search-container-header {
    display: none;
  }

  .hero {
    padding: 40px 24px;
  }

  .hero-title {
    font-size: 32px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

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

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

  .market-row {
    grid-template-columns: 1fr 60px 80px 80px;
    gap: 8px;
    font-size: 13px;
  }

  .database-toolbar {
    float: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-left: 0;
  }

  .sort-select {
    width: 100%;
  }

  .player-card {
    min-width: 100%;
  }

  /* Home search: uplift + compact size (MOBILE ONLY) */
  .search-section {
    padding: 1.25rem 0 0.5rem;
    margin-bottom: 1rem;
  }

  .search-container {
    padding: 0 12px;
  }

  .search-box {
    transform: translateY(-6px);
    padding: 0.55rem 1rem;
    border-radius: 12px;
    background: var(--color-graphite-800);
    border: 1px solid var(--color-border);
  }

  .search-box .search-icon {
    width: 20px;
    height: 20px;
    margin-right: 7px;
  }

  .search-box .search-input {
    font-size: 0.8125rem;
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text-primary);
    line-height: 1.2;
  }

  /* Players (Database) view search matches Home pill (MOBILE ONLY) */
  .database-toolbar .search-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--color-graphite-800);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 0.55rem 1rem;
    position: relative;
  }

  .database-toolbar .search-container .search-icon {
    position: static;
    transform: none;
    left: auto;
    top: auto;
    margin-right: 8px;
    color: var(--color-text-muted);
    flex-shrink: 0;
  }

  .database-toolbar .search-container .search-input {
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: var(--color-text-primary);
  }

  /* Slight uplift for Players toolbar alignment */
  .database-toolbar {
    margin-top: -6px;
  }

  .market-sections {
    grid-template-columns: 1fr;
  }

  .detail-header {
    grid-template-columns: 1fr;
  }

  .stats-grid-detail {
    grid-template-columns: 1fr;
  }

  /* Shrink market overview boxes on mobile */
  .market-overview {
    grid-template-columns: 2fr 2fr;
    gap: 8px;
    padding: 8px;
  }

  .market-stat-box {
    padding: 12px 8px;
    border-radius: 8px;
  }

  .market-stat-box h3 {
    font-size: 10px;
    letter-spacing: 1px;
    margin: 0 0 6px 0;
    opacity: 0.7;
  }

  .market-stat-box .value {
    font-size: 16px;
    font-weight: 700;
  }

  /* Reduce market gainers/losers tables size on mobile */
  #gainers-table,
  #losers-table {
    font-size: 12px;
  }

  #gainers-table tr,
  #losers-table tr {
    padding: 8px;
  }

  #gainers-table td,
  #losers-table td {
    padding: 6px 4px;
    font-size: 11px;
  }

  #gainers-table th,
  #losers-table th {
    padding: 6px 4px;
    font-size: 11px;
  }

  /* Reduce market row height */
  .market-row {
    padding: 8px;
    margin-bottom: 8px;
  }

  /* Reduce player avatar size on mobile */
  .market-player-avatar {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  /* Reduce player info font size */
  .market-player-info h4 {
    font-size: 13px;
    margin-bottom: 2px;
  }

  .market-player-info p {
    font-size: 10px;
  }

  /* Reduce ovr/price box sizes */
  .market-ovr,
  .market-price {
    font-size: 13px;
  }
}

/* Search Section Styles */
.search-section {
  padding: 0.75rem 0 0.5rem;
  margin-bottom: 0.875rem;
}

.search-section .search-container {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 1rem;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 0.35rem 0.875rem;
  transition: all 0.3s ease;
  height: 51px;
  margin-top: -20px;
}

.search-box:focus-within {
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 4px rgba(var(--color-teal-rgb), 0.2), 0 8px 24px rgba(var(--color-teal-rgb), 0.3);
  background: var(--color-graphite-800);
}

.search-icon {
  color: var(--color-text-muted);
  margin-right: 12px;
  flex-shrink: 0;
}

/* Change icon color when input is focused */
.search-box:focus-within .search-icon {
  color: var(--color-text-primary);
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--color-text-primary);
  font-weight: 500;
}

.search-input::placeholder {
  color: var(--color-text-muted);
}


@media (max-width: 768px) {
  .search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--color-graphite-800);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.35rem 0.875rem;
    transition: all 0.3s ease;
    height: 39px;
    margin-top: -20px;
  }

}

/* Graphite Teal Pro - Theme Root Updates */
:root {
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-secondary: var(--color-graphite-700);
  --color-secondary-hover: var(--color-graphite-800);
  --color-background: var(--color-graphite-900);
  --color-surface: var(--color-graphite-800);
}

.btn-primary {
  background: var(--color-teal-500);
  color: var(--color-graphite-900) !important; /* Dark text for contrast */
  box-shadow: 0 4px 15px rgba(0, 194, 168, 0.2);
}

.btn-primary:hover {
  background: var(--color-teal-600);
  box-shadow: 0 6px 20px rgba(0, 194, 168, 0.3);
}

.section-title {
  color: var(--color-text-primary) !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
}

.player-card {
  border: 1px solid var(--color-card-border);
  background: var(--color-graphite-800);
}

.player-card:hover {
  border-color: var(--color-teal-500);
  box-shadow: var(--shadow-lg);
}

/* Latest Players Section - Smaller Cards */
.latest-players-scroll .player-card {
  min-width: 280px;
  max-width: 280px;
}

.latest-players-scroll .player-avatar {
  width: 48px;
  height: 48px;
  font-size: 16px;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.latest-players-scroll .player-rating {
  font-size: 20px;
  padding: 4px 10px;
  background: rgba(0, 194, 168, 0.1);
  border: 1px solid rgba(0, 194, 168, 0.3);
  color: var(--color-teal-500);
}

.latest-players-scroll .player-info h3 {
  font-size: 16px;
}

/* Player Stats Display */
.player-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  background: var(--color-graphite-700);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.stat-label {
  font-size: 10px;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

/* Smaller stats for latest players */
.latest-players-scroll .player-stats {
  gap: 6px;
  padding: 10px;
  margin: 10px 0;
}

.latest-players-scroll .stat-label {
  font-size: 9px;
}

.latest-players-scroll .stat-value {
  font-size: 14px;
}

.player-details {
  color: var(--color-text-primary) !important;
  opacity: 1 !important;
}

/* Fix update item text */
.update-info p {
  color: var(--color-text-muted) !important;
  opacity: 1 !important;
}

/* FIX: Brighten View Details button text */
.player-actions .btn-primary {
  color: var(--color-graphite-900) !important; /* Dark text on Teal */
  font-weight: 600 !important;
}

/* Ensure all button text is visible */
.btn {
  opacity: 1 !important;
}

/* Force navigation, titles, and filters to be white/primary */
.section-title,
.filters-header h3,
.view-header h1,
.section-header h2,
.market-section-title,
h1, h3, h4, h5, h6 {
  color: #FFFFFF !important; /* Pure white headings for readability */
  background: none !important;
  -webkit-background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
  background-clip: unset !important;
}

/* Fix filter labels */
.filter-label {
  color: var(--color-text-muted) !important;
}

/* Database header */
.database-layout h3 {
  color: #FFFFFF !important;
}

/* FIRST BADGE FOR TEAL PRO 5 */
/* ========================================
   MOBILE: Compact Market Stats Cards
   ======================================== */

@media (max-width: 768px) {
  /* Stats grid: 2x2 layout with equal heights */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
  }

}

/* ------------------------ Graphite Teal Pro Part 5 -----------------------------------------------------*/

/* ==========================================
   MOBILE SEARCH CONTAINER (GOOGLE LENS STYLE)
   ========================================== */

/* Mobile Search Container - Hidden by default */
.mobile-search-container {
  display: none;
  position: relative;
  width: 100%;
  margin-bottom: 24px;
}

.mobile-search-input {
  width: 100%;
  padding: 14px 48px;
  background: var(--color-graphite-800);
  border: 2px solid var(--color-border);
  border-radius: 50px;
  font-size: 15px;
  color: var(--color-text-primary);
  transition: all 0.2s;
}

.mobile-search-input:focus {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 4px rgba(var(--color-teal-rgb), 0.15);
}

.mobile-search-input::placeholder {
  color: var(--color-text-muted);
}

.mobile-filter-icon,
.mobile-search-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 1;
}

.mobile-filter-icon {
  left: 8px;
}

.mobile-search-icon {
  right: 8px;
  pointer-events: none;
}

.mobile-filter-icon:active {
  color: var(--color-teal-500);
  transform: translateY(-50%) scale(0.95);
}

.filter-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--color-teal-500);
  border-radius: 50%;
  border: 2px solid var(--color-background);
  box-shadow: 0 0 8px rgba(0, 194, 168, 0.4);
}

/* ==========================================
   MOBILE FILTER MODAL
   ========================================== */

.mobile-filter-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
}

.mobile-filter-modal.active {
  display: block;
}

.mobile-filter-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.3s ease;
}

.mobile-filter-drawer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-height: 85vh;
  background: var(--color-graphite-900);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.3s ease;
  display: flex;
  flex-direction: column;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.mobile-filter-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
}

.mobile-filter-header h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary); /* Pure white text */
  margin: 0;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

.mobile-filter-close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.2s;
}

.mobile-filter-close:active {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-teal-500);
}

.mobile-filter-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.mobile-filter-footer {
  display: flex;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid var(--color-border);
  background: var(--color-graphite-900);
}

.mobile-filter-footer button {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
}

.btn-secondary:active {
  transform: scale(0.98);
  background: rgba(255, 255, 255, 0.05);
}

.btn-primary {
  background: var(--color-teal-500);
  border: none;
  color: var(--color-graphite-900) !important; /* Dark text for contrast */
  box-shadow: 0 4px 15px rgba(0, 194, 168, 0.2);
}

.btn-primary:active {
  transform: scale(0.98);
  opacity: 0.9;
}

/* ==========================================
   MOBILE RESPONSIVE
   ========================================== */

@media (max-width: 1020px) {
  /* Show mobile search container */
  .mobile-search-container {
    display: block;
  }

  /* Hide desktop sidebar and toolbar search */
  .filters-sidebar {
    display: none !important;
  }

  .database-toolbar .search-container {
    display: none !important;
  }

  .database-layout {
    display: block;
  }

  .database-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
  }

}

@media (max-width: 768px) {
  /* Show mobile search container */
  .mobile-search-container {
    display: block;
  }

  /* Hide desktop sidebar and toolbar search */
  .filters-sidebar {
    display: none !important;
  }

  .database-toolbar .search-container {
    display: none !important;
  }

  .database-layout {
    display: block;
  }

 .database-content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  /* Show mobile search container */
  .mobile-search-container {
    display: block;
  }

  /* Hide desktop sidebar and toolbar search */
  .filters-sidebar {
    display: none !important;
  }

  .database-toolbar .search-container {
    display: none !important;
  }

  .database-layout {
    display: block;
  }

  .database-content {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }
}


/* Horizontal player card */
.player-card-horizontal {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--color-graphite-800);
  border: 1px solid var(--color-card-border);
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.player-card-horizontal:hover {
  border-color: var(--color-teal-500);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.player-card-horizontal:active {
  transform: scale(0.98);
}


/* ==================== PLAYER CARD STYLING ==================== */

/* Player Card Container */
.player-card-image-container {
    position: relative;
    height: 134px;
    width: 108px;
    margin-right: 30px;
    margin-bottom: 10px;
    margin-top: 15px;
    border-radius: 8px;
    bottom: 17px;
    right: 5px;
    bottom: 28px;
}

/* Card Background Image */
.player-card-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* Main Player Image */
.player-card-main-image {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 130%;
    height: 130%;
    object-fit: contain;
    z-index: 5;
}

/* Player Name */
.player-card-name {
    position: absolute;
    top: 89px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.71rem;
    font-weight: 800;
    font-family: 'CruyffSans', sans-serif;
    text-transform: uppercase;
    z-index: 10;
    letter-spacing: -0.2px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 4px;
}

/* OVR Rating */
.player-card-ovr {
    position: absolute;
    top: 13px;
    left: 14px;
    font-size: 0.999rem;
    font-weight: 800;
    font-family: 'CruyffSans', sans-serif;
    z-index: 10;
    letter-spacing: -0.1px;
    transform: scaleY(1.2);
}

/* Position Badge */
.player-card-position {
    position: absolute;
    top: 29px;
    left: 100px;
    font-size: 1.25rem;
    font-weight: 800;
    font-family: 'CruyffSans', sans-serif;
    z-index: 10;
    letter-spacing: 1px;
    line-height: 1.1;
    margin-right: 15px;
}

/* Nation Flag */
.player-card-nation-flag {
    position: absolute;
    bottom: 18px;
    left: 24px;
    width: 12px;
    height: 9px;
    border-radius: 1px;
    z-index: 10;
    object-fit: cover;
}

/* Club Flag */
.player-card-club-flag {
    position: absolute;
    top: 55px;
    left: 60px;
    width: 14px;
    height: 14px;
    border-radius: 2px;
    z-index: 10;
    object-fit: contain;
}


.player-card-league-flag{
    position: absolute;
    top: 80px;
    left: 60px;
    width: 50px;
    height: 50px;
    border-radius: 2px;
    z-index: 10;
    object-fit: contain;
}

/* Player Initials Fallback */
.player-initials {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text-muted);
    background: var(--color-graphite-700);
    border-radius: inherit;
    z-index: 3;
}


/* Left side - Player card & basic info */
.player-card-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100px;
  min-width: 100px;
  flex-shrink: 0;
  margin-right: 12px;
}

.player-card-image {
  position: relative;
  width: 75px;
  height: 75px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.player-avatar-large {
  width: 75px;
  height: 75px;
  border-radius: 12px;
  background: var(--color-graphite-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  border: 2px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.player-overall-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--color-teal-500);
  color: var(--color-graphite-900); /* Dark text on Teal badge */
  font-size: 13px;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 8px;
  border: 2px solid var(--color-graphite-800);
  box-shadow: var(--shadow-sm);
}

.player-position-badge {
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
}

.player-basic-info {
  text-align: center;
  width: 100%;
  overflow: hidden;
}

.player-name-mobile {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 3px 0;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.player-club-mobile {
  font-size: 9px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.player-price-mobile {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-price-mobile .price-value {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-primary);
}

.player-price-mobile .price-change {
  font-size: 10px;
  font-weight: 600;
}

/* Right side - Stats grid */
.player-card-right {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  padding: 4px 0;
}

.player-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.stat-circle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  padding: 6px;
  box-sizing: border-box;
  transition: all 0.2s;
}

.stat-circle:hover {
  background: rgba(0, 194, 168, 0.05);
  border-color: var(--color-teal-500);
}

.stat-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text-primary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  line-height: 1;
  margin-bottom: 2px;
}

.stat-label {
  font-size: 8px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-transform: uppercase;
  line-height: 1;
}

/* Watchlist button */
.player-watchlist-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
  flex-shrink: 0;
}

.player-watchlist-btn:hover {
  color: var(--color-teal-500);
  border-color: var(--color-teal-500);
  background: rgba(0, 194, 168, 0.1);
}

/* FIRST BADGE FOR TEAL PRO 6 */
.player-watchlist-btn.active {
  background: var(--color-status-error); /* Solid Red for favorite */
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

.player-watchlist-btn:hover {
  transform: scale(1.1);
  color: var(--color-teal-500);
}

.player-watchlist-btn:active {
  transform: scale(0.95);
}

/* Price change colors */
.price-change.up {
  color: var(--color-status-success);
}

.price-change.down {
  color: var(--color-status-error);
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

/* Small mobile (320px - 375px) */
@media (max-width: 375px) {
  .player-card-left {
    width: 85px;
    min-width: 85px;
    margin-right: 8px;
  }

  .player-card-image {
    width: 65px;
    height: 65px;
  }

  .player-avatar-large {
    width: 65px;
    height: 65px;
    font-size: 18px;
  }

  .player-stats-grid {
    gap: 5px;
  }

  .stat-value {
    font-size: 13px;
  }

  .stat-label {
    font-size: 7px;
  }

  .player-card-horizontal {
    padding: 10px;
  }
}

/* Tablet and up (768px+) */
@media (min-width: 768px) {
  .player-stats-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
  }

  .player-card-left {
    width: 120px;
    min-width: 120px;
    margin-right: 16px;
  }

  .player-card-image {
    width: 90px;
    height: 90px;
  }

  .player-avatar-large {
    width: 90px;
    height: 90px;
    font-size: 28px;
  }

  .player-name-mobile {
    font-size: 13px;
  }

  .player-club-mobile {
    font-size: 11px;
  }

  .stat-value {
    font-size: 16px;
  }

  .stat-label {
    font-size: 5px;
  }

  .player-card-horizontal {
    padding: 16px;
  }
}

/* Large desktop (1200px+) */
@media (min-width: 1200px) {
  .stat-value {
    font-size: 18px;
  }

  .stat-label {
    font-size: 10px;
  }

  .player-card-horizontal {
    max-width: 1000px;
    margin: 0 auto;
  }
}

/* Hide old player card elements if they exist */
.player-card-horizontal .player-card-header,
.player-card-horizontal .player-info,
.player-card-horizontal .player-price:not(.player-price-mobile),
.player-card-horizontal .player-actions,
.player-card-horizontal .player-details {
  display: none !important;
}

/* ============================================
   GRAPHITE PLAYER DATABASE - TABLE LIST STYLE
   ============================================ */

/* Map Renderz vars to Graphite Theme */
:root {
  --renderz-bg: var(--color-graphite-900);
  --renderz-row-hover: var(--color-graphite-800);
  --renderz-border: var(--color-border);
  --renderz-stat-pill: var(--color-graphite-700);
  --renderz-text-primary: var(--color-text-primary);
  --renderz-text-secondary: var(--color-text-muted);
  --renderz-text-tertiary: var(--color-text-muted);
  --renderz-accent: var(--color-teal-500);
  --renderz-accent-secondary: var(--color-teal-600);
}

/* Player Row Container */
.player-row {
  display: grid;
  grid-template-columns: 140px minmax(120px, 200px) 1fr 60px;
  gap: 16px;
  align-items: center;
  padding: 13px 20px;
  border-bottom: 1px solid var(--renderz-border);
  background: var(--renderz-bg);
  transition: all 0.2s ease;
  cursor: pointer;
  position: relative;
  min-height: 80px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}


.player-row:hover {
  background: var(--renderz-row-hover);
  border-bottom-color: var(--color-teal-500);
}

/* Player Card (Left Section) */
.player-row-card {
  position: relative;
  width: 90px;
  height: 110px;
  background: var(--color-graphite-700);
  border-radius: 8px;
  flex-shrink: 0;
  margin-right: 16px;
  overflow: visible;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

/* Card image placeholder - universal fix */
.player-card-image-placeholder {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}


/* Card image placeholder - universal fix */
.player-card-image-placeholder {
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}


.player-card-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.player-card-overall {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-teal-500);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  line-height: 1;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.player-card-position {
  font-size: 11px;
  font-weight: 800;
  color: var(--color-text-primary);
  text-transform: uppercase;
  margin-top: 2px;
  letter-spacing: -0.5px;
  left: 16px;
}

.player-card-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.02);
}

.player-initials {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-graphite-800);
  /* Use a dark color or low contrast if it's a placeholder behind image */
  opacity: 0.5;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

/* Player Info (Middle Section) */
.player-row-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.player-info-name {
  font-size: 18px;
  font-weight: 600;
  color: var(--renderz-text-primary);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-left: 11px;
}

.player-info-meta {
  font-size: 14px;
  font-weight: 500;
  color: var(--renderz-text-secondary);
  line-height: 1.2;
  margin-left: 9px;
}

.player-info-secondary {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-start;
    margin-top: 4px;
}

.secondary-position-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: rgba(var(--color-teal-rgb), 0.15);
    border: 1px solid rgba(var(--color-teal-rgb), 0.35);
    color: var(--color-teal-500);

    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 8px;

    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-right: 6px;

    box-shadow: 0 0 10px rgba(var(--color-teal-rgb), 0.25);
    backdrop-filter: blur(6px);

    transition: all 0.2s var(--ease-standard);
}

.secondary-position-badge:hover {
    background: rgba(var(--color-teal-rgb), 0.25);
    border-color: var(--color-teal-500);
    box-shadow: 0 0 18px rgba(var(--color-teal-rgb), 0.45);
    transform: translateY(-1px) scale(1.03);
}

/* Stats Grid (Right Section) - SINGLE ROW */
.player-row-stats {
  display: flex;
  gap: 12px;
  margin-left: 0;
  margin-right: 0;
  flex-shrink: 0;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  justify-content: flex-start;
  /* Ensure the stats container never forces the row wider than the viewport */
  width: 100%;
  max-width: 100%;
  min-width: 0; /* critical to prevent grid/flex child overflow expanding the row */
  scroll-behavior: smooth;
}

.player-row-stats::-webkit-scrollbar {
  height: 6px;
}

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

.player-row-stats::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.player-row-stats::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}


.stat-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--renderz-stat-pill);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 6px 8px;
  gap: 1px;
  width: 58px;
  height: 42px;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.stat-pill-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  line-height: 1;
}

.stat-pill-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--renderz-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  line-height: 1;
}

/* Watchlist Button */
.player-row-watchlist {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  color: var(--renderz-text-secondary);
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.player-row-watchlist:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-teal-500);
  border-color: var(--color-teal-500);
}

.player-row-watchlist.active {
  background: #0E1114;
  color: #b71111;
  border-color: transparent;
}


/* Sorting Header - PERFECTLY ALIGNED */
.database-sort-header {
  display: flex;
  align-items: center;
  padding: 12px 37px;
  background: var(--color-graphite-900);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
  flex-wrap: nowrap;
}

/* Card Spacer - Matches player card width */
.sort-card-spacer {
  width: 90px;
  flex-shrink: 0;
  margin-right: 16px;
}

/* Info Spacer - Matches player info section */
.sort-info-spacer {
  flex: 1;
  min-width: 0;
  margin-right: 20px;
}

/* Sort Label Group - Matches player-row-stats exactly */
.sort-label-group {
  display: flex;
  gap: 12px;
  flex-wrap: nowrap !important;
  flex-shrink: 0;
}

/* Watchlist Spacer - Matches watchlist button */
.sort-watchlist-spacer {
  width: 36px;
  flex-shrink: 0;
}

.sort-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--renderz-text-secondary);
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  user-select: none;
  width: 58px;
  flex-shrink: 0;
  white-space: nowrap;
}

.sort-label:hover {
  color: var(--color-teal-500);
}

.sort-label.active {
  color: var(--color-teal-500);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  font-weight: 700;
}

@media (max-width: 768px) {
  .sort-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--renderz-text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    user-select: none;
    width: 62px;
    flex-shrink: 0;
    white-space: nowrap;
    margin-left: -32px;
  }

  .sort-label:hover {
    color: var(--color-teal-500);
  }

  .sort-label.active {
    color: var(--color-teal-500);
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    font-weight: 700;
  }

  .database-sort-header {
    display: flex;
    align-items: center;
    padding: 12px 0px;
    background: var(--color-graphite-900);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 10;
    flex-wrap: nowrap;
    margin-left: -60px;
  }

  .sort-label-group {
    display: flex;
    gap: 15px;
    flex-wrap: nowrap !important;
    flex-shrink: 0;
  }
}

/* Players Grid Override for List Style */
#players-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--renderz-bg);
}

/* Responsive Design */
@media (max-width: 968px) {
  .player-row {
    padding: 14px 16px;
  }

  .player-row-stats {
    gap: 6px;
    margin-left: 16px;
  }

  .player-row-card {
    width: 110px;           /* Increase width */
    height: 130px;          /* Increase height */
    margin-right: 12px;
    overflow: visible;      /* Don't clip card */
  }

  .player-card-image-placeholder {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
  }

  .stat-pill {
    width: 56px;
    height: 46px;
    padding: 6px 8px;
    margin-bottom: 15px;
    margin-top: 10px;
  }

  .stat-pill-value {
    font-size: 17px;
  }

  .stat-pill-label {
    font-size: 9px;
  }

  .player-row-card {
    width: 100px;
    height: 100px;
    margin-right: 12px;
  }
}

@media (max-width: 768px) {
  .player-row {
    flex-wrap: wrap;
    padding: 12px 16px;
  }

  .player-row-card {
    width: 100px;
    height: 100px;
    margin-right: 12px;
  }

  .player-card-overall {
    font-size: 20px;
  }

  .player-card-position {
    font-size: 9px;
  }

  .player-initials {
    font-size: 24px;
  }

  .player-info-name {
    font-size: 16px;
  }

  .player-info-meta {
    font-size: 13px;
  }

  .player-row-stats {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    margin-top: 12px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
  }

  .player-row-stats::-webkit-scrollbar {
    display: none;
  }

  .stat-pill {
    width: 54px;
    height: 44px;
    padding: 6px 8px;
    margin-bottom: 15px;
    margin-top: 10px;
  }

  .stat-pill-value {
    font-size: 16px;
  }

  .stat-pill-label {
    font-size: 9px;
  }

  .player-row-watchlist {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .sort-spacer {
    width: 82px;
  }

  .sort-label-group {
    margin-right: 4px;
  }
}

/* FIRST BADGE FOR TEAL PRO 8 */
@media (max-width: 480px) {
  .player-row-stats {
    gap: 6px;
  }

  .stat-pill {
    width: 52px;
    height: 42px;
    padding: 5px 7px;
    margin-bottom: 15px;
    margin-top: 10px;
  }

  .stat-pill-value {
    font-size: 15px;
  }

  .stat-pill-label {
    font-size: 8px;
  }
  .player-row-card {
    width: 100px;
    height: 100px;
    margin-right: 12px;
  }
}

/* ------------------------- Graphite Teal Pro Part 6 -------------------------------*/

/* Players Grid Override for Renderz Style */
#players-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  background: var(--renderz-bg);
}

/* Responsive Design */
@media (max-width: 768px) {
  .player-row {
    flex-wrap: wrap;
    padding: 6px 16px;
  }

 .player-row-card {
    width: 110px;           /* Increase width */
    height: 130px;          /* Increase height */
    margin-right: 12px;
    overflow: visible;      /* Don't clip card */
  }

  .player-card-image-placeholder {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
  }

  .player-card-overall {
    font-size: 20px;
  }

  .player-card-position {
    font-size: 10px;
  }

  .player-initials {
    font-size: 24px;
  }

  .player-info-name {
    font-size: 16px;
  }

  .player-info-meta {
    font-size: 13px;
  }

  .player-row-stats {
    grid-template-columns: repeat(3, 60px);
    grid-template-rows: repeat(2, 48px);
    gap: 8px 6px;
    margin-right: 0;
    margin-top: 12px;
    width: 100%;
    order: 3;
  }

  .stat-pill {
    padding: 6px 10px;
  }

  .stat-pill-value {
    font-size: 18px;
  }

  .stat-pill-label {
    font-size: 9px;
  }

  .player-row-watchlist {
    position: absolute;
    top: 12px;
    right: 12px;
  }

  .database-sort-header {
    display: flex;
  }
}

@media (max-width: 480px) {
  .player-row-stats {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Database View Container */
#database-view {
  overflow-x: visible;
  overflow-y: visible;
}

#database-view .view-content {
  min-width: 0;
}

/* ============================================
   WATCHLIST VIEW - ENHANCED VISUAL DESIGN
   ============================================ */

/* Watchlist Container */
/* WATCHLIST VIEW - ENHANCED VISUAL DESIGN */
watchlist-view {
  background: transparent;  /* let body background show through */
  min-height: 100vh;
}

watchlist-view .view-content {
  background: transparent;  /* no solid panel behind everything */
  padding: 32px;
  max-width: 1400px;
  margin: 0 auto;
}


/* Watchlist Grid - Vertical List with Cards */
#watchlist-grid {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  padding: 0;
  grid-template-columns: unset !important;
}

/* Enhanced Player Row for Watchlist */
#watchlist-grid .player-row {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-teal-500);
  border-radius: 12px;
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Subtle gradient overlay on hover */
#watchlist-grid .player-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 194, 168, 0.05) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#watchlist-grid .player-row:hover::before {
  opacity: 1;
}

/* Hover Effect - Scale and Glow */
#watchlist-grid .player-row:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 40px rgba(0, 194, 168, 0.05);
  border-left-color: var(--color-teal-600);
  border-color: var(--color-teal-500);
}

/* Player Card Image Enhancement */
#watchlist-grid .player-row-card {
  box-shadow: var(--shadow-md);
  border: 2px solid var(--color-border);
}

#watchlist-grid .player-row:hover .player-row-card {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
  transform: scale(1.05);
  transition: all 0.3s ease;
}

/* Player Info Enhancement */
#watchlist-grid .player-info-name {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-size: 19px;
  color: var(--color-text-primary);
}

/* Stat Pills Enhancement in Watchlist */
#watchlist-grid .stat-pill {
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

#watchlist-grid .player-row:hover .stat-pill {
  background: var(--color-graphite-800);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-teal-500);
}

/* Watchlist Button Enhancement */
#watchlist-grid .player-row-watchlist {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border);
  transition: all 0.3s ease;
}

#watchlist-grid .player-row-watchlist:hover {
  background: rgba(255, 107, 107, 0.15); /* Red tint for delete action */
  border-color: var(--color-status-error);
  transform: scale(1.1);
}

#watchlist-grid .player-row-watchlist.active {
  animation: heartPulse 1.5s ease-in-out infinite;
  color: var(--color-status-error);
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* Add fade-in animation for cards */
#watchlist-grid .player-row {
  animation: fadeInUp 0.5s ease forwards;
  opacity: 0;
}

#watchlist-grid .player-row:nth-child(1) { animation-delay: 0s; }
#watchlist-grid .player-row:nth-child(2) { animation-delay: 0.1s; }
#watchlist-grid .player-row:nth-child(3) { animation-delay: 0.2s; }
#watchlist-grid .player-row:nth-child(4) { animation-delay: 0.3s; }
#watchlist-grid .player-row:nth-child(5) { animation-delay: 0.4s; }
#watchlist-grid .player-row:nth-child(n+6) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Watchlist Header Enhancement */
#watchlist-view .view-header {
  padding: 32px;
  background: linear-gradient(180deg, var(--color-graphite-800) 0%, transparent 100%);
  border-bottom: 1px solid var(--color-border);
}

#watchlist-view .view-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 8px;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

#watchlist-view .view-header p {
  color: var(--renderz-text-secondary);
  font-size: 14px;
}

/* Watchlist Layout Improvements */
#watchlist-view .watchlist-layout {
  margin-top: 0; /* Remove extra space since header is hidden */
}

#watchlist-view .watchlist-toolbar {
  padding-top: 16px; /* Add space at the top */
}

/* Empty State Enhancement */
#empty-watchlist,
#watchlist-empty {
  display: none;
  text-align: center;
  padding: 120px 32px;
  background: var(--renderz-bg);
}

#empty-watchlist.visible,
#watchlist-empty.visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#empty-watchlist svg,
#watchlist-empty svg {
  color: var(--renderz-text-secondary);
  opacity: 0.5;
  margin-bottom: 24px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

#empty-watchlist h3,
#watchlist-empty h3 {
  font-size: 28px;
  margin-bottom: 12px;
  color: var(--renderz-text-primary);
  font-weight: 700;
}

#empty-watchlist p,
#watchlist-empty p {
  color: var(--renderz-text-secondary);
  margin-bottom: 32px;
  font-size: 16px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  #watchlist-view .view-content {
    padding: 16px;
  }

  #watchlist-grid {
    gap: 12px;
  }

  #watchlist-grid .player-row {
    padding: 16px 20px;
    border-radius: 10px;
  }

  #watchlist-grid .player-row:hover {
    transform: translateY(-2px) scale(1);
  }
}

/* ============================================
   DATABASE SEARCH INPUT ENHANCEMENT - DESKTOP ONLY
   ============================================ */

/* Database view search input - Desktop only */
@media (min-width: 769px) {
  /* Search input field in database view only */
  #database-view .search-bar input,
  #database-view input[type="text"],
  #database-view input[type="search"] {
    background: var(--color-graphite-800) !important;
    border: 1.5px solid var(--color-border) !important;
    color: var(--color-text-primary) !important;
    padding: 12px 16px 12px 44px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    box-shadow: var(--shadow-sm) !important;
  }

  /* Hover state */
  #database-view .search-bar input:hover,
  #database-view input[type="text"]:hover,
  #database-view input[type="search"]:hover {
    border-color: var(--color-text-muted) !important;
    background: var(--color-graphite-700) !important;
    box-shadow: var(--shadow-md) !important;
  }

  /* Focus state with Teal glow */
  #database-view .search-bar input:focus,
  #database-view input[type="text"]:focus,
  #database-view input[type="search"]:focus {
    outline: none !important;
    border-color: var(--color-teal-500) !important;
    border-width: 2px !important;
    background: var(--color-graphite-800) !important;
    box-shadow: 0 0 0 4px rgba(var(--color-teal-rgb), 0.2) !important;
    padding-left: 43px !important;
  }

  /* Placeholder text */
  #database-view .search-bar input::placeholder,
  #database-view input[type="text"]::placeholder,
  #database-view input[type="search"]::placeholder {
    color: var(--color-text-muted) !important;
    font-size: 14px !important;
  }

  /* Search icon enhancement in database view */
  #database-view .search-bar svg,
  #database-view .search-icon {
    color: var(--color-teal-500) !important;
    opacity: 0.85 !important;
    transition: all 0.3s ease !important;
  }

  /* Icon on hover and focus */
  #database-view .search-bar:hover svg,
  #database-view .search-bar:focus-within svg {
    opacity: 1 !important;
    color: var(--color-teal-500) !important;
    filter: drop-shadow(0 0 4px rgba(0, 194, 168, 0.4));
  }
}

/* =============== Latest Players Section - COMPACT VERSION =============== */
.latest-players-section {
  margin: 0 auto;
  max-width: 100%;
  padding: 1.5rem 0 2rem;
  overflow: hidden;
}

.latest-players-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0 2rem;
  max-width: 1650px;
  margin-left: auto;
  margin-right: auto;
}

.latest-players-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text-primary);
  margin: 0;
  letter-spacing: -0.02em;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

.latest-players-viewall {
  color: var(--color-text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  background: rgba(0, 194, 168, 0.05);
  border: 2px solid var(--color-teal-500);
  padding: 0.25rem 0.6rem;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.latest-players-viewall:hover {
  color: var(--color-graphite-900);
  background-color: var(--color-teal-500);
}

@media (max-width: 768px) {
  .latest-players-viewall {
    padding: 0.10rem 0.4rem;
    font-size: 0.70rem;
  }
}

/* Horizontal Scroll Container */
.latest-players-grid {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 2rem 1rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-teal-500) var(--color-graphite-800);
}

.latest-players-grid::-webkit-scrollbar {
  height: 6px;
}

.latest-players-grid::-webkit-scrollbar-track {
  background: var(--color-graphite-800);
  border-radius: 10px;
}

.latest-players-grid::-webkit-scrollbar-thumb {
  background: var(--color-teal-500);
  border-radius: 10px;
}

.latest-players-grid::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal-600);
}

/* Player Card - COMPACT SIZE */
.latest-player-card {
  background: var(--color-graphite-800);
  border: 1.5px solid var(--color-border);
  border-radius: 14px;
  padding: 0.9rem 0.8rem 0.9rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-md);

  /* COMPACT SIZE */
  min-width: 227px !important;
  max-width: 228px !important;
  min-height: 355px !important;
  max-height: 355px !important;

  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.latest-player-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--color-teal-500);
  border-radius: 16px 16px 0 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.latest-player-card:hover::before {
  opacity: 1;
}

.latest-player-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.7rem;
  margin-left: 0.5rem;
}

.latest-avatar {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-weight: 800;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.latest-rating {
  background: rgba(0, 194, 168, 0.15);
  color: var(--color-teal-500);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 194, 168, 0.25);
  margin-right: 0.3rem;
}

/* Card Center */
.latest-player-center {
  margin-bottom: -0.2rem;
  flex-grow: 1;
}

.latest-player-name {
  color: var(--color-text-primary);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
  line-height: 1.2;
  margin-left: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 3px;
}

.latest-position-badge {
  display: inline-block;
  background: var(--color-teal-500);
  color: var(--color-graphite-900); /* Dark text on Teal */
  font-weight: 700;
  font-size: 0.7rem;
  border-radius: 5px;
  padding: 2px 9px;
  box-shadow: var(--shadow-sm);
  float: right;
  margin-right: 12px;
  margin-top: -22px;
}

.latest-meta {
  color: var(--color-text-muted);
  font-size: 0.75rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  margin-left: 0.5rem;
}

/* Player Stats Grid - COMPACT */
.latest-player-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 0.5rem 0.3rem;
  background: var(--color-graphite-700);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  margin-bottom: 0.8rem;
  margin-top: 0.7rem;
}

/* FIRST BADGE FOR TEAL PRO 9 */
.latest-player-stats .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--color-graphite-700);
  border-radius: 6px;
}

.latest-player-stats .stat-value {
  color: var(--color-text-primary) !important;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: -0.01em;
  margin-top: 7px;
}

/* COMPACT STAT BOX SIZE */
.stat-item {
  padding: 5px;
  border-radius: 6px;
}

.latest-player-stats .stat-label {
  color: var(--color-text-muted);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
}

.trending-player-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
  padding: 0.8rem;
  background: var(--color-graphite-700);
  border-radius: 10px;
  border: 1px solid var(--color-border);
}

.trending-player-stats .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.trending-player-stats .stat-value {
  color: var(--color-text-primary);
  font-weight: 700;
  font-size: 1.15rem;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  letter-spacing: -0.02em;
}

.trending-player-stats .stat-label {
  color: var(--color-text-muted);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* Light sweep gloss */
.latest-details-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 120%;
  height: 100%;
  background: rgba(255, 255, 255, 0.18);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}

/* Hover: lift + brighter gradient + glow */
.latest-details-btn:hover {
  background: var(--color-teal-600);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 194, 168, 0.3);
}

.latest-details-btn:hover::before {
  left: 100%;
}

/* Active: press down feel */
.latest-details-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px rgba(0, 194, 168, 0.2);
}

.latest-watchlist {
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  background: var(--color-graphite-700);
  backdrop-filter: blur(10px);
  border: 1px solid var(--color-border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  color: var(--color-text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
  z-index: 3;
}

.latest-watchlist:hover {
  transform: scale(1.2);
  color: var(--color-teal-500);
  background: var(--color-graphite-800);
}

.latest-watchlist.active {
  color: var(--color-status-error);
  background: rgba(255, 107, 107, 0.15);
  border-color: var(--color-status-error);
}

/* Responsive */
@media (max-width: 768px) {
  /* COMPACT SECTION SPACING */
  .latest-players-section {
    padding: 1rem 0 1.5rem;
  }

  .latest-players-header {
    padding: 0 0.75rem;
    margin-bottom: 0.75rem;
  }

  .latest-players-title {
    font-size: 1rem;
  }

  /* ULTRA COMPACT CARD FOR MOBILE */
  .latest-player-card {
    min-width: 202px !important;
    max-width: 208px !important;
    min-height: 323px !important;
    padding: 0.7rem 0.6rem 0.7rem !important;
    border-radius: 12px;
  }

  /* COMPACT TOP SECTION */
  .latest-player-top {
    margin-bottom: 0.5rem;
    margin-left: 0.3rem;
  }

  .latest-avatar {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.1rem !important;
    border-radius: 8px;
  }

  .latest-rating {
    font-size: 0.8rem !important;
    padding: 0.25rem 0.6rem !important;
    border-radius: 6px;
    margin-right: 0.2rem;
  }

  /* COMPACT CENTER SECTION */
  .latest-player-center {
    margin-bottom: -0.2rem;
  }

  .latest-player-name {
    font-size: 0.85rem !important;
    margin-bottom: 0.25rem;
    margin-left: 0.3rem;
  }

  .latest-position-badge {
    font-size: 0.5rem !important;
    padding: 2px 7px !important;
    margin-right: 8px;
    margin-top: -21px;
  }

  .latest-meta {
    font-size: 0.68rem !important;
    margin-left: 0.3rem;
    margin-bottom: 0.25rem;
  }

  /* SUPER COMPACT STATS GRID */
  .latest-player-stats {
    gap: 10px !important;
    padding: 0.4rem 0.25rem !important;
    margin-bottom: 0.6rem;
    margin-top: 0.7rem;
  }

  .latest-player-stats .stat-item {
    padding: 3px !important;
    border-radius: 5px;
  }

  .latest-player-stats .stat-value {
    font-size: 0.75rem !important;
    margin-top: 5px;
  }

  .latest-player-stats .stat-label {
    font-size: 0.55rem !important;
  }


  /* WATCHLIST BUTTON COMPACT */
  .latest-watchlist {
    top: 0.8rem !important;
    right: 0.8rem !important;
    width: 32px !important;
    height: 32px !important;
    font-size: 1.1rem !important;
  }
}



.slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #2ecc71; /* Teal background */
  color: white;
  font-size: 1.2rem;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.slider span {
  display: inline-block;
  animation: slide 10s linear infinite;
}

@keyframes slide {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}.slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #2ecc71; /* Teal background */
  color: white;
  font-size: 1.2rem;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
}

.slider span {
  display: inline-block;
  animation: slide 10s linear infinite;
}

@keyframes slide {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}.slider {
  position: relative;  /* Changed from absolute */
  width: 100%;
  background: linear-gradient(rgb(85, 204, 162));
  color: #000000;
  padding: 4px 0;
  text-align: center;
  overflow: hidden;
  border-bottom: 2px solid #0f3460;
  margin: 0;  /* Add this */
  z-index: 100;  /* Add this */
}

.slider span {
  display: inline-block;
  animation: slide 10s linear infinite;
}

@keyframes slide {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(-100%);
  }
}



/* =============== Trending Players Section - MATCHING LATEST PLAYERS THEME =============== */
.trending-players-section {
  margin: 0 auto;
  max-width: 100%;
  padding: 2rem 0 2.5rem;
  overflow: hidden;
}

.trending-players-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0 2rem;
  max-width: 1650px;
  margin-left: auto;
  margin-right: auto;
}

.trending-players-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-text-primary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  margin: 0;
  letter-spacing: -0.02em;
}

/* Horizontal Scroll Container */
.trending-players-grid {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 2rem 1.2rem;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-teal-500) rgba(255, 255, 255, 0.05);
}

.trending-players-grid::-webkit-scrollbar {
  height: 6px;
}

.trending-players-grid::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 10px;
}

.trending-players-grid::-webkit-scrollbar-thumb {
  background: var(--color-teal-500);
  border-radius: 10px;
}

.trending-players-grid::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal-600);
}

/* Trending Rank Badge - REPOSITIONED TO TOP CORNER */
.trending-rank {
  position: absolute;
  top: -8px;
  left: -8px;
  background: var(--color-graphite-700);
  backdrop-filter: blur(10px);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  font-weight: 900;
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  border-radius: 7px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
  z-index: 10;
  letter-spacing: 0.05em;
}

.trending-rank.rank-1 {
  background: linear-gradient(135deg, #FBBF24, #FFA500);
  color: #000;
  border: none;
  box-shadow: 0 3px 10px rgba(255, 215, 0, 0.4);
}

.trending-rank.rank-2 {
  background: linear-gradient(135deg, #E5E5E5, #C0C0C0);
  color: #000;
  border: none;
  box-shadow: 0 3px 10px rgba(192, 192, 192, 0.4);
}

.trending-rank.rank-3 {
  background: linear-gradient(135deg, #CD7F32, #B87333);
  color: #000;
  border: none;
  box-shadow: 0 3px 10px rgba(205, 127, 50, 0.4);
}

.trending-avatar {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  font-weight: 800;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  letter-spacing: -0.02em;
}

.trending-rating {
  background: rgba(0, 194, 168, 0.15);
  backdrop-filter: blur(10px);
  color: var(--color-teal-500);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.35rem 1rem;
  border-radius: 9px;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-sm);
  margin-right: 0.5rem;
  border: 1px solid rgba(0, 194, 168, 0.25);
}

/* Card Center */
.trending-player-center {
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* ------------------------- Graphite Teal Pro Part 7 -------------------------------*/

.trending-change.down {
  color: var(--color-status-error);
  background: rgba(255, 107, 107, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
  .trending-players-header {
    padding: 0 1rem;
  }

  .trending-players-grid {
    padding: 0.5rem 1rem 1.2rem;
    gap: 14px;
  }

  .trending-players-title {
    font-size: 1rem;
  }
}

/* Stats Button (Database section) */
.stats-btn {
  background: var(--color-graphite-800);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
  font-size: 1rem;
  border-radius: 10px;
  padding: 7px 28px;
  cursor: pointer;
  margin-left: 1rem;
  transition: all 0.2s;
}

.stats-btn:hover {
  border-color: var(--color-teal-500);
  background: rgba(0, 194, 168, 0.1);
  color: var(--color-teal-500);
  box-shadow: 0 4px 12px rgba(0, 194, 168, 0.2);
}

/* =============== Custom Stats Modal - Graphite Teal Only =============== */
.stats-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.stats-modal {
  background: var(--color-graphite-900);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  width: 700px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px 40px;
  box-shadow: var(--shadow-lg);
}

.stats-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.stats-modal-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  margin: 0 0 8px 0;
}

.stats-modal-close {
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 32px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border-radius: 8px;
}

.stats-modal-close:hover {
  color: var(--color-text-primary);
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
}

.stats-tab {
  flex: 1;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  background: var(--color-graphite-700);
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 12px 12px 0 0;
}

.stats-tab.active {
  background: var(--color-graphite-800);
  color: var(--color-teal-500);
  border-bottom: 2px solid var(--color-teal-500);
}

.stats-section {
  margin-bottom: 24px;
}

.stats-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
}

.stats-select-all {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 400;
}

.stats-select-all input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--color-teal-500);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* FIRST BADGE FOR TEAL PRO 10 */
.stats-button {
  background: var(--color-graphite-700);
  border: 2px solid var(--color-border);
  color: var(--color-text-primary);
  font-size: 15px;
  font-weight: 600;
  padding: 18px 24px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stats-button:hover {
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
}

.stats-button.selected {
  background: rgba(0, 194, 168, 0.1);
  border-color: var(--color-teal-500);
  color: var(--color-teal-500);
}

.price-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.green-dot { background: var(--color-status-success); }
.blue-dot { background: var(--color-teal-500); }
.purple-dot { background: var(--color-teal-600); }
.orange-dot { background: var(--color-status-warning); }

.stats-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
}

.stats-action-btn {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.stats-btn-close,
.stats-btn-reset {
  background: var(--color-graphite-700);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  min-width: 110px;
}

.stats-btn-close:hover,
.stats-btn-reset:hover {
  background: var(--color-graphite-800);
  color: var(--color-text-primary);
  border-color: var(--color-teal-500);
}

.stats-btn-apply {
  background: var(--color-teal-500);
  color: var(--color-graphite-900); /* Dark text for contrast */
  min-width: 160px;
  box-shadow: 0 4px 16px rgba(0, 194, 168, 0.3);
}

.stats-btn-apply:hover {
  background: var(--color-teal-600);
  box-shadow: 0 6px 20px rgba(0, 194, 168, 0.4);
}

/* Scrollbar styling for modal */
.stats-modal::-webkit-scrollbar {
  width: 8px;
}

.stats-modal::-webkit-scrollbar-track {
  background: var(--color-graphite-700);
  border-radius: 4px;
}

.stats-modal::-webkit-scrollbar-thumb {
  background: var(--color-teal-500);
  border-radius: 4px;
}

.stats-modal::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal-600);
}

/* ============================================ */
/* Enhanced Custom Stats Modal Styling */
/* ============================================ */

/* Modal Wrapper & Backdrop */
.stats-modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.stats-modal-wrapper.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.stats-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

/* Modal Container */
.stats-modal-container {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: var(--color-graphite-900);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

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

/* Modal Header */
.stats-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-graphite-800);
}

.stats-modal-title-group {
  flex: 1;
}

.stats-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-primary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  margin: 0 0 6px 0;
  letter-spacing: -0.5px;
}

.stats-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 16px;
}

.stats-modal-close:hover {
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
  transform: rotate(90deg);
}

/* Modal Content Area */
.stats-modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-teal-500) transparent;
}

.stats-modal-content::-webkit-scrollbar {
  width: 8px;
}

.stats-modal-content::-webkit-scrollbar-track {
  background: transparent;
}

.stats-modal-content::-webkit-scrollbar-thumb {
  background: var(--color-teal-500);
  border-radius: 4px;
}

.stats-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal-600);
}

/* Tabs */
.stats-tabs {
  display: flex;
  gap: 12px;
  padding: 20px 28px 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-graphite-700);
}

.stats-tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  background: transparent;
  border: 2px solid transparent;
  border-bottom: 3px solid transparent;
  color: var(--color-text-muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 8px 8px 0 0;
}

.stats-tab-btn:hover {
  background: var(--color-graphite-800);
  color: var(--color-text-primary);
}

.stats-tab-btn.active {
  color: var(--color-teal-500);
  border-bottom-color: var(--color-teal-500);
  background: var(--color-graphite-800);
}

.tab-icon {
  font-size: 16px;
}

/* Sections */
.stats-section {
  padding: 24px 28px;
  border-bottom: 1px solid var(--color-border);
}

.stats-section:last-of-type {
  border-bottom: none;
}

.select-all-btn {
  padding: 8px 14px;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  color: var(--color-teal-500);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-all-btn:hover {
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
}

.select-all-btn.selected {
  background: var(--color-teal-500);
  border-color: var(--color-teal-500);
  color: var(--color-graphite-900);
}

.stats-section-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-description {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0;
  font-weight: 400;
}

/* Grid Layouts */
.stat-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}

.stat-template-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--color-graphite-700);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stat-template-btn:hover {
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
  color: var(--color-teal-500);
  transform: translateY(-2px);
}

.stat-template-btn.selected {
  background: rgba(0, 194, 168, 0.15);
  border-color: var(--color-teal-500);
  color: var(--color-text-primary);
  box-shadow: 0 0 12px rgba(0, 194, 168, 0.3);
}

.template-icon {
  font-size: 24px;
}

.template-label {
  text-align: center;
}

/* Price Tiers Grid */
.price-tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.price-tier-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px;
  background: var(--color-graphite-700);
  border: 2px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.price-tier-btn:hover {
  background: var(--color-graphite-800);
  transform: translateY(-1px);
}

/* FIXED: Better selected state with background color */
.price-tier-btn.selected {
  background: rgba(0, 194, 168, 0.15) !important;
  border-color: var(--color-teal-500) !important;
  color: var(--color-text-primary) !important;
  box-shadow: 0 0 16px rgba(0, 194, 168, 0.3);
  transform: translateY(-2px);
}

/* Add glow effect when selected */
.price-tier-btn.selected::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--color-teal-500);
  border-radius: 10px;
  z-index: -1;
  opacity: 0.2;
}

/* Make the dot more visible when selected */
.price-tier-btn.selected .price-dot {
  box-shadow: 0 0 8px currentColor;
  transform: scale(1.2);
}

.price-label {
  flex: 1;
  text-align: left;
}

/* MOBILE OPTIMIZATION - Smaller boxes for mobile */
@media (max-width: 768px) {
  .price-tiers-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .price-tier-btn {
    padding: 10px 8px;
    font-size: 11px;
    gap: 6px;
    border-radius: 8px;
  }

  .price-dot {
    width: 8px;
    height: 8px;
  }

  .price-label {
    font-size: 11px;
  }
}

/* EXTRA SMALL MOBILE - Even smaller */
@media (max-width: 480px) {
  .price-tiers-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .price-tier-btn {
    padding: 8px 6px;
    font-size: 10px;
    flex-direction: column;
    gap: 4px;
  }

  .price-dot {
    width: 8px;
    height: 8px;
  }

  .price-label {
    font-size: 10px;
    text-align: center;
  }
}

/* Search Input */
.search-container {
  width: 100%;
}

.stats-search-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.stats-search-input::placeholder {
  color: var(--color-text-muted);
}

.stats-search-input:focus {
  outline: none;
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
  box-shadow: 0 0 12px rgba(0, 194, 168, 0.25);
}

.stats-category {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.category-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-teal-500);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0;
}

.category-count {
  font-size: 11px;
  background: rgba(0, 194, 168, 0.2);
  color: var(--color-teal-500);
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.stats-category-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.stat-item-btn {
  padding: 10px 12px;
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-item-btn:hover {
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
  color: var(--color-teal-500);
}

.stat-item-btn.selected {
  background: rgba(0, 194, 168, 0.2);
  border-color: var(--color-teal-500);
  color: var(--color-text-primary);
  box-shadow: 0 0 8px rgba(0, 194, 168, 0.25);
}

.no-results {
  padding: 24px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 14px;
}

/* Modal Divider */
.modal-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 194, 168, 0.2), transparent);
  margin: 0;
}

/* FIRST BADGE FOR TEAL PRO 11 */
/* Modal Footer */
.stats-modal-footer {
  padding: 10px 10px;
  border-top: 1px solid var(--color-border);
  background: rgba(0, 194, 168, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-info {
  flex: 1;
  min-width: 200px;
}

.footer-text {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-muted);
  font-weight: 500;
}

.footer-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-secondary,
.btn-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-secondary {
  background: var(--color-graphite-700);
  color: var(--color-text-primary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--color-teal-500);
  color: var(--color-graphite-900); /* Dark text for contrast */
  box-shadow: 0 4px 12px rgba(0, 194, 168, 0.3);
}

.btn-primary:hover {
  background: var(--color-teal-600);
  box-shadow: 0 6px 20px rgba(0, 194, 168, 0.4);
  transform: translateY(-2px);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .stats-modal-container {
    max-width: 95%;
    max-height: 90vh;
  }

  .stats-modal-header {
    padding: 16px 20px;
  }

  .stats-section {
    padding: 18px 20px;
  }

  .stat-templates-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .price-tiers-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .stats-category-items {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-modal-footer {
    padding: 16px 20px;
  }
}

/* ============================================
   TOOLS MODAL & SHEET STYLING - GRAPHITE TEAL PRO
   ============================================ */

/* DESKTOP MODAL */
.tools-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 9998;
  animation: fadeIn 0.3s ease-out;
}

.tools-modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tools-modal-content {
  background: var(--color-graphite-900);
  border-radius: 20px;
  border: 1px solid var(--color-border);
  width: 90%;
  max-width: 900px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

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

.tools-modal-header {
  display: flex;
  justify-content: space-between;
  position: sticky;
  align-items: center;
  z-index: 100;
  padding: 28px 32px;
  border-bottom: 1px solid var(--color-border);
  top: 0;
  background: var(--color-graphite-900);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.tools-modal-header h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  margin: 0;
  letter-spacing: -0.5px;
}

.tools-modal-close {
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

.tools-modal-close:hover {
  background: var(--color-graphite-800);
  color: var(--color-text-primary);
  border-color: var(--color-teal-500);
  transform: rotate(90deg);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  padding: 32px;
}

/* TOOL CARD (Desktop) */
.tool-card {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 24px;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 194, 168, 0.1), transparent);
  transition: left 500ms ease;
}

.tool-card:hover::before {
  left: 100%;
}

.tool-card:hover {
  background: var(--color-graphite-700);
  border-color: var(--color-teal-500);
  transform: translateY(-8px);
  box-shadow: 0 12px 30px rgba(0, 194, 168, 0.15);
}

.tool-card-icon {
  width: 60px;
  height: 60px;
  background: var(--color-teal-500);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--color-graphite-900);
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 194, 168, 0.25);
}

.tool-card:hover .tool-card-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 20px rgba(0, 194, 168, 0.4);
}

.tool-card h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 8px 0;
  transition: color 250ms ease;
}

.tool-card:hover h3 {
  color: var(--color-teal-500);
}

.tool-card p {
  font-size: 13px;
  color: var(--color-text-muted);
  margin: 0 0 12px 0;
  line-height: 1.4;
}

.tool-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-badge.pro {
  background: var(--color-status-error); /* Red/Pink for Pro/Elite */
  color: white;
}

.tool-badge.beta {
  background: var(--color-teal-500);
  color: var(--color-graphite-900);
}

/* MOBILE SHEET */
.tools-sheet {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-graphite-900);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--color-border);
  z-index: 9998;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUpSheet 0.5s cubic-bezier(0.23, 1, 0.320, 1);
}

@keyframes slideUpSheet {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

.tools-sheet.active {
  display: block;
}

.tools-sheet-handle {
  width: 40px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin: 12px auto 0;
}

.tools-sheet-content {
  padding: 16px;
}

.tools-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  margin-bottom: 8px;
}

.tools-sheet-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
}

.tools-sheet-close {
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 250ms ease;
}

.tools-sheet-close:active {
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
}

.tools-sheet-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 8px;
}

/* TOOL ITEM (Mobile) */
.tool-item {
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 5px;
  cursor: pointer;
  transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: rgba(0, 194, 168, 0.2);
  touch-action: manipulation;
  user-select: none;
}

.tool-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 194, 168, 0.15), transparent);
  transition: left 400ms ease;
  z-index: -1;
}

.tool-item:active::before {
  left: 100%;
}

.tool-item:active {
  background: rgba(0, 194, 168, 0.15);
  border-color: var(--color-teal-500);
  transform: scale(0.95);
}

.tool-item-icon {
  width: 44px;
  height: 44px;
  background: var(--color-teal-500);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-graphite-900);
  transition: all 250ms ease;
  box-shadow: 0 2px 8px rgba(0, 194, 168, 0.2);
}

.tool-item:active .tool-item-icon {
  transform: scale(1.08);
}

.tool-item span {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  text-align: center;
  line-height: 1.2;
}

.tool-item-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.tool-item-badge.pro {
  background: var(--color-status-error);
  color: white;
}

.tool-item-badge.beta {
  background: var(--color-teal-500);
  color: var(--color-graphite-900);
}

/* BUTTON IN NAVBAR */
.tools-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: var(--color-text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  position: relative;
  font-size: 15px;
}

.nav-link:hover,
.tools-btn:hover {
  color: #00C2A8;
  background-color: rgba(0, 194, 168, 0.05);
  transform: translateY(-2px);
  text-shadow: 0 0 10px rgba(0,194,168,0.35);
}

.nav-link:hover::after,
.tools-btn:hover::after {
  transform: scaleX(1);
}

.nav-link::after,
.tools-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #00C2A8;
  transform: scaleX(0);
  transition: transform 0.2s ease;
}

/* FIRST BADGE FOR TEAL PRO 12 */
@keyframes toolsIconBounce {
  0% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.05); }
  100% { transform: translateY(0) scale(1); }
}

/* Responsive Design */
@media (max-width: 1024px) {
  .tools-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 24px;
  }

  .tools-modal-content {
    width: 95%;
  }
}

@media (max-width: 768px) {
  .tools-modal {
    display: none !important;
  }

  .tools-sheet {
    display: none;
  }

  .tools-sheet-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 640px) {
  .tools-sheet-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .tools-sheet-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 12px;
    justify-items: stretch;
    align-items: start;
  }

  .tools-sheet-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px;
  }

  .tools-sheet-header h2 {
    font-size: 18px;
  }

  .tool-item {
    padding: 10px;
  }

  .tool-item-icon {
    width: 40px;
    height: 40px;
  }

  .tool-item span {
    font-size: 10px;
  }
}

/* Scrollbar Styling */
.tools-modal-content::-webkit-scrollbar {
  width: 6px;
}

.tools-modal-content::-webkit-scrollbar-track {
  background: var(--color-graphite-700);
  border-radius: 10px;
}

.tools-modal-content::-webkit-scrollbar-thumb {
  background: var(--color-teal-500);
  border-radius: 10px;
  transition: background 250ms ease;
}

.tools-modal-content::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal-600);
}

.tools-sheet::-webkit-scrollbar {
  width: 4px;
}

.tools-sheet::-webkit-scrollbar-track {
  background: transparent;
}

.tools-sheet::-webkit-scrollbar-thumb {
  background: var(--color-teal-500);
  border-radius: 2px;
}

.tools-sheet::-webkit-scrollbar-thumb:hover {
  background: var(--color-teal-600);
}

/* Mobile Market View Fix */
@media (max-width: 768px) {
  .main-content {
    padding-bottom: 20px;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 110vw;
  }

  #market-view {
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
  }

  .market-sections {
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
  }

  .market-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    padding: 12px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .market-player {
    min-width: 0;
    overflow: hidden;
  }

  .market-player-info {
    min-width: 0;
    overflow: hidden;
  }

  .market-player-info h4,
  .market-player-info p {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .stat-pill {
    width: 50px;
    min-width: 50px;
    padding: 6px;
    font-size: 12px;
  }

  .stat-pill-value {
    font-size: 14px;
  }

  .stat-pill-label {
    font-size: 10px;
  }

  .market-overview {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
  }

  .market-section-title {
    padding: 12px;
  }

  body {
    overflow-x: hidden;
  }

  .container,
  #app {
    overflow-x: hidden;
    max-width: 100vw;
  }
}

/* ============================================
   ROI CALCULATOR MODAL - GRAPHITE TEAL THEME
   ============================================ */

.roi-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease-out;
}

.roi-modal-container {
  background: var(--color-graphite-900);
  border-radius: 20px;
  width: 90%;
  max-width: 480px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  border: 1px solid var(--color-border);
  animation: slideUp 0.4s ease-out;
}

/* Header */
.roi-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
}

.roi-modal-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-text-primary);
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: unset;
  margin: 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  letter-spacing: 0.5px;
}

.roi-modal-close {
  background: var(--color-graphite-700);
  border: 1px solid var(--color-border);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: all 0.2s ease;
}

.roi-modal-close:hover {
  background: var(--color-graphite-800);
  color: var(--color-text-primary);
  border-color: var(--color-teal-500);
  transform: rotate(90deg);
}

/* Form Styles */
.roi-modal-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.roi-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.roi-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.required-asterisk {
  color: var(--color-status-error);
  font-weight: 800;
}

.optional-text {
  font-size: 12px;
  color: var(--color-text-muted);
  font-weight: 400;
  text-transform: none;
}

.roi-input {
  padding: 14px 16px;
  background: var(--color-graphite-700);
  border: 2px solid var(--color-border);
  border-radius: 12px;
  font-size: 15px;
  color: var(--color-text-primary);
  font-family: 'Berkeley Mono', monospace;
  font-weight: 500;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.roi-input::placeholder {
  color: var(--color-text-muted);
}

.roi-input:focus {
  outline: none;
  border-color: var(--color-teal-500);
  background: var(--color-graphite-800);
  box-shadow: 0 0 16px rgba(0, 194, 168, 0.25);
}

.input-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Tax Rate Container */
.tax-rate-container {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.tax-input {
  flex: 1;
  padding-right: 40px;
}

.tax-percent {
  position: absolute;
  right: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-teal-500);
  pointer-events: none;
}

/* Calculate Button */
.roi-calculate-btn {
  padding: 16px 32px;
  background: var(--color-teal-500);
  color: var(--color-graphite-900);
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 8px 20px rgba(0, 194, 168, 0.3);
  text-shadow: none;
}

.roi-calculate-btn:hover {
  background: var(--color-teal-600);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(0, 194, 168, 0.4);
}

.roi-calculate-btn:active {
  transform: translateY(-1px);
}

/* Results Section */
.roi-results-section {
  animation: slideDown 0.4s ease-out;
}

.roi-results-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(0, 194, 168, 0.3), transparent);
  margin-bottom: 18px;
}

.roi-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--color-border);
}

.roi-result-item:last-of-type {
  border-bottom: none;
}

.roi-result-label {
  font-size: 15px;
  color: var(--color-text-muted);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.roi-result-value {
  font-size: 20px;
  font-weight: 800;
  font-family: 'Berkeley Mono', monospace;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  color: var(--color-text-primary);
}

.tax-value {
  color: var(--color-status-error);
}

.profit-value {
  color: var(--color-status-success);
}

.roi-percent-value {
  color: var(--color-teal-500);
}

/* Reset Button */
.roi-reset-btn {
  width: 100%;
  padding: 12px 24px;
  background: var(--color-graphite-700);
  color: var(--color-teal-500);
  border: 2px solid var(--color-border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 12px;
}

.roi-reset-btn:hover {
  background: var(--color-graphite-800);
  border-color: var(--color-teal-500);
  color: var(--color-text-primary);
}

/* Animations */
@keyframes slideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Mobile Responsive */
@media (max-width: 640px) {
  .roi-modal-container {
    width: 95%;
    max-width: 100%;
    padding: 24px;
    margin: 20px;
  }

  .roi-modal-header h1 {
    font-size: 24px;
  }

  .roi-modal-close {
    width: 36px;
    height: 36px;
  }

  .roi-input {
    padding: 12px 14px;
    font-size: 14px;
  }

  .roi-calculate-btn {
    padding: 14px 24px;
    font-size: 15px;
  }

  .roi-result-value {
    font-size: 18px;
  }

  .roi-form-group label {
    font-size: 13px;
  }
}

.search-input {
  box-shadow: none !important;
  outline: none !important;
  border: none !important;
  padding-left: 35px !important;
}

/* ---------------------------- Graphite Teal Pro Part 8 ------------------------------- */

/* ===== HERO BANNER SECTION - OPTIMIZED FOR DESKTOP ===== */

.hero-banner-section {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto 2rem;
  padding: 0 2rem;
  box-sizing: border-box;
  overflow: hidden;
}

.hero-banner-slider {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 1;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
}

.banner-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.banner-slide.active {
  opacity: 1;
  pointer-events: all;
}

.banner-slide picture {
  width: 100%;
  height: 100%;
  display: block;
}

.banner-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* FIRST BADGE FOR TEAL PRO 13 */
/* Gradient overlay for better text readability */
.banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}


.banner-content {
  text-align: center;
  max-width: 600px;
}


.banner-title {
  font-size: 1.75rem;
  color: #ffffff;
  font-weight: 900;              /* make text properly bold */
  -webkit-text-stroke: 1.7px #000;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6); /* slight depth */

}


.banner-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: #FFFFFF; /* solid black */
  letter-spacing: 0.01em;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  color: #ffffff;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

/* Navigation Dots */
.banner-dots {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.banner-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.3s ease;
}

.banner-dot:hover {
  background: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

.banner-dot.active {
  background: var(--color-teal-500);
  border-color: var(--color-teal-500);
  width: 28px;
  border-radius: 5px;
  box-shadow: 0 0 12px rgba(0, 194, 168, 0.6);
}

/* Navigation Arrows (Desktop) */
.banner-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 194, 168, 0.9);
  border: none;
  color: var(--color-graphite-900);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 16px rgba(0, 194, 168, 0.3);
}

.banner-arrow:hover {
  background: var(--color-teal-500);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 24px rgba(0, 194, 168, 0.5);
}

.banner-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.banner-prev {
  left: 1rem;
}

.banner-next {
  right: 1rem;
}

/* Large Desktop - Even more compact */
@media (min-width: 1440px) {
  .hero-banner-slider {
    height: auto;
    aspect-ratio: 4 / 1;
  }
}

/* Tablet & Medium Desktop */
@media (min-width: 769px) and (max-width: 1280px) {
  .hero-banner-slider {
    height: auto;
    aspect-ratio: 3 / 1;
  }

  .banner-title {
    font-size: 1.75rem;
    padding: 10px 18px;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    color: #ffffff;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
    letter-spacing: 1px;
  }

  .banner-subtitle {
    font-size: 0.95rem;
    padding: 6px 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.5px;
  }


  .banner-arrow {
    width: 40px;
    height: 40px;
  }
}

/* Mobile & Tablet - show full banner image */
@media (max-width: 1023px) {
  .hero-banner-slider {
    height: auto;
    aspect-ratio: 2 / 1;
    min-height: clamp(180px, 40vw, 260px);
    background: #0E1114;
  }

  .banner-image {
    object-fit: cover;
  }
}

/* Mobile - Use aspect ratio */
@media (max-width: 768px) {
  .hero-banner-section {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
  }

  .hero-banner-slider {
    height: auto;
    aspect-ratio: 2 / 1;
    min-height: 185px;
    border-radius: 12px;
  }


  .banner-overlay {
    padding: 1.5rem 1rem;
  }

  .banner-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .banner-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #FFFFFF; /* solid black */
    letter-spacing: 0.01em;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  }

  /* Hide arrows on mobile (swipe instead) */
  .banner-arrow {
    display: none;
  }

  .banner-dots {
    bottom: 0.75rem;
    gap: 0.375rem;
  }

  .banner-dot {
    width: 8px;
    height: 8px;
  }

  .banner-dot.active {
    width: 24px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .hero-banner-section {
    padding: 0 0.75rem;
  }

  .hero-banner-slider {
    border-radius: 10px;
  }

  .banner-title {
    font-size: 1.25rem;
  }

  .banner-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #FFFFFF; /* solid black */
    letter-spacing: 0.01em;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(4px);
    color: #ffffff;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  }
}

/* Banner Click Effects */
.banner-slide[data-redirect] {
  cursor: pointer;
  transition: transform 0.3s ease;
}

.banner-slide[data-redirect]:active {
  transform: scale(0.98);
}

/* Mobile Slider Size Adjustment */
@media (max-width: 768px) {
  .slider {
    padding: 1px 0;  /* Reduced from 12px */
    border-bottom: 1px solid #0f3460;  /* Thinner border */
  }

  .slider span {
    font-size: 12px;  /* Smaller text */
    font-weight: 500;
  }
}

/* ========== DASHBOARD PLAYER CARDS (Vertical Style) ========== */

#latest-players-grid,
#trending-players-grid,
.recent-event-row {
    display: grid;
    gap: 1.5rem;
    padding: 1rem 0;
    max-width: 100%;
}

#latest-players-grid,
#trending-players-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}

#recent-events-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.recent-event-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
}

.recent-event-row {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.recent-events-empty {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    padding: 0.5rem 0;
}

.dashboard-player-card {
    position: relative;
    width: 60%;
    aspect-ratio: 3/4;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.dashboard-player-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 255, 170, 0.3);
}

.card-untradable-badge {
    position: absolute;
    top: -2px;
    right: 7px;
    width: 16px;
    height: 16px;
    z-index: 5; 
}


@media (max-width: 768px) {
  .card-untradable-badge {
    position: absolute;
    top: -2px;
    right: 11px;

    width: 10px !important;
    height: 10px !important;

    max-width: 10px !important;
    max-height: 10px !important;

    transform: scale(0.9);
    transform-origin: top right;

    z-index: 5;
  }
}


@media (max-width: 480px) {
  .card-untradable-badge {
    position: absolute;
    top: 2px;
    right: 9px;

    width: 10px !important;
    height: 10px !important;

    max-width: 10px !important;
    max-height: 10px !important;

    transform: scale(0.7);
    transform-origin: top right;

    z-index: 5;
  }
}


.card-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Background Layer */
.card-background-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

/* Player Image Layer */
.player-image-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 125%;
    height: 125%;
    object-fit: contain;
    z-index: 2;
}

/* OVR Badge (Top Center) */
.card-ovr {
    position: absolute;
    top: 11%;
    left: 20%;
    transform: translateX(-50%) scaleY(1.2);   /* keeps centered for 2 or 3 digits */

    font-size: 1.2rem;
    font-weight: 800;
    z-index: 3;
    font-family: "CruyffSans", sans-serif;

    letter-spacing: -2.6px;
    line-height: 1.1;
}



/* Position Badge */
.card-position {
    position: absolute;
    top: 24%;
    left: 22%;
    transform: translateX(-50%) scaleY(1);

    font-size: 0.9rem;
    font-weight: 999;
    z-index: 3;
    letter-spacing: -0.7px;
    line-height: 0.8;
}


/* Player Name */
.card-player-name {
    position: absolute;
    bottom: 28%;
    font-size: 0.77rem;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 3;
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "CruyffSans", sans-serif;
    letter-spacing: -0.1px;
    line-height: 0.9;
    transform: scaleY(1.1);
}



.card-nation-flag-home.hero-icon-nation-flag-home{
  position: absolute;
  bottom: 15%;
  left: 25%;
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}


.card-club-flag-home.hero-icon-club-flag-home{
  position: absolute;
  bottom: 14%;
  left: 60%;
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}


.card-nation-flag-home.normal-nation-flag-home{
  position: absolute;
  bottom: 15%;
  left: 20%;
  width: 17px;
  height: 17px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}


.card-club-flag-home.normal-club-flag-home{
  position: absolute;
  bottom: 15%;
  left: 70%;
  width: 17px;
  height: 17px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}


.card-league-flag-home.normal-league-flag-home{
  position: absolute;
  bottom: 15%;
  left: 44%;
  width: 17px;
  height: 17px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}


/* Responsive Design */
/* Tablet & Small Desktop (max-width: 1200px) */
@media (max-width: 1200px) {
    #latest-players-grid,
    #trending-players-grid,
    .recent-event-row {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1.2rem;
        padding: 0.8rem 0;
    }

    .dashboard-player-card {
        width: 80%;
    }

    .card-ovr {
        position: absolute;
        top: 12%;
        left: 22%;
        transform: translateX(-50%) scaleY(1.3);   /* keeps centered for 2 or 3 digits */

        font-size: 1.2rem;
        font-weight: 800;
        z-index: 3;
        font-family: "CruyffSans", sans-serif;

        letter-spacing: -0.5px;
        line-height: 0.9;
    }

    .card-position {
        position: absolute;
        top: 25%;
        left: 23%;
        transform: translateX(-50%) scaleY(1);

        font-size: 1rem;
        font-weight: 800;
        z-index: 3;
        letter-spacing: -0.9px;
        line-height: 0.8;
    }

    .card-player-name {

        position: absolute;
        bottom: 28%;
        font-size: 0.8rem;
        font-weight: 800;
        text-transform: uppercase;
        z-index: 3;
        text-align: center;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        font-family: "CruyffSans", sans-serif;
        letter-spacing: -0.6px;
        line-height: 0.9;
        transform: scaleY(1);
    }

  .card-nation-flag-home.hero-icon-nation-flag-home{
    position: absolute;
    bottom: 15%;
    left: 25%;
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
  }

  .card-club-flag-home.hero-icon-club-flag-home{
    position: absolute;
    bottom: 14%;
    left: 60%;
    width: 18px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
  }

  .card-nation-flag-home.normal-nation-flag-home{
    position: absolute;
    bottom: 15%;
    left: 20%;
    width: 17px;
    height: 17px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
  }

  .card-club-flag-home.normal-club-flag-home{
    position: absolute;
    bottom: 15%;
    left: 70%;
    width: 17px;
    height: 17px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
  }

  .card-league-flag-home.normal-league-flag-home{
    position: absolute;
    bottom: 15%;
    left: 44%;
    width: 17px;
    height: 17px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
  }
}

/* Tablet Portrait (max-width: 768px) */
@media (max-width: 768px) {
    #latest-players-grid,
    #trending-players-grid,
    .recent-event-row {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
        padding: 0.6rem 0;
    }

    .dashboard-player-card {
        width: 85%;
    }

    .dashboard-player-card:hover {
        transform: translateY(-5px) scale(1.01);
        box-shadow: 0 8px 20px rgba(0, 255, 170, 0.25);
    }

    .player-image-img {
        width: 125%;
        height: 125%;
    }

    .card-ovr {
        top: 12%;
        left: 22%;
        font-size: 1.2rem;
        letter-spacing: -0.1px;
    }

    .card-position {
        top: 24%;
        left: 23%;
        font-size: 1rem;
        letter-spacing: -1.4px;
    }

    .card-player-name {
        bottom: 28%;
        font-size: 0.9rem;
        letter-spacing: -0.6px;
        max-width: 100%;
    }


  .card-nation-flag-home.hero-icon-nation-flag-home{
    position: absolute;
    bottom: 16%;
    left: 28%;
    width: 15px;
    height: 15px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
  }

  .card-club-flag-home.hero-icon-club-flag-home{
    position: absolute;
    bottom: 15%;
    left: 63%;
    width: 15px;
    height: 15px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
  }

  .card-nation-flag-home.normal-nation-flag-home{
    position: absolute;
    bottom: 17%;
    left: 19%;
    width: 14px;
    height: 14px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
  }

  .card-club-flag-home.normal-club-flag-home{
    position: absolute;
    bottom: 17%;
    left: 68%;
    width: 14px;
    height: 14px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3;
  }

  .card-league-flag-home.normal-league-flag-home{
    position: absolute;
    bottom: 17%;
    left: 43%;
    width: 14px;
    height: 14px;
    object-fit: cover;
    border-radius: 3px;
    z-index: 3; 
  }

}





/* Mobile (max-width: 511px) */
@media (max-width: 512px) {
    #latest-players-grid,
    #trending-players-grid,
    .recent-event-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;  /* Increased gap creates natural spacing */
        padding: 0.5rem 0.3rem;  /* Small side padding */
    }

    .dashboard-player-card {
        width: 100%;  /* Full width - no need for 89% hack */
        margin: 0 auto;  /* Center within grid cell */
    }

    .dashboard-player-card:hover {
        transform: translateY(-3px) scale(1.01);
        box-shadow: 0 6px 15px rgba(0, 255, 170, 0.2);
    }

    .player-image-img {
        width: 120%;
        height: 120%;
    }

    .card-ovr {
        top: 11%;
        left: 21%;
        font-size: 1.3rem;
        font-weight: 800;
        letter-spacing: -2px;
    }

    .card-position {
        top: 23%;
        left: 23%;
        font-size: 1rem;
        font-weight: 900;
        letter-spacing: -1.5px;
    }

    .card-player-name {
        bottom: 28%;
        font-size: 0.8rem;
        font-weight: 800;
        letter-spacing: -0.7px;
        max-width: 90%;
    }

  .card-nation-flag-home.hero-icon-nation-flag-home{
    position: absolute;
    bottom: 17%;
    left: 27%;
    width: 12px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }

  .card-club-flag-home.hero-icon-club-flag-home{
    position: absolute;
    bottom: 17%;
    left: 62%;
    width: 12px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }

  .card-nation-flag-home.normal-nation-flag-home{
    position: absolute;
    bottom: 18%;
    left: 20%;
    width: 11px;
    height: 11px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }

  .card-club-flag-home.normal-club-flag-home{
    position: absolute;
    bottom: 18%;
    left: 70%;
    width: 11px;
    height: 11px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }

  .card-league-flag-home.normal-league-flag-home{
    position: absolute;
    bottom: 18%;
    left: 45%;
    width: 11px;
    height: 11px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }
  
}



/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
    #latest-players-grid,
    #trending-players-grid,
    .recent-event-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.8rem;  /* Increased gap creates natural spacing */
        padding: 0.5rem 0.3rem;  /* Small side padding */
    }

    .dashboard-player-card {
        width: 100%;  /* Full width - no need for 89% hack */
        margin: 0 auto;  /* Center within grid cell */
    }

    .dashboard-player-card:hover {
        transform: translateY(-3px) scale(1.01);
        box-shadow: 0 6px 15px rgba(0, 255, 170, 0.2);
    }

    .player-image-img {
        width: 120%;
        height: 120%;
    }

    .card-ovr {
        top: 12%;
        left: 23%;
        font-size: 1rem;
        font-weight: 799;
        letter-spacing: -0.4px;
    }

    .card-position {
        top: 26%;
        left: 23%;
        font-size: 0.7rem;
        font-weight: 800;
        letter-spacing: -0.3px;
    }

    .card-player-name {
        bottom: 28%;
        font-size: 0.6rem;
        font-weight: 800;
        letter-spacing: -0.3px;
        max-width: 100%;
    }

  .card-nation-flag-home.hero-icon-nation-flag-home{
    position: absolute;
    bottom: 19%;
    left: 26%;
    width: 10px;
    height: 10px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }

  .card-club-flag-home.hero-icon-club-flag-home{
    position: absolute;
    bottom: 19%;
    left: 61%;
    width: 10px;
    height: 10px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }

  .card-nation-flag-home.normal-nation-flag-home{
    position: absolute;
    bottom: 20%;
    left: 19%;
    width: 9px;
    height: 9px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }

  .card-club-flag-home.normal-club-flag-home{
    position: absolute;
    bottom: 20%;
    left: 68%;
    width: 9px;
    height: 9px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }

  .card-league-flag-home.normal-league-flag-home{
    position: absolute;
    bottom: 20%;
    left: 44%;
    width: 9px;
    height: 9px;
    object-fit: cover;
    border-radius: 2px;
    z-index: 3;
  }

}

/* ========== DASHBOARD PLAYER CARDS (Vertical Style) ========== */


/* Search bar css */
/* ========== DASHBOARD SEARCH RESULTS ========== */

#dashboard-search-results {
    padding: 1rem 0;
    margin-top: 1rem;
}

.search-results-header {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.search-results-header h3 {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0;
}

#search-results-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Search Result Row */
.search-result-row {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-result-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 170, 0.2);
    border-color: var(--primary-color);
}

.search-result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Card Image (Left) */
.search-card-image {
    position: relative;
    width: 80px;
    height: 110px;
    flex-shrink: 0;
}

.search-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.search-player-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 90%;
    object-fit: contain;
    z-index: 2;
}

/* Player Info (Middle) */
.search-player-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.search-player-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.tradable-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    width: fit-content;
}

.tradable-badge.tradable {
    background: rgba(255, 215, 0, 0.1);
    color: #FFD700;
}

.tradable-badge.non-tradable {
    background: rgba(255, 68, 68, 0.1);
    color: #FF4444;
}

/* OVR and Position (Right) */
.search-player-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
    flex-shrink: 0;
}

.search-ovr {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
}

.search-position {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
}

.no-results p:first-child {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .search-card-image {
        width: 60px;
        height: 85px;
    }

    .search-player-name {
        font-size: 0.95rem;
    }

    .search-ovr {
        font-size: 1.5rem;
    }

    .search-position {
        font-size: 0.8rem;
    }

    .tradable-badge {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .search-result-card {
        gap: 0.5rem;
    }

    .search-card-image {
        width: 50px;
        height: 70px;
    }
}

.search-loading {
    text-align: center;
    padding: 3rem 1rem;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* Search Load More Button */
.search-load-more-btn {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    background: var(--card-bg);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.search-load-more-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 170, 0.3);
}

.load-more-count {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.search-load-more-btn:hover .load-more-count {
    color: var(--bg-primary);
}


.load-more-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 3rem 0 4rem;
  padding: 1rem;
}

.load-more-btn {
  padding: 1rem 3rem !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  border-radius: 50px !important;
  border: 2px solid rgba(255,255,255,0.15) !important;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
  color: #f8fafc !important;
  box-shadow:
    0 8px 25px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255,255,255,0.1) inset !important;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  min-width: 200px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.load-more-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow:
    0 12px 35px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.15) inset !important;
  background: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%) !important;
}

.load-more-btn:active:not(:disabled) {
  transform: translateY(0) scale(0.98);
}

.load-more-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}


/* ==================== SEARCH DROPDOWN ==================== */

.search-section {
    position: relative;
    padding: 2rem 0 1rem;
    margin-bottom: 2rem;
}

.search-section .search-container {
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 100;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-graphite-800);
    border: 2px solid var(--color-border);
    border-radius: 16px;
    padding: 14px 20px;
    transition: all 0.2s ease;
}

.search-box:focus-within {
    border-color: var(--color-teal-500);
    box-shadow: 0 0 0 4px rgba(var(--color-teal-rgb), 0.15);
}

.search-box .search-icon {
    color: var(--color-text-muted);
    flex-shrink: 0;
}

.search-box .search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--color-text-primary);
    font-size: 15px;
    font-weight: 500;
}

.search-box .search-input::placeholder {
    color: var(--color-text-muted);
    opacity: 0.6;
}

/* Dropdown Container */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: var(--color-graphite-800);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    max-height: 450px;
    overflow: hidden;
    z-index: 1000;
}

.search-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.search-dropdown-content {
    max-height: 450px;
    overflow-y: auto;
    padding: 8px;
}

/* Custom Scrollbar */
.search-dropdown-content::-webkit-scrollbar {
    width: 8px;
}

.search-dropdown-content::-webkit-scrollbar-track {
    background: var(--color-graphite-700);
    border-radius: 4px;
}

.search-dropdown-content::-webkit-scrollbar-thumb {
    background: var(--color-teal-600);
    border-radius: 4px;
}

.search-dropdown-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal-500);
}

/* Dropdown Player Row */
.dropdown-player-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.dropdown-player-row:hover {
    background: rgba(0, 194, 168, 0.08);
    border-color: var(--color-teal-500);
    transform: translateX(4px);
}

/* Player Card Image */
.dropdown-player-card {
    width: 80px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--color-graphite-700);
    border: 1px solid var(--color-border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    position: relative;
}

.dropdown-player-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dropdown-player-card .player-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    color: var(--color-text-muted);
}

.dropdown-player-card .dropdown-mini-card {
    width: 105%;
    height: 105%;
    margin-left: 0;
}

.dropdown-player-card .dropdown-mini-card .squad-custom-card-ovr {
    top: 1px;
    left: 0;
    font-size: 14px;
    margin-left: 2px;

}

.dropdown-player-card .dropdown-mini-card .squad-custom-card-position {
    top: 18px;
    left: 0;
    font-size: 9px;
    margin-left: 6px;
}

.dropdown-player-card .dropdown-mini-card .squad-custom-card-name {
    top: 64%;
    font-size: 0.7rem;
    letter-spacing: -1px;
    text-align: center;
    text-overflow: ellipsis;
    text-transform: uppercase;
}

.dropdown-player-card .dropdown-mini-card .squad-custom-card-player-img {
    left: 50%;
    transform: translate(-50%, -50%) scale(1.25);
    margin-top: 12px;
}

/* Player Info */
.dropdown-player-info {
    flex: 1;
    min-width: 0;
}

.dropdown-player-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-player-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-player-badge.auctionable {
    background: rgba(59, 214, 113, 0.15);
    color: var(--color-status-success);
    border: 1px solid rgba(59, 214, 113, 0.3);
}

.dropdown-player-badge.non-auctionable {
    background: rgba(255, 107, 107, 0.15);
    color: var(--color-status-error);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.dropdown-player-badge svg {
    width: 10px;
    height: 10px;
}

/* Player Stats */
.dropdown-player-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.dropdown-player-ovr {
    font-size: 28px;
    font-weight: 800;
    color: var(--color-teal-500);
    line-height: 1;
}

.dropdown-player-position {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* No Results State */
.dropdown-no-results {
    padding: 40px 20px;
    text-align: center;
    color: var(--color-text-muted);
}

.dropdown-no-results svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.dropdown-no-results p {
    font-size: 14px;
    margin: 0;
}

/* Loading State */
.dropdown-loading {
    padding: 40px 20px;
    text-align: center;
}

.dropdown-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-teal-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 12px;
}

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .search-dropdown {
        max-height: 380px;
    }

    .dropdown-player-row {
        gap: 12px;
        padding: 10px 12px;
    }

    .dropdown-player-card {
        width: 50px;
        height: 68px;
    }

    .dropdown-player-name {
        font-size: 14px;
    }

    .dropdown-player-ovr {
        font-size: 24px;
    }

    .dropdown-player-position {
        font-size: 11px;
    }
}

/* Dropdown Load More Button */
.dropdown-load-more {
    padding: 12px;
    border-top: 1px solid var(--color-border);
    margin-top: 8px;
}

.dropdown-load-more-btn {
    width: 100%;
    padding: 12px 20px;
    background: var(--color-graphite-700);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dropdown-load-more-btn:hover {
    background: var(--color-teal-600);
    border-color: var(--color-teal-500);
    transform: translateY(-2px);
}

.dropdown-load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.dropdown-load-more-btn .load-more-count {
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 500;
}

.dropdown-load-more-btn:hover .load-more-count {
    color: var(--color-text-primary);
}

.dropdown-row-selected {
    background-color: var(--color-hover, rgba(0, 123, 255, 0.1)) !important;
    border-left: 3px solid var(--color-primary, #007bff);
}

.dropdown-player-row {
    transition: background-color 0.15s ease;
}



.autocomplete {
  position: relative;
}

.autocomplete-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: 220px;
  overflow-y: auto;
  background: var(--surface, #14181C);
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 8px;
  z-index: 999;
}

.autocomplete-item {
  padding: 10px 12px;
  cursor: pointer;
  font-size: 0.95rem;
}

.autocomplete-item:hover {
  background: rgba(0,0,0,0.05);
}

.autocomplete-item img {
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
}

/* ===== Skill Moves ONLY ===== */

/* wrapper */
.star-select-wrapper {
  position: relative;
}

/* overlay text (this is what you SEE after selection) */
.skill-star-display {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 10;                 /* CRITICAL */
  font-family: Arial, sans-serif;
  white-space: nowrap;
}

/* stars */
.skill-star-display:not(.any) {
  color: #f5c518;
  font-size: 18px;
}

/* Any */
.skill-star-display.any {
  color: #ffffff;
  font-size: 14px;
}

/* hide native selected text */
#filter-skill {
  color: transparent;
  padding-left: 60px;
}

/* dropdown list stars only */
#filter-skill option {
  color: #f5c518;
  font-size: 15px;
}


/* wrapper */
#filter-nation-wrapper {
  position: relative;
}

/* flag icon */
.nation-flag {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  z-index: 2;
}

/* push text to the right when flag is visible */
#filter-nation {
  padding-left: 38px;
}

.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
}

.autocomplete-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.autocomplete-flag {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  flex-shrink: 0;
}

.autocomplete-flag.placeholder {
  width: 20px;
  height: 14px;
}

.autocomplete-text {
  font-size: 14px;
  color: var(--text-primary, #fff);
}

.watchlist-content {
  display: flex;
}

.filters-column {
  width: 280px;
  flex-shrink: 0;
}

.players-column {
  flex: 1;
}


/* ======== WATCHLIST VIEW STYLES ======== */

.watchlist-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
}

.watchlist-content {
  flex: 1;
}

.watchlist-toolbar {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
  flex-wrap: wrap;
}

.watchlist-filter-toggle {
  display: none;
  background: var(--color-graphite-800);
  border: 1px solid var(--color-border);
  color: var(--color-text-primary);
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.watchlist-filter-toggle:hover {
  border-color: var(--color-teal-500);
  background: var(--color-graphite-700);
}

.watchlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.watchlist-count-badge {
  display: inline-block;
  background: rgba(0, 194, 168, 0.15);
  color: var(--color-teal-500);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(0, 194, 168, 0.3);
}

/* Active Filters (Chips) */
.active-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  animation: fadeIn 0.3s ease;
}

.filter-chip {
  background: var(--color-teal-600);
  color: var(--color-graphite-900);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.2s ease-out;
  border: 1px solid rgba(0, 194, 168, 0.5);
  box-shadow: 0 4px 12px rgba(0, 194, 168, 0.2);
  font-weight: 600;
}

.filter-chip button {
  background: none;
  border: none;
  color: var(--color-graphite-900);
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  transition: transform 0.2s;
  display: flex;
  align-items: center;
}

.filter-chip button:hover {
  transform: scale(1.2);
}

/* Empty State Styles */
.watchlist-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  animation: fadeInScale 0.3s ease;
}

.empty-state-box {
  text-align: center;
  padding: 60px 40px;
  border: 2px dashed var(--color-border);
  border-radius: 16px;
  background: var(--color-graphite-700);
  max-width: 500px;
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.6;
  transition: transform 0.3s ease;
}

.empty-state-box:hover .empty-state-icon {
  transform: rotate(5deg) scale(1.05);
}

.empty-state-box h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 16px;
  text-decoration: none;
}

.empty-state-box p {
  font-size: 16px;
  color: var(--color-text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
}

#watchlist-browse-players-btn {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  transition: all 0.2s ease;
}

#watchlist-browse-players-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 194, 168, 0.3);
}

.arrow-icon {
  display: inline-block;
  transition: transform 0.2s ease;
}

#watchlist-browse-players-btn:hover .arrow-icon {
  transform: translateX(4px);
}

/* Watchlist-specific Search */
#watchlist-search-input {
  flex: 1;
  min-width: 200px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 12px 44px 12px 52px;
  background: var(--color-graphite-800);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#watchlist-search-input:focus {
  outline: none;
  border-color: var(--color-teal-500);
  box-shadow: 0 0 0 2px rgba(0, 194, 168, 0.18);
}

#watchlist-search-input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.database-toolbar .search-container {
  position: relative;
}

.database-toolbar .search-container .search-icon {
  left: 16px;
}

/* Animation Keyframes */
@keyframes slideIn {
  from {
    transform: translateY(-10px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive: Tablet */
@media (max-width: 1024px) {
  .watchlist-layout {
    grid-template-columns: 220px 1fr;
    gap: 24px;
  }
}

/* Responsive: Mobile */
@media (max-width: 768px) {
  .watchlist-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .filters-sidebar {
    position: static;
    display: none;
  }

  .filters-sidebar.mobile-open {
    display: block;
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    z-index: 999;
    max-height: 80vh;
    overflow-y: auto;
    background: var(--color-graphite-800);
    border: 1px solid var(--color-border);
    padding: 20px;
    border-radius: 0;
  }

  .watchlist-filter-toggle {
    display: inline-flex;
    width: auto;
  }

  .watchlist-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .search-container {
    width: 100%;
  }

  .sort-select {
    width: 100%;
  }

  .watchlist-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
  }

  .filter-chip {
    padding: 4px 8px;
    font-size: 12px;
  }

  .empty-state-box {
    padding: 40px 20px;
  }

  .empty-state-icon {
    font-size: 48px;
  }
}

/* Responsive: Small Mobile */
@media (max-width: 640px) {
  .view-header h1 {
    font-size: 28px;
  }

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

  .filter-chip {
    max-width: 100%;
    word-break: break-word;
  }
}



/* ============================================
   AUTOCOMPLETE SYSTEM - Dark Theme
   ============================================ */

/* Autocomplete Wrapper */
.autocomplete-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

/* Flag Image Next to Input */
.filter-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Autocomplete Input - Match your dark theme */
.filter-input {
    flex: 1;
    width: 100%;
    padding: 12px 14px;
    background: #1a1d24;
    border: 1px solid #2d3139;
    border-radius: 8px;
    color: #e5e7eb;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.filter-input::placeholder {
    color: #6b7280;
    opacity: 1;
}

.filter-input:focus {
    outline: none;
    border-color: #6366f1;
    background: #1f2329;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.filter-input:hover {
    border-color: #3d4149;
}

/* Autocomplete Dropdown List */
.autocomplete-list {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #1f2329;
    border: 1px solid #2d3139;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    margin-top: 4px;
}

/* Empty state */
.autocomplete-list:empty {
    display: none;
}

/* Autocomplete Item */
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: all 0.15s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.autocomplete-item:hover,
.autocomplete-item.active {
    background: #2a2e37;
}

.autocomplete-item.active {
    background: #32363f;
}

/* Flag in Dropdown */
.autocomplete-flag {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Placeholder for missing flags */
.autocomplete-flag-placeholder {
    width: 24px;
    height: 18px;
    background: #2d3139;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Text in Dropdown */
.autocomplete-text {
    font-size: 14px;
    color: #e5e7eb;
    flex: 1;
}

/* Scrollbar styling for dark theme */
.autocomplete-list::-webkit-scrollbar {
    width: 6px;
}

.autocomplete-list::-webkit-scrollbar-track {
    background: #1a1d24;
    border-radius: 8px;
}

.autocomplete-list::-webkit-scrollbar-thumb {
    background: #3d4149;
    border-radius: 8px;
}

.autocomplete-list::-webkit-scrollbar-thumb:hover {
    background: #4d5159;
}

/* Loading state (optional) */
.autocomplete-loading {
    padding: 12px 14px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

/* No results state (optional) */
.autocomplete-no-results {
    padding: 12px 14px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}


/* ==================== SKILLS SECTION ==================== */
.player-skills-section {
    background: var(--color-graphite-800); /* #14181C - Surface color */
    /* OR use this for elevated look: */
    /* background: var(--color-graphite-700); */ /* #1B2126 - Elevated */

    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(0, 194, 168, 0.15); /* Optional: teal border like rank section */
    margin-bottom: 20px;
}


.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.skill-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 12px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer; /* Ã¢Å“â€¦ Show it's clickable */
  position: relative;
}

.skill-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 194, 168, 0.4);
  box-shadow: 0 5px 20px rgba(0, 194, 168, 0.2);
}

/* Ã¢Å“â€¦ Add a subtle hint that card is clickable */
.skill-card::after {
  content: 'Click for details';
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: rgba(152, 160, 166, 0.6);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  display: none; /* Hide to save space */
}

.skill-card:hover::after {
  opacity: 1;
}

.skill-card.locked {
  opacity: 0.5;
  filter: grayscale(50%);
  cursor: not-allowed; /* Ã¢Å“â€¦ Different cursor for locked skills */
}

.skill-card.locked::after {
  display: none; /* Ã¢Å“â€¦ Don't show hint for locked skills */
}

.skill-icon {
  position: relative;
  width: 60px;
  height: 60px;
  margin: 0 auto 10px;
}

.skill-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  border-radius: 8px;
}

.skill-name {
  font-size: 12px;
  font-weight: 700;
  color: #E6EEF2;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.skill-level {
  font-size: 11px;
  color: #98A0A6;
  margin-bottom: 10px;
}

.level-number {
  color: #00C2A8;
  font-weight: 700;
  font-size: 16px;
}

.unlock-requirement {
  font-size: 11px;
  color: #FF6B6B;
  padding: 8px;
  background: rgba(255, 107, 107, 0.1);
  border-radius: 6px;
  margin-top: 10px;
}

.skill-actions {
  margin-top: 10px;
}

.upgrade-btn {
  background: linear-gradient(135deg, #00C2A8, #008C7A);
  color: #0E1114;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}

.upgrade-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 194, 168, 0.4);
}

.max-level-badge {
  background: rgba(59, 214, 113, 0.2);
  color: #3BD671;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
}

.view-details-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #98A0A6;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
  margin-top: 10px;
  width: 100%;
  transition: all 0.2s;
}

.view-details-btn:hover {
  border-color: rgba(0, 194, 168, 0.5);
  color: #00C2A8;
}

/* ==================== SKILL MODAL ==================== */

.skill-detail-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 23000 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

/* inner modal box */
.skill-detail-modal-content {
  margin: auto;
}



.skill-modal-content {
  background: #14181C;
  border: 1px solid rgba(0, 194, 168, 0.3);
  border-radius: 16px;
  padding: 30px;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(600px, 92vw);
  transform: translate(-50%, -50%);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #E6EEF2;
  font-size: 24px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
}

.modal-close-btn:hover {
  background: rgba(255, 107, 107, 0.3);
  transform: rotate(90deg);
}

.boost-level-section {
  position: relative;
  background: rgba(255, 255, 255, 0.03);
  padding: 15px;
  padding-top: 20px;
  border-radius: 10px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.boost-level-section:hover:not(.disabled) {
  border-color: rgba(0, 194, 168, 0.3);
}

.boost-level-section.selected {
  border-color: rgba(0, 194, 168, 0.8);
}

.boost-level-section.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.boost-level-section h4 {
  color: #00C2A8;
  margin-bottom: 10px;
  padding-right: 30px; /* Space for checkbox */
}

.boost-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.boost-stat {
  background: rgba(0, 194, 168, 0.1);
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #E6EEF2;
}

.modal-action-btn {
  background: linear-gradient(135deg, #00C2A8, #008C7A);
  color: #0E1114;
  border: none;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  width: 100%;
}

/* Checkbox in top-right */
.level-checkbox {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  font-size: 14px;
  font-weight: bold;
}

.level-checkbox.checked {
  background: linear-gradient(135deg, #00C2A8, #008C7A);
  border-color: #00C2A8;
  color: #0E1114;
}

.level-checkbox.disabled {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Points info badges */
.points-info {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.current-level-badge {
  background: rgba(0, 194, 168, 0.15);
  color: #00C2A8;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.points-remaining-badge {
  background: rgba(255, 184, 107, 0.15);
  color: #FFB86B;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

.insufficient-points {
  font-size: 11px;
  color: #FF6B6B;
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

/* ==================== SKILLS HEADER ==================== */
.skills-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.skills-header h3 {
  margin: 0;
  font-size: 18px;
  color: #E6EEF2;
}

.reset-skills-btn {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: #FF6B6B;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family-base);
}

.reset-skills-btn:hover {
  background: rgba(255, 107, 107, 0.2);
  border-color: rgba(255, 107, 107, 0.5);
  transform: scale(1.05);
}

.reset-skills-btn:active {
  transform: scale(0.98);
}


/* ==================== RESPONSIVE BREAKPOINTS ==================== */

/* Tablet: 768px - 1020px - Perfect as is */
@media (max-width: 1020px) {
  .skills-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }

  .skill-card {
    padding: 10px;
  }

  .skill-icon {
    width: 50px;
    height: 50px;
  }

  .skill-name {
    font-size: 11px;
  }

  .level-number {
    font-size: 14px;
  }

  .player-skills-section {
    padding: 12px;
  }

  .skills-header h3 {
    font-size: 16px;
  }

  .reset-skills-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
}

/* Mobile: 480px - 768px - 2 rows: 3 + 3 */
@media (max-width: 768px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr); /* Ã¢Å“â€¦ 3 skills per row */
    gap: 10px;
    max-width: 100%;
  }

  .skill-card {
    padding: 10px;
  }

  .skill-icon {
    width: 48px; /* Ã¢Å“â€¦ Fixed size - not too big */
    height: 48px;
    margin-bottom: 8px;
  }

  .skill-name {
    font-size: 10px;
    margin-bottom: 6px;
    line-height: 1.2;
  }

  .skill-level {
    font-size: 10px;
  }

  .level-number {
    font-size: 13px;
  }

  .player-skills-section {
    padding: 12px;
  }

  .skills-header {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .skills-header h3 {
    font-size: 15px;
    text-align: center;
  }

  .reset-skills-btn {
    width: 100%;
    font-size: 11px;
    padding: 8px;
  }

  .lock-overlay {
    font-size: 28px;
  }

  .unlock-requirement {
    font-size: 9px;
    padding: 6px;
    margin-top: 6px;
  }

  .skill-actions {
    margin-top: 8px;
  }

  .upgrade-btn,
  .max-level-badge {
    font-size: 10px;
    padding: 6px 10px;
  }

  /* Modal adjustments */
  .skill-modal-content {
    max-width: 95%;
    padding: 20px;
  }

  .boost-stats {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile: max-width 480px - 2 rows: 3 + 3 */
@media (max-width: 480px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr); /* Ã¢Å“â€¦ 3 skills per row */
    gap: 8px;
  }

  .skill-card {
    padding: 8px;
    border-radius: 10px;
  }

  .skill-icon {
    width: 42px; /* Ã¢Å“â€¦ Fixed - smaller for small screens */
    height: 42px;
    margin-bottom: 6px;
  }

  .skill-name {
    font-size: 9px;
    margin-bottom: 4px;
    line-height: 1.2;
  }

  .skill-level {
    font-size: 9px;
    margin-bottom: 6px;
  }

  .level-number {
    font-size: 12px;
  }

  .player-skills-section {
    padding: 10px;
    margin-bottom: 16px;
  }

  .skills-header h3 {
    font-size: 14px;
  }

  .reset-skills-btn {
    font-size: 10px;
    padding: 6px;
  }

  .lock-overlay {
    font-size: 24px;
  }

  .unlock-requirement {
    font-size: 8px;
    padding: 4px;
    margin-top: 4px;
  }

  .skill-actions {
    margin-top: 6px;
  }

  .upgrade-btn {
    padding: 5px 10px;
    font-size: 9px;
  }

  .max-level-badge {
    padding: 4px 8px;
    font-size: 9px;
  }

  /* Modal adjustments */
  .skill-modal-content {
    padding: 15px;
  }

  .modal-close-btn {
    width: 30px;
    height: 30px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }

  .boost-level-section {
    padding: 12px;
  }

  .boost-level-section h4 {
    font-size: 13px;
  }

  .boost-stat {
    font-size: 11px;
    padding: 6px;
  }

  .modal-action-btn {
    padding: 10px 20px;
    font-size: 12px;
  }

  .points-info {
    gap: 8px;
  }

  .current-level-badge,
  .points-remaining-badge {
    font-size: 11px;
    padding: 4px 8px;
  }
}


/* Extra Small: max-width 360px - 2 rows: 3 + 3 */
@media (max-width: 360px) {
  .skills-grid {
    grid-template-columns: repeat(3, 1fr); /* Ã¢Å“â€¦ 3 skills per row */
    gap: 6px;
  }

  .skill-card {
    padding: 6px;
  }

  .skill-icon {
    width: 36px; /* Ã¢Å“â€¦ Even smaller for tiny screens */
    height: 36px;
    margin-bottom: 4px;
  }

  .skill-name {
    font-size: 8px;
    margin-bottom: 3px;
  }

  .skill-level {
    font-size: 8px;
  }

  .level-number {
    font-size: 11px;
  }

  .lock-overlay {
    font-size: 20px;
  }

  .unlock-requirement {
    font-size: 7px;
    padding: 3px;
  }
}

/* Inside player detail card*/

.card-background-img-inside {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}



.player-image-img-inside {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 2;
}

.card-ovr-inside {
    position: absolute;
    top: 11%;
    left: 21%;
    font-size: 1.7rem;
    font-weight: 899;
    z-index: 3;
    font-family: "CruyffSans", sans-serif;
    letter-spacing: -2.6px;
    line-height: 1.1;
    transform: scaleY(1.3);
}

.card-position-inside {
    position: absolute;
    top: 25.4%;
    left: 22.6%;
    transform: translateX(-50%);
    font-family: "CruyffSans", sans-serif;
    font-size: 1.3rem;
    font-weight: 799;
    z-index: 3;
    letter-spacing: -0.7px;
    line-height: 0.7;
    transform: scaleY(1.2);
}


.card-player-name-inside {
    position: absolute;
    bottom: 27%;
    font-size: 1.3rem;
    font-weight: 799;
    text-transform: uppercase;
    z-index: 3;
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: "CruyffSans", sans-serif;
    letter-spacing: -0.3px;
    line-height: 1.1;
    transform: scaleY(1.2);
}

.players-grid .player-row,
.players-grid .player-card {
  background: rgba(20,24,28,0.7) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}



.players-grid .player-row,
.players-grid .player-card {
  background: rgba(20,24,28,0.45) !important;
  backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
}

/* SHARP BACKGROUND - NO BLUR ANYWHERE (database-view removed) */
.filters-sidebar,
.players-grid .player-row,
.players-grid .player-card {
  backdrop-filter: none !important;
  background: rgba(20,24,28,0.75) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}


.players-grid {
  background: transparent !important;
}


/* FULL VIEWPORT BACKGROUND + SMOOTH */
#database-view {
  min-height: 100vh !important;
}

.players-grid {
  min-height: 60vh;
  background: transparent !important;
}

/* BACKGROUND ONLY FULLSCREEN */
#database-view {
  box-sizing: border-box;
}

#database-view::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-size: cover !important;
  background-position: center top !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  z-index: -1;
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 14px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;

  color: #cfd8dc;
  background: rgba(255, 255, 255, 0.04);

  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(6px);

  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease,
    transform 0.2s ease;
}

.view-all-btn:hover {
  color: #ffffff;
  background: rgba(0, 255, 200, 0.12);
  border-color: rgba(0, 255, 200, 0.45);
  transform: translateY(-1px);
}

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

.view-all-btn::after {
  font-size: 13px;
  transition: transform 0.25s ease;
}

.view-all-btn:hover::after {
  transform: translateX(3px);
}

/* NEW: Alternate positions styling */
.alternate-positions {
  font-size: 0.8em;
  color: #a0aec0;
  font-weight: 500;
  margin-left: 4px;
}

/* Make sure it fits on mobile */
@media (max-width: 768px) {
  .alternate-positions {
    font-size: 0.75em;
  }
}


/* Toggle Switch Styles */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

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

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-graphite-700);
    border: 1px solid var(--color-border);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--color-text-muted);
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--color-teal-500);
    border-color: var(--color-teal-600);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
    background-color: var(--color-white);
}

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 2px rgba(var(--color-teal-rgb), 0.2);
}

.price-icon {
    height: 18px;
    width: auto;
    vertical-align: middle;
    margin-right: 4px;
    margin-left: 5px;
}

.price-text {
    font-size: 1rem;
    font-weight: 500;
    color: #fbbf24;
    vertical-align: middle;
    letter-spacing: 1.5px;
    margin-left: 1px;
}



/* ===== BACKGROUND IMAGE FOR HOME, MARKET, WATCHLIST, PLAYER DETAIL VIEWS ===== */

/* Home View (Dashboard) */
#dashboard-view {
  position: relative !important;
  min-height: 100vh !important;
  background-image: url("../images/background/zenith_bg.webp");
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  padding-left: calc(50vw - 50%) !important;
  padding-right: calc(50vw - 50%) !important;
}


/* Market View */
#market-view {
  position: relative !important;
  min-height: 100vh !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  padding-left: calc(50vw - 50%) !important;
  padding-right: calc(50vw - 50%) !important;
}

#market-view > * {
  position: relative !important;
  z-index: 2 !important;
}

/* Watchlist View */
#watchlist-view {
  position: relative !important;
  min-height: 100vh !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  padding-left: calc(50vw - 50%) !important;
  padding-right: calc(50vw - 50%) !important;
}

#watchlist-view > * {
  position: relative !important;
  z-index: 2 !important;
}

#player-detail-view > * {
  position: relative !important;
  z-index: 2 !important;
}

/* Make cards semi-transparent to show background through */
#dashboard-view .player-card,
#dashboard-view .update-item,
#market-view .market-card,
#market-view .market-section,
#watchlist-view .player-card,
#watchlist-view .player-row,
.detail-price-section {
  background: rgba(20,24,28,0.75) !important;
  backdrop-filter: blur(5px) !important;
  border: 1px solid rgba(255,255,255,0.12) !important;
}


/* Database View Background */
#database-view {
  position: relative !important;
  min-height: 100vh !important;
  background-image: url("../images/background/zenith_bg.webp");
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

/* Ensure content is above overlay */
#database-view > * {
  position: relative !important;
  z-index: 2 !important;
}



.player-detail-glass-container {
    background: rgba(14, 17, 20, 0.15) !important; /* Very subtle, almost invisible */
    backdrop-filter: blur(40px) saturate(120%) brightness(1.05) !important; /* Strong blur + saturation for pro look */
    -webkit-backdrop-filter: blur(40px) saturate(120%) brightness(1.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important; /* Ultra-subtle border */
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important; /* Slight top accent */
    min-height: 100vh;
    padding: 0;
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), /* Soft depth shadow */
                inset 0 1px 0 rgba(255, 255, 255, 0.05); /* Inner glow for glass effect */
}

/* ====================================
   CUSTOM STATS - HORIZONTAL SCROLL
   ==================================== */


.player-row-stats {
    display: flex;
    gap: 8px;
    overflow-x: auto; /* Enable horizontal scroll */
    overflow-y: hidden;
    padding: 4px 0;
    scroll-behavior: smooth;

    /* Hide scrollbar but keep functionality */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Webkit browsers (Chrome, Safari, Edge) */
.player-row-stats::-webkit-scrollbar {
    height: 4px;
}

.player-row-stats::-webkit-scrollbar-track {
    background: transparent;
}

.player-row-stats::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.player-row-stats::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Prevent stat pills from wrapping */
.stat-pill {
    flex-shrink: 0; /* Don't shrink */
    min-width: fit-content;
}

/* Optional: Highlight custom stats with subtle styling */
.stat-pill-custom {
    background: rgba(59, 130, 246, 0.1); /* Subtle blue tint */
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-pill-custom .stat-pill-label {
    color: #60a5fa; /* Light blue for custom stat labels */
}

/* Optional: Add fade effect at edges when scrolling */
.player-row-stats::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 30px;
    height: 100%;
    background: linear-gradient(to right, transparent, var(--bg-secondary));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.player-row-stats:hover::after {
    opacity: 1;
}


.player-card-scale {
    transform: scale(0.9); /* Reduced from 1.1 */
    transform-origin: center left;
}

/* ============ MARKET UNDER CONSTRUCTION ============ */
.market-under-construction {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(14, 17, 20, 0.95); /* Dark overlay */
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'CruyffSans', sans-serif;
}

.market-content-blur {
  filter: blur(10px);
  pointer-events: none;
}

.market-under-construction-content {
  text-align: center;
  background: rgba(20, 24, 28, 0.95);
  padding: 40px 30px;
  border-radius: 16px;
  border: 1px solid rgba(0, 194, 168, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  max-width: 500px;
  backdrop-filter: blur(20px);
}

.market-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #00C2A8, #3BD671);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(0, 194, 168, 0.4);
}

.market-icon svg {
  width: 40px;
  height: 40px;
  fill: white;
}

.market-title {
  font-size: 28px;
  font-weight: 800;
  background: linear-gradient(135deg, #00C2A8, #3BD671);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0 0 12px 0;
  letter-spacing: -0.5px;
}

.market-subtitle {
  font-size: 16px;
  color: #98A0A6;
  margin: 0 0 24px 0;
  line-height: 1.5;
}

.market-status {
  font-size: 14px;
  color: #FF6B6B;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}


/* Close Button */
.market-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(255, 107, 107, 0.2);
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 12px;
  color: #FF6B6B;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.market-close-btn:hover {
  background: rgba(255, 107, 107, 0.3);
  border-color: #FF6B6B;
  transform: scale(1.05);
}

.market-close-btn:active {
  transform: scale(0.95);
}

/* MOBILE FILTER MODAL - FIXED ANIMATION */
.mobile-filter-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-filter-modal.active {
  opacity: 1;
  visibility: visible;
}

.mobile-filter-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-filter-modal.active .mobile-filter-backdrop {
  opacity: 1;
}

.mobile-filter-drawer {
  position: absolute;
  top: -20px;
  right: -100%;
  width: 85vw;
  max-width: 400px;
  height: 120vh;
  background: var(--bg-primary, #0a0a0f);
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateX(100%);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  overflow-y: auto;
}

.mobile-filter-modal.active .mobile-filter-drawer {
  right: 0;
  transform: translateX(0);
}

.mobile-filter-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mobile-filter-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-filter-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

.mobile-filter-content {
  padding: 20px;
  height: calc(100% - 80px);
}

.mobile-filter-footer {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  gap: 12px;
}

.mobile-filter-footer .btn {
  flex: 1;
  padding: 14px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 16px;
}

/* Close button backdrop click */
.mobile-filter-backdrop {
  cursor: pointer;
}

/* Prevent body scroll when open */
body.overflow-hidden {
  overflow: hidden;
}



/* ===========================
   ZENITH FOOTER â€” STRONG TEAL TRANSPARENT (BALANCED)
   =========================== */

.zenith-footer {
  margin-top: 64px;
  padding: 18px 24px;
  position: relative;
  overflow: hidden;

  /* Strong teal transparent - balanced brightness */
  background:
    linear-gradient(
      135deg,
      rgba(0,194,168,0.06) 0%,          /* ðŸ”¥ Subtle teal start */
      rgba(0,194,168,0.12) 50%,         /* ðŸ”¥ Moderate peak */
      rgba(0,194,168,0.08) 100%         /* ðŸ”¥ Gentle fade */
    ),
    linear-gradient(
      to bottom,
      rgba(0,194,168,0.10) 0%,          /* ðŸ”¥ Moderate top */
      rgba(0,194,168,0.04) 100%         /* ðŸ”¥ Very subtle bottom */
    );

  backdrop-filter: blur(20px) saturate(130%);
  -webkit-backdrop-filter: blur(20px) saturate(130%);

  /* NO BORDERS - seamless merge */
  border: none;

  /* Subtle depth without harsh lines */
  box-shadow:
    inset 0 2px 8px rgba(0,194,168,0.08),       /* ðŸ”¥ Gentle inner glow */
    0 -8px 28px rgba(0,194,168,0.10),           /* ðŸ”¥ Soft outer glow */
    0 4px 20px rgba(0,0,0,0.12);                /* Soft bottom shadow */
}

.zenith-footer-inner {
  max-width: 1600px;
  margin: 0 auto;
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;

  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  color: #9FA8AD;                               /* Comfortable text color */
}

/* LEFT â€” Brand */
.zenith-footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.zenith-footer-logo {
  height: clamp(1.1rem, 2vw, 1.6rem);
  width: auto;
  max-width: 100%;
  display: block;
  filter: drop-shadow(0 0 10px rgba(0, 194, 168, 0.35));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.zenith-footer-logo:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 0 16px rgba(0, 194, 168, 0.5));
}

.zenith-footer-tag {
  font-size: 12px;
  opacity: 0.85;
  color: #8F9DA3;
}

/* CENTER â€” Nav */
.zenith-footer-center {
  display: flex;
  gap: 22px;
}

.zenith-footer-center a {
  color: rgba(159,168,173,0.9);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  padding: 6px 0;
  position: relative;
  transition: all 0.2s ease;
}

.zenith-footer-center a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0,194,168,0.6),                        /* ðŸ”¥ Moderate underline */
    transparent
  );
  transform: scaleX(0);
  transition: transform 0.2s ease;
  box-shadow: 0 0 8px rgba(0,194,168,0.4);
}

.zenith-footer-center a:hover {
  color: #00C2A8;                               /* ðŸ”¥ Original teal */
  transform: translateY(-2px);
  text-shadow: 0 0 10px rgba(0,194,168,0.35);  /* ðŸ”¥ Subtle glow */
}

.zenith-footer-center a:hover::after {
  transform: scaleX(1);
}

/* RIGHT â€” System */
.zenith-footer-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(159,168,173,0.75);
}

.zenith-footer-dot {
  color: #00C2A8;                               /* ðŸ”¥ Original teal */
  opacity: 0.65;                                /* ðŸ”¥ More subtle */
  font-weight: 700;
  text-shadow: 0 0 6px rgba(0,194,168,0.25);
}

.zenith-footer-right span {
  transition: color 0.2s ease;
}

.zenith-footer-right span:hover {
  color: #00C2A8;
}

/* Balanced teal smoke overlay */
.zenith-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      circle at 25% 50%,
      rgba(0,194,168,0.14) 0%,                  /* ðŸ”¥ Moderate teal smoke */
      transparent 50%
    ),
    radial-gradient(
      circle at 75% 50%,
      rgba(0,194,168,0.10) 0%,                  /* ðŸ”¥ Subtle teal smoke */
      transparent 50%
    );
  opacity: 0.5;                                 /* ðŸ”¥ Balanced visibility */
  pointer-events: none;
  animation: balancedSmokeFlow 10s ease-in-out infinite;
}

/* Gentle smoke animation */
@keyframes balancedSmokeFlow {
  0%, 100% {
    transform: translateX(0) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translateX(15px) scale(1.05);
    opacity: 0.6;
  }
}

/* Mobile */
@media (max-width: 968px) {
  .zenith-footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 12px;
  }

  .zenith-footer-left,
  .zenith-footer-right {
    justify-content: center;
  }

  .zenith-footer-center {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .zenith-footer {
    padding: 16px 20px;
    margin-top: 50px;
  }

  .zenith-footer-logo {
    font-size: 14px;
  }

  .zenith-footer-center a {
    font-size: 12px;
  }
}


/* Dark top shadow layer */
.zenith-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.35),   /* dark smoke at top */
    rgba(0,0,0,0.15),
    transparent
  );
  opacity: 100px;
  pointer-events: none;
  z-index: 0;
}

.zenith-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.35),   /* dark smoke at top */
    rgba(0,0,0,0.15),
    transparent
  );
  opacity: 100px;
  pointer-events: none;
  z-index: 0;
}


.zenith-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.35),   /* dark smoke at top */
    rgba(0,0,0,0.15),
    transparent
  );
  opacity: 100px;
  pointer-events: none;
  z-index: 0;
}

.zenith-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.35),   /* dark smoke at top */
    rgba(0,0,0,0.15),
    transparent
  );
  opacity: 100px;
  pointer-events: none;
  z-index: 0;
}


.zenith-footer::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.35),   /* dark smoke at top */
    rgba(0,0,0,0.15),
    transparent
  );
  opacity: 100px;
  pointer-events: none;
  z-index: 0;
}



/* Market Under Construction Modal */
.construction-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.construction-modal.active {
    display: flex;
}

.construction-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(14, 17, 20, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.construction-content {
    position: relative;
    background: var(--color-graphite-800);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    padding: 60px 80px;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: constructionSlideIn 0.4s var(--ease-standard);
    z-index: 1;
}

.construction-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--color-secondary);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s var(--ease-standard);
}

.construction-close:hover {
    background: var(--color-secondary-hover);
    color: var(--color-text-primary);
    border-color: var(--color-teal-500);
    transform: rotate(90deg);
}

.construction-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    background: rgba(var(--color-teal-rgb), 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-teal-500);
}

.construction-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.construction-message {
    font-size: 18px;
    color: var(--color-text-muted);
    margin: 0;
}

@keyframes constructionSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .construction-content {
        padding: 40px 30px;
        margin: 0 20px;
    }

    .construction-title {
        font-size: 24px;
    }

    .construction-message {
        font-size: 16px;
    }
}


/* ========== HORIZONTAL SCROLL FOR DATABASE STATS ========== */

/* Override stats row for horizontal scrolling */
.player-row-stats.player-card-stats-row {
    display: flex !important;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 8px;
    max-width: 100%;
    scroll-behavior: smooth;
    padding-right: 2px;
}

/* Prevent stat pills from shrinking */
.player-row-stats.player-card-stats-row .stat-pill {
    flex-shrink: 0;
    min-width: 54px;
}

/* Scrollbar styling */
.player-row-stats.player-card-stats-row::-webkit-scrollbar {
    height: 6px;
}

.player-row-stats.player-card-stats-row::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 3px;
}

.player-row-stats.player-card-stats-row::-webkit-scrollbar-thumb {
    background: var(--color-teal-500);
    border-radius: 3px;
}

.player-row-stats.player-card-stats-row::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal-600);
}

/* Mobile: Keep existing grid behavior */
@media (max-width: 768px) {
    .player-row {
        display: flex !important;
        flex-wrap: wrap;
        grid-template-columns: unset !important;
    }

    .player-row-stats.player-card-stats-row {
        display: flex !important;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        margin-top: -23px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .player-row-stats.player-card-stats-row::-webkit-scrollbar {
        display: none;
    }
}

/* ==================== PLAYER PRICE HISTORY ==================== */
.player-price-history-section {
  margin-top: 24px;
  background: var(--color-graphite-800, #14181C);
  border: 1px solid rgba(0, 194, 168, 0.15);
  border-radius: 14px;
  padding: 18px 20px 22px;
  box-shadow: 0 20px 60px rgba(5, 11, 16, 0.45);
  width: 100%;
}

.price-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.price-history-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--color-text-primary, #E6EEF2);
  font-family: var(--font-family-base);
}

.price-history-subtitle {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--color-text-muted, #98A0A6);
  letter-spacing: 0.3px;
}

.price-history-ranges {
  display: inline-flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.price-range-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted, #98A0A6);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-family-base);
}

.price-range-btn.active {
  background: rgba(0, 194, 168, 0.15);
  color: var(--color-teal-500, #00C2A8);
  box-shadow: 0 0 16px rgba(0, 194, 168, 0.35);
}

.price-range-btn:hover {
  color: var(--color-text-primary, #E6EEF2);
}

.price-history-custom {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.price-history-custom-label {
  font-size: 12px;
  color: var(--color-text-muted, #98A0A6);
  font-weight: 600;
}

.price-history-slider {
  flex: 1;
  accent-color: var(--color-teal-500, #00C2A8);
}

.player-price-history-section[data-range="Custom"] .price-history-custom {
  display: flex;
}

.price-history-body {
  position: relative;
  min-height: clamp(300px, 34vw, 440px);
}

.price-history-chart {
  height: clamp(300px, 34vw, 440px);
  width: 100%;
}

.price-history-chart canvas {
  width: 100% !important;
  height: 100% !important;
}

.player-price-history-section[data-auctionable="false"] {
  display: none !important;
}

.reset-rank-btn {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--color-text-muted, #98A0A6);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.reset-rank-btn:hover {
  border-color: rgba(0, 194, 168, 0.4);
  color: var(--color-teal-500, #00C2A8);
}

/* ==================== PLAYER DETAILS RESPONSIVE LAYOUT ==================== */
@media (max-width: 1200px) and (min-width: 769px) {
  #player-detail-view {
    overflow-x: hidden;
  }

  #player-detail-view > div > div {
    width: min(80vw, 980px);
    margin-left: auto;
    margin-right: auto;
    padding-left: clamp(20px, 3vw, 28px) !important;
    padding-right: clamp(20px, 3vw, 28px) !important;
  }

  .player-top-section {
    width: 100%;
    max-width: 100% !important;
    justify-content: center;
  }

  .player-top-section > div {
    width: 100%;
  }

  .player-rank-refresh-grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  .player-refresh-container {
    margin-top: 0 !important;
  }

  .player-refresh-time-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .player-price-history-section {
    width: 100%;
  }

  .price-history-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-history-ranges {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 768px) {
  #player-detail-view {
    overflow-x: hidden;
  }
}

@media (max-width: 768px) {
  #player-detail-view > div > div {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .player-top-section {
    max-width: 100% !important;
  }

  .player-top-section > div:first-child > div:first-child {
    padding: 18px 14px !important;
  }

  .player-refresh-container {
    padding: 16px !important;
  }

  .player-refresh-time {
    font-size: 18px !important;
  }

  .player-refresh-countdown {
    width: 100%;
    text-align: center;
  }

  .player-skills-section {
    padding: 10px;
  }

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

  .player-price-history-section {
    padding: 16px;
  }

  .price-history-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .price-history-ranges {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .price-history-chart {
    width: 100%;
  }
}

@media (max-width: 640px) {
  #player-detail-view {
    overflow-x: hidden;
  }

  #player-detail-view > div > div {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .player-top-section {
    gap: 20px !important;
  }

  .player-rank-refresh-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .player-refresh-container {
    padding: 14px !important;
  }

  .player-price-history-section {
    padding: 14px;
  }
}

@media (max-width: 480px) {
  #player-detail-view > div > div {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .player-top-section {
    gap: 18px !important;
  }

  .player-skills-section {
    padding: 8px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .player-refresh-time {
    font-size: 17px !important;
  }

  .player-refresh-countdown {
    padding: 6px 10px !important;
  }

  .player-price-history-section {
    padding: 12px;
  }
}

.price-history-loading,
.price-history-empty {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 10px;
  color: var(--color-text-muted, #98A0A6);
  font-size: 13px;
  text-align: center;
}

.price-history-loading {
  display: flex;
}

.price-history-skeleton {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.12), rgba(255,255,255,0.04));
  animation: priceHistoryPulse 1.4s ease-in-out infinite;
}

.price-history-skeleton:nth-child(2) {
  width: 80%;
}

.price-history-skeleton:nth-child(3) {
  width: 60%;
}

@keyframes priceHistoryPulse {
  0% { opacity: 0.4; }
  50% { opacity: 1; }
  100% { opacity: 0.4; }
}

@media (max-width: 768px) {
  .price-history-ranges {
    flex-wrap: wrap;
  }

  .price-history-chart {
    height: 320px;
  }

  .price-history-body {
    min-height: 320px;
  }
}

@media (max-width: 480px) {
  .price-history-chart {
    height: 300px;
  }

  .price-history-body {
    min-height: 300px;
  }
}

/* Global background coverage for Home/Database */
html,
body {
  min-height: 100%;
}

body {
  min-height: 100vh;
  background-color: var(--color-background);
  background-image: url("../images/background/zenith_bg.webp");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

#dashboard-view,
#database-view {
  background: transparent !important;
  background-image: none !important;
}

#database-view::before {
  content: none !important;
}

/* ── Tools Dropdown ── */
.tools-dropdown-wrapper {
    position: relative;
}

.tools-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--color-graphite-900, #0E1114);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.5);
    z-index: 9999;
    overflow: hidden;
    animation: fadeInDown 0.15s ease;
}

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

.tools-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #d4d4d4;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s;
}

.tools-dropdown-item:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #fff;
}

/* Active tool gets highlighted */
.tools-dropdown-item.active {
    color: #6366F1;
    background: rgba(99,102,241,0.1);
}

.player-view-card-nation-flag.hero-icon-players-nation-flag{
  position: absolute;
  bottom: 20px;
  left: 31px;
  width: 14px;
  height: 11px;
  border-radius: 1px;
  z-index: 10;
  object-fit: cover;
}


.player-view-card-club-flag.hero-icon-club-players-flag{
  position: absolute;
  bottom: 20px;
  left: 65px;
  width: 14px;
  height: 11px;
  border-radius: 1px;
  z-index: 10;
  object-fit: cover;
}


.player-view-card-nation-flag.normal-players-nation-flag{
  position: absolute;
  bottom: 22px;
  left: 24px;
  width: 14px;
  height: 11px;
  border-radius: 1px;
  z-index: 10;
  object-fit: cover;
}


.player-view-card-club-flag.normal-club-players-flag{
  position: absolute;
  bottom: 20px;
  left: 71px;
  width: 15px;
  height: 12px;
  border-radius: 1px;
  z-index: 10;
  object-fit: cover;
}


.player-view-card-league-flag.normal-league-players-flag{
  position: absolute;
  bottom: 22px;
  left: 49px;
  width: 13px;
  height: 10px;
  border-radius: 1px;
  z-index: 10;
  object-fit: cover;
}


.card-nation-flag-inside-detail.hero-icon-nation-flag-detail{
  position: absolute;
  bottom: 15%;
  left: 32.5%;
  width: 25px;
  height: 25px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}

.card-club-flag-inside-detail.hero-icon-club-flag-detail{
  position: absolute;
  bottom: 15%;
  left: 60%;
  width: 25px;
  height: 25px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}

.card-nation-flag-inside-detail.normal-nation-flag-detail{
  position: absolute;
  bottom: 17%;
  left: 28%;
  width: 25px;
  height: 25px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}

.card-club-flag-inside-detail.normal-club-flag-detail{
  position: absolute;
  bottom: 17%;
  left: 62%;
  width: 25px;
  height: 25px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}


.card-league-flag-inside.normal-league-flag{
  position: absolute;
  bottom: 17%;
  left: 45%;
  width: 25px;
  height: 25px;
  object-fit: cover;
  border-radius: 3px;
  z-index: 3;
}