/* ============================================================
   IPL Auction Simulator — dark stadium theme
   ============================================================ */
:root {
  --bg: #070b18;
  --bg2: #0d1330;
  --card: #101736;
  --card2: #161f4a;
  --line: rgba(255,255,255,.08);
  --text: #eef1ff;
  --muted: #8b93b8;
  --gold: #f5c542;
  --green: #22c55e;
  --red: #ef4444;
  --blue: #4f7cff;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(79,124,255,.18), transparent 60%),
    radial-gradient(900px 500px at 10% 110%, rgba(245,197,66,.12), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(7,11,24,.75);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .ball { width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ff6b6b, #c81e2b 70%);
  box-shadow: 0 0 0 2px rgba(255,255,255,.15) inset; position: relative; }
.brand .ball::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 2px;
  background: rgba(255,255,255,.7); transform: translateX(-50%); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--muted); font-weight: 600; font-size: 14px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 15px; cursor: pointer; transition: .18s;
  font-family: inherit;
}
.btn-primary { background: linear-gradient(135deg, #4f7cff, #7b5cff); color: #fff;
  box-shadow: 0 8px 24px rgba(79,124,255,.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(79,124,255,.45); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: rgba(255,255,255,.06); }
.btn-gold { background: linear-gradient(135deg, #f5c542, #e8960c); color: #1a1200; }
.btn-gold:hover { transform: translateY(-2px); }
.btn-danger { background: rgba(239,68,68,.15); color: #f87171; border-color: rgba(239,68,68,.4); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ---------- hero ---------- */
.hero { padding: 90px 0 60px; text-align: center; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(79,124,255,.15); border: 1px solid rgba(79,124,255,.35);
  color: #9db4ff; font-size: 13px; font-weight: 600; margin-bottom: 22px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); line-height: 1.08; letter-spacing: -1px; margin-bottom: 18px; }
.hero h1 .gold { background: linear-gradient(90deg, #f5c542, #f59e0b, #f5c542);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.sub { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- sections ---------- */
.section { padding: 70px 0; }
.section-title { font-size: 32px; text-align: center; margin-bottom: 10px; }
.section-sub { color: var(--muted); text-align: center; margin-bottom: 44px; font-size: 16px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 24px;
  transition: .2s;
}
.card:hover { border-color: rgba(79,124,255,.4); transform: translateY(-3px); }
.card .icon { font-size: 30px; margin-bottom: 12px; }
.card h3 { font-size: 17px; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 14px; line-height: 1.55; }

/* ---------- step cards ---------- */
.step-num { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: rgba(79,124,255,.18); color: #9db4ff; font-weight: 800; margin-bottom: 14px; }

/* ---------- teams grid (landing) ---------- */
.team-chip {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px;
  transition: .2s;
}
.team-chip:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.2); }
.team-logo { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.5); }

/* ---------- testimonials ---------- */
.quote-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.quote-card .stars { color: var(--gold); letter-spacing: 2px; margin-bottom: 10px; }
.quote-card p { font-size: 14.5px; color: var(--text); line-height: 1.6; margin-bottom: 14px; }
.quote-card .who { display: flex; gap: 10px; align-items: center; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff; }
.quote-card .who .nm { font-weight: 700; font-size: 14px; }
.quote-card .who .loc { color: var(--muted); font-size: 12px; }

/* ---------- forms ---------- */
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px;
}
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.input, select.input, textarea.input {
  width: 100%; background: var(--bg2); border: 1px solid var(--line); color: var(--text);
  padding: 12px 14px; border-radius: 12px; font-size: 15px; font-family: inherit; outline: none;
}
.input:focus { border-color: var(--blue); }
.radio-cards { display: grid; gap: 12px; }
.radio-card {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg2); cursor: pointer; transition: .15s;
}
.radio-card:hover { border-color: rgba(79,124,255,.5); }
.radio-card input { margin-top: 4px; accent-color: var(--blue); }
.radio-card.selected { border-color: var(--blue); background: rgba(79,124,255,.08); }
.radio-card h4 { font-size: 15px; margin-bottom: 4px; }
.radio-card p { color: var(--muted); font-size: 13px; }

.mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .mode-grid { grid-template-columns: 1fr; } }

/* team picker */
.team-picker { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
@media (max-width: 800px) { .team-picker { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 480px) { .team-picker { grid-template-columns: repeat(2, 1fr); } }
.team-pick {
  border: 2px solid var(--line); border-radius: 14px; padding: 14px 8px; text-align: center;
  cursor: pointer; transition: .15s; background: var(--bg2); position: relative;
}
.team-pick:hover { border-color: rgba(255,255,255,.3); }
.team-pick.selected { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(245,197,66,.15); }
.team-pick .team-logo { margin: 0 auto 8px; width: 44px; height: 44px; font-size: 13px; border-radius: 12px; }
.team-pick .nm { font-size: 12px; font-weight: 700; }
.team-pick .badge { position: absolute; top: -8px; right: -6px; background: var(--gold); color: #1a1200;
  font-size: 10px; font-weight: 800; padding: 3px 8px; border-radius: 999px; }

/* ---------- auction room ---------- */
.room-layout { display: grid; grid-template-columns: 290px 1fr 300px; gap: 18px; padding: 20px 0 40px; }
@media (max-width: 1100px) { .room-layout { grid-template-columns: 1fr 300px; } .team-rail { display: none; } }
@media (max-width: 820px) { .room-layout { grid-template-columns: 1fr; } }

.team-rail { display: flex; flex-direction: column; gap: 10px; }
.rail-team {
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--card); cursor: pointer;
  transition: .15s;
}
.rail-team:hover { border-color: rgba(255,255,255,.25); }
.rail-team.active-leader { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245,197,66,.2); }
.rail-team .top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.rail-team .meta { flex: 1; }
.rail-team .nm { font-weight: 800; font-size: 13.5px; }
.rail-team .purse { color: var(--gold); font-weight: 700; font-size: 13px; }
.rail-team .counts { display: flex; gap: 8px; color: var(--muted); font-size: 11.5px; }

.stage { display: flex; flex-direction: column; gap: 14px; min-height: 70vh; }
.stage-topbar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.stage-topbar .code { font-weight: 800; letter-spacing: 2px; color: var(--gold); }

.player-stage {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--card), var(--bg2));
  border: 1px solid var(--line); border-radius: 20px; padding: 34px 22px; position: relative; overflow: hidden;
}
.player-stage::before { content: ''; position: absolute; inset: 0;
  background: radial-gradient(500px 220px at 50% 0%, rgba(79,124,255,.14), transparent 70%); pointer-events: none; }

.p-rating-badge {
  width: 92px; height: 92px; border-radius: 24px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; font-weight: 800; margin-bottom: 16px;
  background: linear-gradient(135deg, #2a3564, #1a2148); border: 1px solid rgba(255,255,255,.14);
  position: relative; z-index: 1;
}
.p-rating-badge .num { font-size: 34px; line-height: 1; }
.p-rating-badge .lbl { font-size: 10px; color: var(--muted); letter-spacing: 1px; }
.p-rating-badge.elite { background: linear-gradient(135deg, #7a5cff33, #f5c54233); border-color: rgba(245,197,66,.5); }
.p-rating-badge.elite .num { color: var(--gold); }

.p-name { font-size: clamp(26px, 4vw, 40px); font-weight: 800; position: relative; z-index: 1; text-align: center; }
.p-meta { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; justify-content: center; position: relative; z-index: 1; }
.p-tag { background: rgba(255,255,255,.07); border: 1px solid var(--line); padding: 5px 12px;
  border-radius: 999px; font-size: 12.5px; color: var(--muted); }
.p-tag.ov { color: #9db4ff; border-color: rgba(79,124,255,.4); }
.p-tag.base { color: var(--gold); border-color: rgba(245,197,66,.4); }

.bid-box { text-align: center; margin-top: 26px; position: relative; z-index: 1; }
.bid-amount { font-size: clamp(40px, 7vw, 64px); font-weight: 800; letter-spacing: -1px;
  background: linear-gradient(90deg, #fff, #9db4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.bid-leader { margin-top: 6px; color: var(--muted); font-size: 14px; }
.bid-leader b { color: var(--text); }

.bid-controls { display: flex; gap: 10px; justify-content: center; margin-top: 22px; flex-wrap: wrap; position: relative; z-index: 1; }

.timerbar { width: 220px; height: 6px; border-radius: 999px; background: rgba(255,255,255,.1); overflow: hidden;
  margin: 18px auto 0; position: relative; z-index: 1; }
.timerbar .fill { height: 100%; background: linear-gradient(90deg, #22c55e, #f5c542, #ef4444); transition: width .9s linear; }

.squad-panel { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.squad-panel h4 { font-size: 14px; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }
.squad-list { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow-y: auto; }
.squad-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px;
  background: var(--bg2); padding: 8px 10px; border-radius: 10px; }
.squad-row .pr { color: var(--gold); font-weight: 700; }
.squad-row .rt { color: var(--muted); font-size: 11px; }

.feed { display: flex; flex-direction: column; gap: 6px; max-height: 30vh; overflow-y: auto; font-size: 12.5px; }
.feed .row { padding: 8px 10px; background: var(--bg2); border-radius: 10px; color: var(--muted); }
.feed .row b { color: var(--text); }
.feed .row.sold b { color: var(--green); }
.feed .row.unsold b { color: var(--red); }

/* ---------- results ---------- */
.results-hero { text-align: center; padding: 60px 0 30px; }
.results-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
@media (max-width: 1100px) { .results-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .results-grid { grid-template-columns: repeat(2, 1fr); } }
.result-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.result-card.own { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(245,197,66,.18); }
.result-card h3 { font-size: 15px; margin-bottom: 4px; }
.result-card .spend { color: var(--gold); font-weight: 700; font-size: 13px; margin-bottom: 10px; }
.result-card .squad { display: flex; flex-direction: column; gap: 5px; max-height: 300px; overflow-y: auto; }
.result-card .srow { display: flex; justify-content: space-between; font-size: 12.5px; background: var(--bg2);
  padding: 6px 9px; border-radius: 8px; }
.result-card .srow .pr { color: var(--gold); }

.champ { text-align: center; margin-bottom: 40px; }
.champ .trophy { font-size: 60px; }
.champ h2 { font-size: 30px; margin-top: 8px; }
.champ p { color: var(--muted); }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%) translateY(20px);
  background: #1c2547; border: 1px solid rgba(255,255,255,.15); color: var(--text);
  padding: 12px 20px; border-radius: 12px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 100;
  box-shadow: 0 10px 30px rgba(0,0,0,.5);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 60px; padding: 34px 0; }
.site-footer .inner { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 13.5px; }

/* ---------- misc ---------- */
.badge-pill { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: rgba(245,197,66,.15); color: var(--gold); border: 1px solid rgba(245,197,66,.35); }
.muted { color: var(--muted); }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.center { text-align: center; }
.hidden { display: none !important; }
