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

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --bg: #060B18;
  --surface: #0B1220;
  --card: #0F1929;
  --card-hover: #131f35;
  --border: rgba(255,255,255,0.07);
  --border-hover: rgba(255,255,255,0.15);

  --gold: #FFCB30;
  --gold-dim: rgba(255,203,48,0.12);
  --gold-glow: rgba(255,203,48,0.25);
  --blue: #1DA0FF;
  --blue-dim: rgba(29,160,255,0.1);
  --green: #00C48C;
  --green-dim: rgba(0,196,140,0.1);
  --red: #FF4D4D;
  --red-dim: rgba(255,77,77,0.1);
  --orange: #FF8C00;

  --text: #F2F2F2;
  --text-sec: #9BA3AF;
  --text-dim: #4B5563;

  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --transition: 0.2s ease;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse at 15% 60%, rgba(29,160,255,0.05) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(255,203,48,0.07) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 90%, rgba(29,160,255,0.03) 0%, transparent 60%);
}

a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; font-family: inherit; }
input, select { font-family: inherit; }
img { display: block; }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
.display {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

/* ============================================================
   HEADER / NAVBAR
   ============================================================ */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--border);
  background: rgba(6,11,24,0.85);
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 100;
}
.logo {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: 0.5px;
}
.header-badge {
  font-size: 0.7rem;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid var(--gold-glow);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
}
.glass:hover { border-color: var(--border-hover); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  letter-spacing: 0.3px;
}
.btn-primary {
  background: var(--gold);
  color: #060B18;
}
.btn-primary:hover {
  background: #ffd94d;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px var(--gold-glow);
}
.btn-secondary {
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--border-hover);
}
.btn-ghost {
  background: transparent;
  color: var(--text-sec);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--border-hover); }
.btn-danger {
  background: var(--red-dim);
  color: var(--red);
  border: 1px solid rgba(255,77,77,0.3);
}
.btn-danger:hover { background: rgba(255,77,77,0.2); }
.btn-success {
  background: var(--green);
  color: #060B18;
}
.btn-success:hover {
  background: #00d99f;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(0,196,140,0.3);
}
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; border-radius: var(--radius); }
.btn-xl { padding: 1.2rem 2.5rem; font-size: 1.2rem; border-radius: var(--radius); }
.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}
.btn-full { width: 100%; }

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group { display: flex; flex-direction: column; gap: 0.5rem; }
.form-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sec);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.form-input {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 0.8rem 1rem;
  font-size: 1rem;
  transition: var(--transition);
  outline: none;
}
.form-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-dim);
}
.form-input::placeholder { color: var(--text-dim); }
.form-input option { background: var(--card); color: var(--text); }

.mode-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.mode-option {
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-sec);
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}
.mode-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.mode-option.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

.range-wrapper { display: flex; align-items: center; gap: 1rem; }
.range-val {
  min-width: 90px;
  text-align: right;
  font-weight: 700;
  color: var(--gold);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
}
input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 4px;
  background: rgba(255,255,255,0.1);
  cursor: pointer;
  outline: none;
}
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
  cursor: pointer;
}

/* ============================================================
   TABS (Landing page)
   ============================================================ */
.tabs {
  display: flex;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--border);
}
.tab-btn {
  flex: 1;
  padding: 0.65rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-sec);
  background: transparent;
  transition: var(--transition);
}
.tab-btn.active {
  background: var(--gold);
  color: #060B18;
}
.tab-panel { display: none; }
.tab-panel.active { display: flex; flex-direction: column; gap: 1.25rem; }

/* ============================================================
   LANDING PAGE HERO
   ============================================================ */
.hero {
  text-align: center;
  margin-bottom: 2.5rem;
}
.hero-icon {
  font-size: 3.5rem;
  margin-bottom: 0.75rem;
  animation: float 3s ease-in-out infinite;
}
.hero-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  background: linear-gradient(135deg, #FFCB30 0%, #FF8C00 50%, #FFCB30 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.5rem;
}
.hero-sub {
  color: var(--text-sec);
  font-size: 1.05rem;
}

.landing-card {
  width: 100%;
  max-width: 480px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ============================================================
   TEAM SELECTOR GRID
   ============================================================ */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}
.team-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  padding: 0.6rem 0.3rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.team-option:hover:not(.taken) {
  border-color: var(--border-hover);
  background: rgba(255,255,255,0.05);
  transform: translateY(-2px);
}
.team-option.selected {
  border-color: var(--gold) !important;
  background: var(--gold-dim) !important;
}
.team-option.taken {
  opacity: 0.4;
  cursor: not-allowed;
}
.team-option.taken::after {
  content: 'TAKEN';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.55rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 1px;
  background: rgba(6,11,24,0.85);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
}
.team-short {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}
.team-logo {
  width: 30px;
  height: 30px;
  padding: 3px;
  border-radius: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

/* ============================================================
   LOBBY PAGE
   ============================================================ */
.lobby-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  padding: 2rem 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}
.room-code-box {
  text-align: center;
  padding: 2rem;
  background: var(--gold-dim);
  border: 2px solid var(--gold-glow);
  border-radius: var(--radius);
  min-width: 300px;
}
.room-code-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  margin-bottom: 0.5rem;
}
.room-code-value {
  font-family: 'Rajdhani', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 8px;
  cursor: pointer;
  transition: var(--transition);
}
.room-code-value:hover { opacity: 0.8; }
.room-code-hint { font-size: 0.8rem; color: var(--text-sec); margin-top: 0.5rem; }

.lobby-teams-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  width: 100%;
}
.lobby-team-slot {
  padding: 1.25rem 0.75rem;
  border-radius: var(--radius);
  border: 2px solid var(--border);
  background: var(--card);
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.lobby-team-slot.joined {
  border-color: var(--green);
  background: var(--green-dim);
}
.lobby-team-slot.mine {
  border-color: var(--gold);
  background: var(--gold-dim);
}
.lobby-team-slot.available:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.lobby-team-slot.taken { opacity: 0.5; cursor: default; }

.slot-logo {
  width: 64px;
  height: 64px;
  display: block;
  margin: 0 auto 0.45rem;
  object-fit: cover;
  object-position: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: transparent;
  border: none;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.45));
}
.slot-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.slot-owner {
  font-size: 0.75rem;
  color: var(--text-sec);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.slot-badge {
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 100px;
  white-space: nowrap;
}
.slot-badge.you {
  background: var(--gold);
  color: #060B18;
}
.slot-badge.host {
  background: var(--blue);
  color: #fff;
}

/* ============================================================
   AUCTION PAGE
   ============================================================ */
.auction-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  grid-template-rows: 1fr;
  min-height: calc(100vh - 61px);
  gap: 0;
}

/* Teams Sidebar */
.teams-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.sidebar-title {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-sec);
  padding: 0.5rem 0.5rem;
}
.sidebar-team {
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.sidebar-team::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--team-color, var(--text-dim));
  border-radius: 2px 0 0 2px;
}
.sidebar-team.leading {
  border-color: rgba(255, 203, 48, 0.3);
  background: var(--gold-dim);
}
.sidebar-team.mine { border-color: rgba(255,203,48,0.2); }
.team-row-top {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}
.team-short-badge {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--team-color, var(--text-sec));
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.sidebar-team-logo {
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}
.team-owner-name {
  font-size: 0.82rem;
  color: var(--text-sec);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-row-bottom {
  display: flex;
  justify-content: space-between;
}
.team-stat {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.team-stat span {
  font-weight: 600;
  color: var(--text);
}
.leading-crown { font-size: 0.7rem; margin-left: auto; }

/* Main Auction Area */
.auction-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.auction-topbar {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--surface);
}
.auction-progress { display: flex; align-items: center; gap: 1rem; }
.pool-banner-btn {
  border: 1px solid rgba(255, 203, 48, 0.35);
  background: linear-gradient(135deg, rgba(255,203,48,0.16), rgba(255,140,0,0.12));
  color: #fff2c4;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 34px;
  transition: var(--transition);
}
.pool-banner-btn:hover {
  border-color: rgba(255, 203, 48, 0.55);
  box-shadow: 0 6px 18px rgba(255, 140, 0, 0.2);
}
.pool-banner-label {
  font-size: 0.64rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #f7df9a;
}
.pool-banner-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #fff7da;
  white-space: nowrap;
}
.pool-banner-meta {
  font-size: 0.72rem;
  color: #f5e9c2;
  white-space: nowrap;
}
.progress-text {
  font-size: 0.85rem;
  color: var(--text-sec);
}
.progress-bar-wrap {
  width: 120px;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.my-team-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-glow);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
}
.chip-team-logo {
  width: 20px;
  height: 20px;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
}

.auction-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 0;
  overflow: hidden;
}

/* Player Spotlight */
.player-spotlight {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 1.5rem;
}
.player-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  border: 4px solid rgba(255,255,255,0.1);
  box-shadow: 0 0 40px rgba(0,0,0,0.4);
  flex-shrink: 0;
  position: relative;
}
.player-avatar.pulse-ring::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  animation: pulseRing 1.5s ease-in-out infinite;
}
.player-info-card {
  text-align: center;
}
.player-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 0.6rem;
}
.player-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.badge {
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}
.badge-role {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}
.badge-country { background: rgba(255,255,255,0.05); color: var(--text-sec); }
.badge-category-Indian { background: rgba(255,121,61,0.15); color: #FF793D; }
.badge-category-Overseas { background: rgba(29,160,255,0.15); color: var(--blue); }
.base-price {
  font-size: 0.9rem;
  color: var(--text-sec);
}
.base-price span {
  font-weight: 700;
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.1rem;
}

/* Bid Panel */
.bid-panel {
  border-left: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  gap: 1.5rem;
}
.current-bid-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-sec);
  text-align: center;
}
.current-bid-amount {
  font-family: 'Rajdhani', sans-serif;
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--gold);
  text-align: center;
  line-height: 1;
  transition: all 0.3s ease;
}
.current-bid-amount.bumped {
  animation: bidBump 0.4s ease;
}
.highest-bidder-chip {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 1rem;
  border-radius: 100px;
  background: var(--gold-dim);
  border: 1px solid var(--gold-glow);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold);
  text-align: center;
  min-height: 30px;
}

/* Timer Ring */
.timer-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
}
.timer-ring-svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}
.timer-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.07);
  stroke-width: 7;
}
.timer-ring-progress {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
  stroke-linecap: round;
  stroke-dasharray: 283;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1s linear, stroke 0.5s ease;
}
.timer-value {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'Rajdhani', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}

.bid-btn {
  width: 100%;
  padding: 1rem;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #FFCB30, #FF9D00);
  color: #060B18;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 1px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(255,203,48,0.2);
}
.bid-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,203,48,0.4);
}
.bid-btn:active:not(:disabled) { transform: scale(0.98); }
.bid-btn:disabled {
  background: rgba(255,255,255,0.07);
  color: var(--text-dim);
  cursor: not-allowed;
  box-shadow: none;
}

.quick-bid-row {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

/* Hide legacy single bid button if an old cached HTML still contains it */
.bid-panel .bid-btn {
  display: none !important;
}

.quick-bid-btn {
  padding: 0.78rem 0.5rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #FFCB30, #FF9D00);
  border: 1px solid rgba(255, 203, 48, 0.55);
  color: #060B18;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.6px;
  transition: var(--transition);
  box-shadow: 0 4px 20px rgba(255,203,48,0.2);
}

.quick-bid-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(255,203,48,0.4);
}

.quick-bid-btn:disabled {
  background: linear-gradient(135deg, #FFCB30, #FF9D00);
  border: 1px solid rgba(255, 203, 48, 0.55);
  color: #060B18;
  box-shadow: 0 4px 20px rgba(255,203,48,0.15);
  opacity: 0.55;
  cursor: not-allowed;
}

.withdraw-btn {
  width: 100%;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text-sec);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.withdraw-btn:hover:not(:disabled) {
  border-color: var(--orange);
  color: #ffd7a1;
  background: rgba(255, 140, 0, 0.15);
}
.withdraw-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pass-btn {
  width: 100%;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-sec);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.pass-btn:hover:not(:disabled) {
  border-color: var(--red);
  color: var(--red);
  background: var(--red-dim);
}
.pass-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.skip-pool-btn {
  width: 100%;
  padding: 0.6rem;
  border-radius: var(--radius-sm);
  background: rgba(29,160,255,0.08);
  border: 1px solid rgba(29,160,255,0.28);
  color: #8ed2ff;
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--transition);
}
.skip-pool-btn:hover:not(:disabled) {
  border-color: var(--blue);
  color: #d7f0ff;
  background: rgba(29,160,255,0.2);
}
.skip-pool-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.no-purse-warning {
  font-size: 0.8rem;
  color: var(--red);
  text-align: center;
  display: none;
}

/* ============================================================
   SOLD / UNSOLD OVERLAY BANNER
   ============================================================ */
.result-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.result-overlay.visible { opacity: 1; }
.result-banner {
  padding: 2rem 4rem;
  border-radius: var(--radius);
  text-align: center;
  border: 2px solid transparent;
  backdrop-filter: blur(20px);
  animation: bannerPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.result-banner.sold {
  background: rgba(0,196,140,0.15);
  border-color: var(--green);
  box-shadow: 0 0 60px rgba(0,196,140,0.3);
}
.result-banner.unsold {
  background: rgba(255,77,77,0.12);
  border-color: var(--red);
  box-shadow: 0 0 60px rgba(255,77,77,0.25);
}
.result-word {
  font-family: 'Rajdhani', sans-serif;
  font-size: 4rem;
  font-weight: 700;
  letter-spacing: 4px;
  display: block;
}
.result-banner.sold .result-word { color: var(--green); }
.result-banner.unsold .result-word { color: var(--red); }
.result-detail { font-size: 1rem; color: var(--text-sec); margin-top: 0.3rem; }

.pool-start-banner {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 1200;
}
.pool-start-banner.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.pool-start-inner {
  min-width: 320px;
  max-width: 90vw;
  border-radius: 14px;
  border: 1px solid rgba(255, 203, 48, 0.35);
  background: linear-gradient(135deg, rgba(255,203,48,0.18), rgba(255,140,0,0.15));
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
  padding: 0.65rem 1rem;
  text-align: center;
}
.pool-start-title {
  font-size: 0.68rem;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #f7df9a;
  margin-bottom: 0.15rem;
}
.pool-start-name {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff3c1;
}

.team-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.team-modal-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}
.team-modal {
  width: min(640px, 92vw);
  max-height: 80vh;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
}
.pool-modal {
  width: min(760px, 94vw);
}
.pool-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.pool-summary-pill {
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
}
.pool-summary-pill.sold {
  background: rgba(0,196,140,0.15);
  color: var(--green);
  border: 1px solid rgba(0,196,140,0.28);
}
.pool-summary-pill.unsold {
  background: rgba(255,77,77,0.12);
  color: var(--red);
  border: 1px solid rgba(255,77,77,0.25);
}
.pool-summary-pill.remaining {
  background: rgba(29,160,255,0.14);
  color: var(--blue);
  border: 1px solid rgba(29,160,255,0.28);
}
.pool-summary-total {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--text-sec);
  display: inline-flex;
  align-items: center;
}
.pool-player-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.52rem 0.6rem;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.02);
}
.pool-row-right {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.pool-sold-team {
  max-width: 180px;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--sold-team-color, #9af6df);
  border: 1px solid color-mix(in srgb, var(--sold-team-color, #00C48C) 55%, transparent);
  background: color-mix(in srgb, var(--sold-team-color, #00C48C) 16%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pool-sold-price {
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #ffd86a;
  border: 1px solid rgba(255, 203, 48, 0.35);
  background: rgba(255, 203, 48, 0.13);
  white-space: nowrap;
}
.pool-status {
  min-width: 88px;
  text-align: center;
  font-size: 0.68rem;
  letter-spacing: 1px;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.3rem 0.45rem;
}
.pool-status.sold {
  color: var(--green);
  background: rgba(0,196,140,0.16);
  border: 1px solid rgba(0,196,140,0.3);
}
.pool-status.unsold {
  color: var(--red);
  background: rgba(255,77,77,0.14);
  border: 1px solid rgba(255,77,77,0.28);
}
.pool-status.remaining {
  color: var(--blue);
  background: rgba(29,160,255,0.14);
  border: 1px solid rgba(29,160,255,0.3);
}
.team-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.team-modal-header h3 {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gold);
}
.team-modal-content {
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* ============================================================
   RESULTS PAGE
   ============================================================ */
.results-layout {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}
.results-hero {
  text-align: center;
  padding: 2rem;
  margin-bottom: 2rem;
}
.results-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
}
.results-sub { color: var(--text-sec); margin-top: 0.5rem; }
.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.result-team-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
}
.result-team-header {
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.result-team-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--team-color, var(--text-dim));
}
.result-team-emoji-wrap {
  position: relative;
  width: 46px;
  height: 46px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.result-team-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
.result-team-emoji {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Rajdhani', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold);
  border: 1px solid var(--border);
}
.result-medal {
  position: absolute;
  right: -7px;
  top: -7px;
  font-size: 0.85rem;
  line-height: 1;
}
.result-team-info { flex: 1; }
.result-team-name {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.1rem;
}
.result-owner-name { font-size: 0.8rem; color: var(--text-sec); }
.result-team-stats {
  display: flex;
  gap: 1rem;
  text-align: right;
}
.result-stat-val {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--gold);
  display: block;
}
.result-stat-label { font-size: 0.7rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.result-squad-list { padding: 1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.result-player-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.02);
  font-size: 0.85rem;
}
.result-player-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.result-player-name { flex: 1; font-weight: 500; }
.result-player-price {
  font-family: 'Rajdhani', sans-serif;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gold);
}
.result-no-squad { color: var(--text-dim); font-size: 0.85rem; padding: 1rem; text-align: center; }

/* ============================================================
   EMPTY / LOADING STATES
   ============================================================ */
.state-loading, .state-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 3rem;
  color: var(--text-sec);
}
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.toast {
  position: fixed;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 9999;
  transition: transform 0.3s ease;
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--green); color: var(--green); }
.toast.error { border-color: var(--red); color: var(--red); }

/* ============================================================
   WAITING / STATUS SCREENS
   ============================================================ */
.waiting-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 61px);
  gap: 1.5rem;
  text-align: center;
  padding: 2rem;
}
.waiting-screen .spinner { width: 48px; height: 48px; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulseRing {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}
@keyframes bidBump {
  0% { transform: scale(1); }
  30% { transform: scale(1.15); }
  60% { transform: scale(0.97); }
  100% { transform: scale(1); }
}
@keyframes bannerPop {
  from { transform: scale(0.7); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.4s ease forwards; }

/* ============================================================
   STATIC INFO PAGES + FOOTER
   ============================================================ */
.info-page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.info-card {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.75rem;
}
.info-title {
  font-family: 'Rajdhani', sans-serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  color: var(--gold);
  margin-bottom: 0.8rem;
}
.info-subtitle {
  font-family: 'Rajdhani', sans-serif;
  font-size: 1.2rem;
  color: #ffd86a;
  margin: 1.4rem 0 0.55rem;
}
.info-text {
  color: var(--text-sec);
  line-height: 1.7;
  margin-bottom: 0.6rem;
}
.info-note {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-top: 0.85rem;
}
.contact-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin: 0.35rem 0 0.9rem;
}
.contact-list a {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}
.contact-form {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.5rem;
}
.form-textarea {
  resize: vertical;
  min-height: 120px;
}
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(6,11,24,0.7);
  backdrop-filter: blur(10px);
  padding: 0.85rem 1rem;
}
.site-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  gap: 0.8rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  color: var(--text-dim);
  font-size: 0.85rem;
}
.site-footer-links {
  display: flex;
  gap: 0.95rem;
  align-items: center;
}
.site-footer-links a {
  color: var(--text-sec);
  transition: var(--transition);
}
.site-footer-links a:hover {
  color: var(--gold);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .auction-layout { grid-template-columns: 1fr; }
  .teams-sidebar { display: none; }
  .auction-body { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .bid-panel { border-left: none; border-top: 1px solid var(--border); }
  .lobby-teams-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(5, 1fr); }
  .pool-banner-meta { display: none; }
}
@media (max-width: 500px) {
  .header { padding: 1rem; }
  .team-grid { grid-template-columns: repeat(5, 1fr); gap: 0.3rem; }
  .lobby-teams-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: 1fr; }
  .pool-banner-label { display: none; }
  .pool-summary-total {
    width: 100%;
    margin-left: 0;
    margin-top: 0.25rem;
  }
  .pool-row-right {
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
  }
  .pool-sold-team {
    max-width: 130px;
  }
  .info-card {
    padding: 1.2rem;
  }
  .site-footer-inner {
    justify-content: center;
    text-align: center;
  }
}
