/* ============================================================
   FantaMondiale Cup — Custom Styles
   Companion to Tailwind CSS
   ============================================================ */

/* ---- Base ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 9px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.3); }

/* ---- Football Pitch Background  -------------------------- */
.pitch-bg {
  background-color: #166534;
  background-image:
    /* Pitch stripes */
    repeating-linear-gradient(
      180deg,
      transparent 0px, transparent 60px,
      rgba(0,0,0,0.08) 60px, rgba(0,0,0,0.08) 120px
    ),
    /* Center line */
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,0.15) calc(50% - 1px), rgba(255,255,255,0.15) calc(50% + 1px), transparent calc(50% + 1px));
}

/* ---- Buttons --------------------------------------------- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #FFD700;
  color: #000;
  font-weight: 800;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
  border: none;
  outline: none;
  text-decoration: none;
}
.btn-primary:hover { background: #FFF176; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 700;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn-secondary:hover { background: rgba(255,255,255,0.14); border-color: rgba(255,255,255,0.35); }
.btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- Navigation ------------------------------------------ */
.nav-link {
  color: rgba(255,255,255,0.6);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ---- Cards ----------------------------------------------- */
.league-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.league-card:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
  transform: translateY(-2px);
}

.player-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.875rem;
  padding: 0.75rem;
  transition: border-color 0.15s, background 0.15s;
}
.player-card:hover {
  border-color: rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.08);
}

.market-player-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 0.875rem;
  padding: 0.75rem;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.market-player-card:hover {
  border-color: rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.1);
  transform: translateY(-2px);
}
.market-player-card.owned {
  border-color: rgba(34,197,94,0.4);
  background: rgba(34,197,94,0.06);
}

/* ---- Stats Cards ----------------------------------------- */
.stat-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  text-align: center;
}
.stat-value { font-size: 1.75rem; font-weight: 900; line-height: 1; }
.stat-label { font-size: 0.75rem; color: rgba(255,255,255,0.45); margin-top: 0.25rem; }

/* ---- Step Cards (landing) -------------------------------- */
.step-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 1.25rem;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}
.step-card:hover { border-color: rgba(255,215,0,0.3); transform: translateY(-3px); }
.step-icon { font-size: 2.5rem; line-height: 1; }
.step-num { font-size: 4rem; font-weight: 900; opacity: 0.06; position: absolute; top: -0.5rem; right: 0.5rem; line-height: 1; }

/* ---- Tabs ------------------------------------------------ */
.tab-btn {
  padding: 0.5rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.tab-btn:hover { color: rgba(255,255,255,0.8); }
.tab-active {
  background: rgba(255,255,255,0.1) !important;
  color: #fff !important;
}

/* ---- Form Inputs ----------------------------------------- */
.form-input {
  transition: border-color 0.15s;
}
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(255,215,0,0.15);
}

select.form-input option {
  background: #1a3a25;
  color: #fff;
}

/* ---- Position Filter Buttons ----------------------------- */
.pos-filter-btn {
  padding: 0.375rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.pos-filter-btn:hover { color: rgba(255,255,255,0.9); }
.pos-active {
  background: rgba(255,255,255,0.12) !important;
  color: #fff !important;
}

/* ---- Floating cards (hero) ------------------------------- */
.player-hero-card {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 1rem;
  padding: 1rem;
  animation: float var(--delay, 0s) 3s ease-in-out infinite alternate;
}

@keyframes float {
  from { transform: translateY(0px); }
  to { transform: translateY(-12px); }
}

/* ---- Pitch pitch lines ----------------------------------- */
.pitch-center-line {
  position: absolute;
  left: 50%;
  top: 0; bottom: 0;
  width: 2px;
  background: rgba(255,255,255,0.15);
  transform: translateX(-50%);
}
.pitch-center-circle {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 80px; height: 80px;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: 50%;
}

/* ---- Responsive ------------------------------------------ */
@media (max-width: 640px) {
  .btn-primary, .btn-secondary { padding: 0.5rem 0.875rem; font-size: 0.875rem; }
  .stat-value { font-size: 1.4rem; }
}
