/* ======================================================
   APL AUCTION — Professional Sports Broadcast Theme
   Design System + All Page Styles
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800;900&family=JetBrains+Mono:wght@500;700&display=swap');

/* ─── Design Tokens ─── */
:root {
  /* Flat, high-contrast professional palette */
  --bg-deep: #0b1121;     /* Very dark slate */
  --bg-primary: #0f172a;  /* Main background */
  --bg-surface: #1e293b;  /* Cards / Panels */
  --bg-card: #1e293b;
  --bg-elevated: #334155;
  --bg-hover: #334155;

  --primary: #2563eb;     /* ESPN Blue */
  --primary-light: #3b82f6;
  --primary-dark: #1d4ed8;

  --accent: #eab308;      /* Gold */
  --accent-light: #facc15;
  --accent-dark: #ca8a04;

  --success: #16a34a;     /* Solid Green */
  --success-dark: #15803d;
  --danger: #dc2626;      /* Solid Red */
  --danger-dark: #b91c1c;
  --warning: #f59e0b;
  --info: #0ea5e9;

  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0f172a;

  --border: #334155;
  --border-hover: #475569;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);

  --font-display: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Sharper corners for data-heavy dashboard look */
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition: 0.2s var(--ease);
}

/* ─── Reset & Base ─── */
*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--primary-light); text-decoration: none; }
img { max-width: 100%; display: block; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ─── Typography ─── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700; line-height: 1.2; color: var(--text);
  text-transform: uppercase; letter-spacing: -0.01em;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.text-gold    { color: var(--accent); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-center  { text-align: center; }
.text-mono    { font-family: var(--font-mono); }

/* ─── Utilities ─── */
.flex          { display: flex; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.items-center  { align-items: center; }
.justify-center{ justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs  { gap: 0.25rem; }
.gap-sm  { gap: 0.5rem; }
.gap-md  { gap: 1rem; }
.gap-lg  { gap: 1.5rem; }
.gap-xl  { gap: 2rem; }
.w-full  { width: 100%; }
.relative { position: relative; }
.hidden   { display: none !important; }

/* ─── Solid Card ─── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }

/* ─── Buttons ─── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: var(--font-body); font-size: 0.875rem; font-weight: 600;
  border: none; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
  text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--primary); color: #fff; border: 1px solid var(--primary-dark); }
.btn-primary:hover { background: var(--primary-light); }

.btn-accent { background: var(--accent); color: var(--text-inverse); border: 1px solid var(--accent-dark); }
.btn-accent:hover { background: var(--accent-light); }

.btn-success { background: var(--success); color: #fff; border: 1px solid var(--success-dark); }
.btn-success:hover { background: #15803d; }

.btn-danger { background: var(--danger); color: #fff; border: 1px solid var(--danger-dark); }
.btn-danger:hover { background: #b91c1c; }

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

.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: var(--bg-elevated); color: var(--text); border-color: var(--border-hover); }

.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1rem 2.5rem; font-size: 1.1rem; border-radius: var(--radius); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ─── Badges ─── */
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.25rem 0.5rem; font-size: 0.75rem; font-weight: 700;
  border-radius: var(--radius-sm);
  text-transform: uppercase; letter-spacing: 0.05em;
}
/* Solid flat colors for roles */
.badge-batsman   { background: #1e3a8a; color: #93c5fd; border: 1px solid #1e40af; }
.badge-bowler    { background: #7f1d1d; color: #fca5a5; border: 1px solid #991b1b; }
.badge-allrounder{ background: #064e3b; color: #6ee7b7; border: 1px solid #065f46; }
.badge-keeper    { background: #78350f; color: #fcd34d; border: 1px solid #92400e; }
.badge-sold      { background: var(--success-dark); color: #fff; border: 1px solid var(--success); }
.badge-unsold    { background: var(--danger-dark); color: #fff; border: 1px solid var(--danger); }
.badge-live      { background: var(--danger); color: #fff; font-family: var(--font-display); font-weight: 800; animation: pulseLive 1.5s infinite; }

.auction-status-badge { padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); font-size: 0.75rem; text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em; display: inline-flex; align-items: center; justify-content: center; }
.status-ready { background: var(--bg-deep); color: var(--text-muted); border: 1px solid var(--border); }
.status-live { background: var(--danger); color: #fff; border: 1px solid var(--danger-dark); animation: pulseLive 1.5s infinite; }
.status-paused { background: var(--warning); color: #fff; border: 1px solid var(--accent-dark); }
.status-sold { background: var(--success); color: #fff; border: 1px solid var(--success-dark); }
.status-unsold { background: var(--bg-elevated); color: var(--text-secondary); border: 1px solid var(--border); }

/* ─── Inputs ─── */
.input, .select {
  padding: 0.625rem 1rem; font-family: var(--font-body); font-size: 0.875rem;
  color: var(--text); background: var(--bg-deep);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  outline: none; transition: var(--transition); width: 100%;
}
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,0.3); }
.input::placeholder { color: var(--text-muted); }

/* ─── Player Avatar ─── */
.avatar {
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  font-family: var(--font-display); font-weight: 800; color: #fff;
  flex-shrink: 0; text-transform: uppercase;
  border: 2px solid var(--border);
}
.avatar-sm  { width: 36px;  height: 36px;  font-size: 0.8rem; }
.avatar-md  { width: 48px;  height: 48px;  font-size: 1rem; }
.avatar-lg  { width: 80px;  height: 80px;  font-size: 1.5rem; }
.avatar-xl  { width: 120px; height: 120px; font-size: 2.5rem; }
.avatar-2xl { width: 180px; height: 180px; font-size: 3.5rem; border-width: 4px; }

/* Flat bold colors */
.avatar-batsman    { background: #1d4ed8; border-color: #3b82f6; }
.avatar-bowler     { background: #b91c1c; border-color: #ef4444; }
.avatar-allrounder { background: #047857; border-color: #10b981; }
.avatar-keeper     { background: #b45309; border-color: #f59e0b; }

/* ─── Timer ─── */
.timer-container {
  position: relative; display: flex; align-items: center; justify-content: center;
}
.timer-circle { transform: rotate(-90deg); }
.timer-circle-bg   { fill: none; stroke: var(--bg-deep); stroke-width: 5; }
.timer-circle-progress {
  fill: none; stroke: var(--primary); stroke-width: 5; stroke-linecap: butt;
  transition: stroke-dashoffset 1s linear, stroke 0.3s ease;
}
.timer-circle-progress.warning  { stroke: var(--warning); }
.timer-circle-progress.critical { stroke: var(--danger); }
.timer-text {
  position: absolute; font-family: var(--font-display); font-weight: 800; font-size: 2rem; color: var(--text);
}
.timer-text.warning  { color: var(--warning); }
.timer-text.critical { color: var(--danger); }

/* ─── Price Display ─── */
.price { font-family: var(--font-display); font-weight: 800; color: var(--accent); }
.price-lg { font-size: 2.5rem; }
.price-md { font-size: 1.5rem; }
.price-sm { font-size: 1.1rem; }
.price-animate { animation: priceUp 0.3s var(--ease-bounce); color: #fff; }

/* ─── Stat Item ─── */
.stat-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.5rem; background: var(--bg-deep);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  min-width: 80px;
}
.stat-value {
  font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--text);
}
.stat-label {
  font-size: 0.65rem; color: var(--text-muted); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.1rem;
}

/* ─── Section Header ─── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem; border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}
.section-header h3, .section-header h4 {
  font-size: 0.9rem; text-transform: uppercase; margin: 0;
  letter-spacing: 0.05em; color: var(--text-secondary);
}

/* ─── Empty State ─── */
.empty-state { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 0.9rem; font-weight: 500; }
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; opacity: 0.5; }

/* ─── Toast ─── */
.toast {
  position: fixed; top: 1rem; right: 1rem;
  padding: 1rem 1.25rem;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 0.875rem; font-weight: 500;
  z-index: 1000; animation: slideInRight 0.3s var(--ease);
  box-shadow: var(--shadow-lg); display: flex; align-items: center;
  gap: 0.5rem; max-width: 350px;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error   { border-left: 4px solid var(--danger); }
.toast.info    { border-left: 4px solid var(--info); }
.toast.warning { border-left: 4px solid var(--warning); }

/* ─── Modal ─── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(11,17,33,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 2rem; box-shadow: var(--shadow-lg);
  max-width: 500px; width: 90%; animation: slideUp 0.2s var(--ease);
}
.modal h3 { margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.5rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.modal-field { margin-bottom: 1.25rem; }
.modal-field label {
  display: block; font-size: 0.8rem; font-weight: 700;
  color: var(--text-secondary); margin-bottom: 0.375rem;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.modal-actions { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.5rem; }


/* ============================================
   LANDING PAGE
   ============================================ */
.landing {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 2rem; background: var(--bg-deep);
}
.landing-logo { margin-bottom: 1rem; }
.landing-logo h1 { font-size: 4.5rem; font-weight: 900; letter-spacing: -0.03em; color: #fff; }
.landing-subtitle {
  font-size: 1.1rem; color: var(--text-muted); font-weight: 500;
  margin-bottom: 3rem; text-align: center; text-transform: uppercase; letter-spacing: 0.1em;
}

.role-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem; max-width: 960px; width: 100%;
}
.role-card {
  background: var(--bg-surface); border: 2px solid var(--border);
  border-radius: var(--radius-lg); padding: 2.5rem 2rem;
  text-align: center; cursor: pointer; transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.role-card:hover {
  transform: translateY(-4px); border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.role-icon { font-size: 3rem; margin-bottom: 1rem; display: block; }
.role-card h3 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.role-card p { color: var(--text-muted); font-size: 0.875rem; line-height: 1.5; }
.role-card .role-enter {
  margin-top: 1.5rem; display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--primary-light); font-weight: 700; font-size: 0.875rem; text-transform: uppercase;
}
.bidder-input-group { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.bidder-input-group .input { text-align: center; font-weight: 600; }

/* ============================================
   ADMIN PAGE
   ============================================ */
.admin-layout {
  display: grid; grid-template-columns: 300px 1fr 340px;
  grid-template-rows: auto 1fr;
  gap: 1rem; height: 100vh; padding: 1rem; background: var(--bg-primary);
}
.admin-header {
  grid-column: 1 / -1;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem 1.25rem;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.admin-header h2 { font-size: 1.4rem; display: flex; align-items: center; gap: 0.5rem; }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 0.75rem; overflow: hidden; }
.sidebar .card { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 1rem; }

.search-bar { position: relative; margin-bottom: 0.75rem; }
.search-bar .input { padding-left: 2.25rem; background: var(--bg-primary); }
.search-bar .search-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  color: var(--text-muted); font-size: 0.875rem; pointer-events: none;
}

.filter-tabs {
  display: flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.25rem;
  background: var(--bg-primary); border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.filter-tab {
  flex: 1 1 auto; padding: 0.4rem 0.5rem; font-size: 0.7rem; font-weight: 700;
  text-align: center; background: transparent; color: var(--text-muted);
  border: none; border-radius: var(--radius-xs); cursor: pointer;
  transition: var(--transition); text-transform: uppercase; letter-spacing: 0.05em;
  white-space: nowrap;
}
.filter-tab.active { background: var(--primary); color: #fff; }
.filter-tab:hover:not(.active) { color: var(--text); background: var(--bg-hover); }

.player-list {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column;
  gap: 0.375rem; padding-right: 0.25rem; margin-top: 0.5rem;
}
.player-list-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 0.75rem; background: var(--bg-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.player-list-item:hover { background: var(--bg-hover); border-color: var(--text-muted); }
.player-list-item.active {
  background: var(--bg-hover); border-color: var(--primary); border-left: 4px solid var(--primary);
}
.player-list-item.sold { opacity: 0.4; }
.player-list-item .player-info { flex: 1; min-width: 0; }
.player-list-item .player-name {
  font-size: 0.85rem; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.player-list-item .player-role { font-size: 0.65rem; color: var(--text-muted); text-transform: uppercase; font-weight: 600; }
.player-list-item .player-price {
  font-size: 0.8rem; font-weight: 800; color: var(--accent); font-family: var(--font-mono);
}

/* Center Panel */
.auction-center { display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; }
.current-player-card {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; align-items: flex-start; gap: 1.5rem;
  box-shadow: var(--shadow-sm);
}
.current-player-details { flex: 1; }
.current-player-details h2 { font-size: 2rem; margin-bottom: 0.25rem; }
.current-player-details .player-style { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; font-weight: 500; }
.current-player-stats { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }

.auction-controls-panel {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-md);
}
.auction-info-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem;
  background: var(--bg-deep); padding: 1rem; border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.info-item { display: flex; flex-direction: column; }
.info-item .info-label {
  font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase;
  font-weight: 700; letter-spacing: 0.05em; margin-bottom: 0.25rem;
}
.info-item .info-value { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--text); }
.info-item .info-value.highlight { color: var(--accent); font-size: 2rem; }

.auction-controls-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
}

/* Right Panel */
.right-panel { display: flex; flex-direction: column; gap: 1rem; overflow: hidden; }

.bid-log { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 1rem; }
.bid-log-entries {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column;
  gap: 0.25rem; padding-right: 0.25rem;
}
.bid-entry {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.5rem; background: var(--bg-deep); border-left: 3px solid var(--primary);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 0.8rem;
}
.bid-entry .bidder-name { font-weight: 700; color: var(--text); }
.bid-entry .bid-amount  { font-weight: 800; color: var(--accent); font-family: var(--font-mono); }
.bid-entry .bid-time    { color: var(--text-muted); font-size: 0.65rem; font-family: var(--font-mono); }

.team-card {
  padding: 0.75rem; background: var(--bg-deep);
  border-radius: var(--radius-sm); margin-bottom: 0.5rem;
  border: 1px solid var(--border);
}
.team-card .team-name {
  font-weight: 800; font-size: 0.85rem; margin-bottom: 0.25rem; text-transform: uppercase;
  display: flex; align-items: center; justify-content: space-between;
}
.team-card .team-budget {
  font-size: 0.8rem; color: var(--accent); font-family: var(--font-mono);
}
.team-card .team-players {
  font-size: 0.75rem; color: var(--text-muted); margin-top: 0.25rem; font-weight: 500;
}


/* ============================================
   PREVIEW PAGE (BIG SCREEN)
   ============================================ */
.preview-layout {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg-deep);
}
.preview-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 2rem; background: var(--bg-surface);
  border-bottom: 4px solid var(--primary);
}
.preview-header h2 { font-size: 1.5rem; display: flex; align-items: center; gap: 0.5rem; color: #fff; }

.preview-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 2rem; padding-bottom: 120px;
}
.preview-player-hero {
  display: grid; grid-template-columns: 300px 1fr 350px; gap: 2rem;
  max-width: 1400px; width: 100%;
  background: var(--bg-surface); padding: 2rem; border-radius: var(--radius-xl);
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s var(--ease);
}

/* Column 1: Stats Table */
.preview-col-stats { display: flex; flex-direction: column; gap: 1rem; border-right: 2px solid var(--border); padding-right: 2rem; }
.preview-info-table { width: 100%; border-collapse: collapse; }
.preview-info-table th, .preview-info-table td { padding: 0.75rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border); }
.preview-info-table th { font-size: 0.8rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; width: 40%; }
.preview-info-table td { font-size: 0.95rem; font-weight: 600; color: var(--text); }

/* Column 2: Center Hero */
.preview-col-center { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 1.5rem; }
.preview-player-name { font-size: 3.5rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; text-align: center; text-transform: uppercase; }

.preview-photo-container { position: relative; display: flex; align-items: center; justify-content: center; margin-top: 1rem; width: 100%; }
.player-hero-photo { width: 100%; max-width: 320px; height: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); object-fit: cover; border: 4px solid var(--border); }
#playerAnimationContainer {
  position: absolute; right: -3rem; bottom: -1rem; width: 100px; height: 100px; z-index: 10;
}
#playerAnimation { width: 100%; height: 100%; object-fit: contain; opacity: 0.9; }

.preview-center-bid { text-align: center; margin-top: 1rem; background: var(--bg-deep); padding: 1.5rem 3rem; border-radius: var(--radius-lg); border: 2px solid var(--border); box-shadow: 0 4px 20px rgba(0,0,0,0.5); }
.preview-center-bid .bid-label { font-size: 0.85rem; text-transform: uppercase; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; }
.preview-center-bid .bid-amount { font-family: var(--font-mono); font-size: 3rem; font-weight: 900; color: var(--accent); margin: 0.5rem 0; }
.preview-center-bid .bid-by { font-size: 1rem; color: var(--text-secondary); }

/* Column 3: Teams Grid */
.preview-col-teams { border-left: 2px solid var(--border); padding-left: 2rem; display: flex; flex-direction: column; gap: 1rem; }
.teams-grid-header { font-size: 1rem; font-weight: 800; color: var(--text); text-transform: uppercase; text-align: center; background: var(--primary-dark); padding: 0.5rem; border-radius: var(--radius-sm); }
.preview-teams-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.team-grid-item { background: var(--bg-deep); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 0.75rem; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem; }
.team-grid-logo { width: 40px; height: 40px; border-radius: 50%; background: var(--bg-surface); margin-bottom: 0.25rem; object-fit: contain; }
.team-grid-name { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.team-grid-pts { font-family: var(--font-mono); font-size: 1rem; font-weight: 800; color: var(--text); }
.team-grid-label { font-size: 0.6rem; color: var(--text-muted); text-transform: uppercase; }



.radar-chart-container { width: 260px; height: 260px; position: relative; }
.preview-skills-legend {
  display: flex; flex-wrap: wrap; gap: 0.5rem; justify-content: center;
}
.legend-item {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase;
}
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }

/* Auction Bar */
.preview-auction-bar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 100px;
  background: var(--bg-surface); border-top: 4px solid var(--accent);
  display: flex; align-items: center; justify-content: space-between; z-index: 10;
  padding: 0 2rem; box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
}
.preview-auction-info { display: flex; align-items: center; gap: 2rem; min-width: 300px; }

.preview-bid-ticker { flex: 1; overflow: hidden; margin: 0 2rem; border-left: 2px solid var(--border); padding-left: 2rem; }
.ticker-track {
  display: flex; gap: 3rem; animation: ticker 15s linear infinite;
}
.ticker-item { white-space: nowrap; font-size: 1rem; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; }
.ticker-item .amount { color: var(--accent); font-weight: 800; font-family: var(--font-mono); font-size: 1.2rem; }

/* SOLD / UNSOLD Overlays */
.sold-overlay {
  position: fixed; inset: 0; background: rgba(11,17,33,0.9);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 100; animation: fadeIn 0.2s ease;
}
.sold-stamp {
  font-family: var(--font-display); font-size: 8rem; font-weight: 900;
  color: var(--success); text-transform: uppercase; letter-spacing: 0.05em;
  border: 12px solid var(--success); padding: 0 2rem; border-radius: var(--radius-lg);
  transform: rotate(-5deg);
}
.unsold-stamp {
  font-family: var(--font-display); font-size: 8rem; font-weight: 900;
  color: var(--danger); text-transform: uppercase; letter-spacing: 0.05em;
  border: 12px solid var(--danger); padding: 0 2rem; border-radius: var(--radius-lg);
  transform: rotate(-5deg);
}
.sold-details { margin-top: 2rem; text-align: center; background: var(--bg-surface); padding: 2rem 4rem; border-radius: var(--radius-xl); border: 2px solid var(--border); }
.sold-details .winner { font-size: 2rem; font-weight: 800; color: var(--text); text-transform: uppercase; }
.sold-details .final-price {
  font-size: 3.5rem; font-weight: 900; color: var(--accent); margin-top: 0.5rem;
  font-family: var(--font-mono);
}


/* ============================================
   BIDDER PAGE
   ============================================ */
.bidder-layout {
  min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg-deep);
}
.bidder-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.5rem; background: var(--bg-surface); border-bottom: 2px solid var(--border);
}
.bidder-header h2 { font-size: 1.2rem; display: flex; align-items: center; gap: 0.5rem; margin: 0; }

.budget-display {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.5rem 1rem; background: var(--bg-deep);
  border-radius: var(--radius-sm); border: 1px solid var(--border);
}
.budget-display .budget-label {
  font-size: 0.75rem; color: var(--text-muted);
  text-transform: uppercase; font-weight: 700; letter-spacing: 0.05em;
}
.budget-display .budget-amount {
  font-family: var(--font-display); font-weight: 800; font-size: 1.2rem; color: var(--accent);
}

.bidder-main {
  flex: 1; display: flex; flex-direction: column;
  max-width: 600px; margin: 0 auto; width: 100%;
  padding: 1.5rem; gap: 1rem;
}

/* Compact player card */
.compact-player-card {
  display: flex; align-items: center; gap: 1.25rem;
  padding: 1rem; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.compact-player-info { flex: 1; }
.compact-player-info h3 { font-size: 1.4rem; margin-bottom: 0.25rem; }
.compact-stats { display: flex; gap: 1rem; margin-top: 0.5rem; flex-wrap: wrap; }
.compact-stat { font-size: 0.8rem; background: var(--bg-deep); padding: 0.25rem 0.5rem; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.compact-stat .label { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 0.7rem; }
.compact-stat .value { font-weight: 800; color: var(--text); margin-left: 0.25rem; font-family: var(--font-mono); }

/* Bid display */
.bid-display {
  display: flex; flex-direction: column; align-items: center;
  padding: 2.5rem; background: var(--bg-surface);
  border: 2px solid var(--primary); border-radius: var(--radius-xl);
  text-align: center; box-shadow: var(--shadow-md);
}
.bid-display .current-bid-label {
  font-size: 0.9rem; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700;
}
.bid-display .current-bid-amount {
  font-family: var(--font-display); font-size: 4rem; font-weight: 900;
  color: var(--accent); margin: 0.25rem 0; line-height: 1;
}
.bid-display .current-bidder { font-size: 1.1rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.bid-display .current-bidder strong { color: var(--text); }

/* Bid controls */
.bid-controls {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.5rem; box-shadow: var(--shadow-sm);
}
.quick-bid-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem; margin-bottom: 1rem;
}
.quick-bid-btn {
  padding: 1rem 0; font-family: var(--font-display); font-size: 1.25rem; font-weight: 800;
  background: var(--bg-deep); color: var(--text);
  border: 2px solid var(--border); border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.quick-bid-btn:hover:not(:disabled) {
  background: var(--primary); border-color: var(--primary-dark); color: #fff;
}
.quick-bid-btn:active:not(:disabled) { transform: scale(0.96); }

/* My purchases */
.my-purchases {
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 1.25rem;
}
.purchase-list {
  display: flex; flex-direction: column; gap: 0.5rem;
  max-height: 200px; overflow-y: auto; margin-top: 0.75rem;
}
.purchase-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.75rem; background: var(--bg-deep);
  border-radius: var(--radius-sm); font-size: 0.85rem; border: 1px solid var(--border);
}
.purchase-item .purchase-name { font-weight: 700; text-transform: uppercase; }
.purchase-item .purchase-price { color: var(--success); font-weight: 800; font-family: var(--font-mono); }

/* ============================================
   CONFETTI
   ============================================ */
.confetti-piece {
  position: fixed; z-index: 200; pointer-events: none;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes pulseSlow { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes priceUp { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes pulseLive { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes ticker { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-4px); }
  40%, 80% { transform: translateX(4px); }
}

/* ============================================
   BIDDING WAR ANIMATIONS
   ============================================ */
body.bidding-war-active::after {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    box-shadow: inset 0 0 100px rgba(255, 60, 0, 0.4);
    pointer-events: none;
    z-index: 9999;
    animation: pulse-war 1s infinite alternate;
}

@keyframes pulse-war {
    from { box-shadow: inset 0 0 50px rgba(255, 60, 0, 0.2); }
    to { box-shadow: inset 0 0 150px rgba(255, 60, 0, 0.6); }
}

.bidding-war-stamp {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    font-size: 6rem;
    font-weight: 900;
    color: #ff3c00;
    text-transform: uppercase;
    border: 8px solid #ff3c00;
    padding: 1rem 2rem;
    border-radius: 12px;
    background: rgba(10, 10, 15, 0.9);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 0 50px rgba(255, 60, 0, 0.5);
    text-shadow: 0 0 20px rgba(255, 60, 0, 0.8);
}

.bidding-war-stamp.active {
    animation: stamp-war-pop 3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes stamp-war-pop {
    0% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
    10% { transform: translate(-50%, -50%) scale(1) rotate(-5deg); opacity: 1; }
    15% { transform: translate(-50%, -50%) scale(1.1) rotate(5deg); opacity: 1; }
    20% { transform: translate(-50%, -50%) scale(1) rotate(0deg); opacity: 1; }
    80% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

/* ─── Realtime Bid Popup ─── */
.bid-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  background: rgba(20, 24, 39, 0.95);
  border: 2px solid var(--accent);
  box-shadow: 0 0 50px rgba(124, 108, 240, 0.6);
  border-radius: 1.5rem;
  padding: 3rem 5rem;
  text-align: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.bid-popup.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.bid-popup-team {
  font-size: 3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.bid-popup-amount {
  font-size: 5rem;
  font-weight: 900;
  color: var(--warning);
  text-shadow: 0 0 30px rgba(245, 166, 35, 0.6);
  font-family: var(--font-display);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .admin-layout { grid-template-columns: 240px 1fr 280px; }
}
@media (max-width: 900px) {
  .admin-layout { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .role-grid { grid-template-columns: 1fr; max-width: 400px; }
  .preview-player-hero { flex-direction: column; align-items: center; padding: 2rem; }
  .preview-player-left { border-right: none; border-bottom: 2px solid var(--border); padding-right: 0; padding-bottom: 2rem; }
  .preview-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-bid-grid { grid-template-columns: repeat(2, 1fr); }
  .preview-auction-bar { flex-direction: column; gap: 1rem; padding: 1rem; height: auto; position: static; }
  .preview-bid-ticker { border-left: none; padding-left: 0; margin: 0; width: 100%; }
}
