/* =============================================
   VARIABLES & RESET
   ============================================= */
:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161f;
  --bg-card-hover: #1e1e2a;
  --border: #2a2a3a;
  --border-hover: #3d3d55;

  --green: #d0d0da;
  --green-dark: #a0a0ae;
  --gold: #ffd700;
  --silver: #c0c0c0;
  --bronze: #cd7f32;
  --amazon: #ff9900;
  --amazon-hover: #e68900;
  --chrome-light: #f0f0f4;
  --chrome-mid:   #c0c0cc;
  --chrome-dark:  #888898;

  --text-primary: #f0f0f5;
  --text-secondary: #9090a8;
  --text-muted: #5a5a72;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-hover: 0 8px 40px rgba(200, 200, 220, 0.18);

  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
ul { list-style: none; }

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

/* =============================================
   HEADER & NAV
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo-icon { width: 32px; height: 32px; display: block; flex-shrink: 0; }
.logo span.logo-text { background: linear-gradient(135deg, var(--chrome-light), var(--chrome-mid)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

/* =============================================
   HERO
   ============================================= */
.hero-wrapper {
  position: relative;
  overflow: hidden;
  background: url('../img/hero-bg.jpg') center center / cover no-repeat;
}

.hero-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 15, 0.72) 0%,
    rgba(10, 10, 15, 0.62) 50%,
    rgba(10, 10, 15, 0.88) 100%
  );
}

.hero {
  position: relative;
  z-index: 1;
  padding: 100px 20px 80px;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--green-dark), #006633);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 999px;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.highlight {
  background: linear-gradient(135deg, var(--chrome-light), var(--chrome-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 36px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--chrome-light), var(--chrome-mid));
  color: #0a0a0f;
}
.btn-primary:hover { background: linear-gradient(135deg, #fff, var(--chrome-light)); transform: translateY(-2px); box-shadow: 0 4px 20px rgba(220,220,240,0.3); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-secondary:hover { border-color: var(--chrome-mid); color: var(--chrome-light); transform: translateY(-2px); }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

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

.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--chrome-light), var(--chrome-mid));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* =============================================
   TABS
   ============================================= */
.ranking-section {
  padding: 0 0 80px;
}

.tab-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 40px;
  background: var(--bg-secondary);
  padding: 6px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 28px;
  border-radius: calc(var(--radius) - 4px);
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.tab-btn.active {
  background: linear-gradient(135deg, var(--chrome-light), var(--chrome-mid));
  color: #0a0a0f;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.ranking-header {
  text-align: center;
  margin-bottom: 48px;
}

.ranking-header h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 10px;
}

.ranking-header p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.year-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--chrome-light), var(--chrome-mid));
  color: #0a0a0f;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 8px;
}

/* =============================================
   CARDS GRID
   ============================================= */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.player-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.player-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--rc1, var(--green)), var(--rc2, #00b3e6));
  opacity: 0;
  transition: opacity 0.3s;
}

.player-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

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

/* HEADER (rank + player inline) */
.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-rank {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.rank-number {
  font-size: 1.8rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--chrome-light), var(--chrome-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.rank-medal { font-size: 1.3rem; }

/* PLAYER */
.card-player {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.player-flag { font-size: 2rem; line-height: 1; flex-shrink: 0; }

.player-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }

.player-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-country { font-size: 0.75rem; color: var(--text-muted); }

.player-pair {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
}
.player-pair i { font-size: 0.65rem; }

/* ---- RACKET STAGE (imagen protagonista) ---- */
.racket-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 210px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: radial-gradient(ellipse at 30% 40%, var(--rc1, var(--green)) 0%, transparent 70%),
              radial-gradient(ellipse at 70% 70%, var(--rc2, #00b3e6) 0%, transparent 65%),
              var(--bg-secondary);
  background-blend-mode: overlay, overlay, normal;
  border: 1px solid var(--border);
}

.racket-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, var(--rc1, var(--green)) 0%, transparent 65%);
  opacity: 0.18;
  pointer-events: none;
}

.racket-img {
  position: relative;
  z-index: 1;
  height: 180px;
  width: auto;
  max-width: 90%;
  object-fit: contain;
  filter: drop-shadow(0 8px 28px rgba(0,0,0,0.55));
  transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
}

.player-card:hover .racket-img {
  transform: scale(1.08) rotate(-4deg);
}

.racket-svg {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.6));
  transition: transform 0.4s cubic-bezier(.34,1.56,.64,1);
}

.player-card:hover .racket-svg {
  transform: scale(1.06) rotate(-3deg);
}

.racket-brand-chip {
  position: absolute;
  bottom: 10px;
  right: 12px;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

/* RACKET DATA */
.racket-data {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.racket-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.35;
}

.racket-badges { display: flex; gap: 6px; flex-wrap: wrap; }

.badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
}

.badge-forma {
  background: rgba(200, 200, 220, 0.1);
  color: var(--chrome-light);
  border: 1px solid rgba(200, 200, 220, 0.3);
}

.badge-nivel {
  background: rgba(160, 160, 180, 0.1);
  color: var(--chrome-mid);
  border: 1px solid rgba(160, 160, 180, 0.3);
}

.racket-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* CARD FOOTER */
.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 4px;
  border-top: 1px solid var(--border);
}

.price-tag { display: flex; flex-direction: column; gap: 1px; }

.price-label {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.price-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.btn-buy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--amazon);
  color: #000;
  font-size: 0.85rem;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-buy:hover {
  background: var(--amazon-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(255, 153, 0, 0.35);
}

.btn-buy i { font-size: 0.75rem; }

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.btn-detail {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-detail:hover {
  background: var(--bg-card-hover);
  color: var(--chrome-light);
  border-color: var(--chrome-mid);
}

/* =============================================
   INFO SECTION
   ============================================= */
.info-section {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 80px 20px;
}

.info-section h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 48px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.info-card {
  text-align: center;
  padding: 36px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.3s;
}

.info-card:hover {
  border-color: var(--chrome-mid);
  transform: translateY(-4px);
}

.info-card i {
  font-size: 2rem;
  color: var(--chrome-mid);
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.info-card p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =============================================
   FAQ SECTION
   ============================================= */
.faq-section {
  padding: 80px 20px;
  max-width: 800px;
  margin: 0 auto;
}

.faq-section h2 {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 40px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.faq-item[open] { border-color: var(--chrome-mid); }

.faq-item summary {
  padding: 18px 20px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.4rem;
  color: var(--chrome-mid);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
  padding: 0 20px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 60px 20px 0;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary);
}

.footer-col p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col ul a {
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--chrome-light); }

.footer-disclaimer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: center;
}

/* =============================================
   HAMBURGER MENU
   ============================================= */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.nav-hamburger:hover { background: var(--bg-card); }

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  /* --- NAV --- */
  .nav-hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 20px 20px;
    gap: 4px;
    z-index: 99;
  }

  .nav-links.open { display: flex; }

  .nav-links li a {
    display: block;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--text-secondary);
  }

  .nav-links li a:hover {
    background: var(--bg-card);
    color: var(--text-primary);
  }

  .nav-container { position: relative; }

  /* --- HERO --- */
  .hero { padding: 70px 20px 55px; }
  .hero-stats { gap: 24px; }
  .stat-number { font-size: 1.8rem; }

  /* --- TABS --- */
  .tab-btn { padding: 12px 20px; font-size: 0.9rem; min-height: 44px; }

  /* --- CARDS --- */
  .cards-grid { grid-template-columns: 1fr; }

  .card-footer { flex-direction: column; align-items: stretch; }
  .card-actions { flex-direction: column; }
  .btn-buy, .btn-detail { justify-content: center; min-height: 44px; }
  .price-tag { flex-direction: row; align-items: center; gap: 8px; }

  /* --- FOOTER --- */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 1.8rem; }
  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; min-height: 44px; }
  .racket-stage { height: 180px; }
}
