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

:root {
  --bg:          #0d0d0d;
  --bg-card:     #141414;
  --bg-secondary:#1c1c1c;
  --bg-input:    #181818;
  --border:      #252525;
  --border-focus:#00e676;
  --green:       #00e676;
  --green-dim:   rgba(0,230,118,0.08);
  --green-glow:  rgba(0,230,118,0.18);
  --red:         #ff5252;
  --red-dim:     rgba(255,82,82,0.08);
  --white:       #f0f0f0;
  --text:        #e0e0e0;
  --gray:        #5a5a5a;
  --gray-light:  #888;
  --radius:      10px;
  --radius-sm:   6px;
  --transition:  140ms ease;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
input, textarea, select, button { font-family: inherit; font-size: inherit; color: inherit; }
textarea { resize: vertical; }

/* === UTILITY === */
.hidden         { display: none !important; }
.text-green     { color: var(--green); }
.text-red       { color: var(--red); }
.text-gray      { color: var(--gray-light); }
.text-sm        { font-size: 12px; }
.text-xs        { font-size: 11px; }
.text-center    { text-align: center; }
.mt             { margin-top: 16px; }
.mt-sm          { margin-top: 8px; }

/* === ANNOUNCEMENT BAR === */
.announcement-bar {
  background: linear-gradient(90deg, #001409 0%, #002010 50%, #001409 100%);
  border-bottom: 1px solid rgba(0,230,118,0.18);
  padding: 9px 52px 9px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  position: relative;
  overflow: hidden;
}
.announcement-bar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(0,230,118,0.03) 50%, transparent 100%);
  animation: shimmer-sweep 4s ease-in-out infinite;
}
@keyframes shimmer-sweep {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
.announcement-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  position: relative;
  z-index: 1;
}
.announcement-hint { font-size: 11px; color: var(--gray); }
.promo-pill {
  background: var(--green);
  color: #000;
  font-weight: 800;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 12px;
  letter-spacing: 1.2px;
  cursor: pointer;
  transition: box-shadow var(--transition), opacity var(--transition);
  animation: promo-pulse 2.5s ease-in-out infinite;
}
.promo-pill:hover { opacity: 0.85; }
@keyframes promo-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,230,118,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(0,230,118,0); }
}
.announcement-close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--gray-light);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px 8px;
  transition: color var(--transition);
}
.announcement-close:hover { color: var(--white); }

/* === OVERLAY === */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 24px;
  animation: fade-in 180ms ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.overlay-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  width: 100%;
  max-width: 420px;
  animation: slide-up 220ms cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes slide-up {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.overlay-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 16px;
  letter-spacing: -0.4px;
}
.overlay-logo span { color: var(--green); text-shadow: 0 0 20px var(--green-glow); }
.overlay-card h2 { font-size: 18px; margin-bottom: 8px; }
.overlay-card > p { color: var(--gray-light); font-size: 13px; line-height: 1.5; }

/* === NAV === */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13,13,13,0.90);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-brand {
  font-size: 17px;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.4px;
  flex-shrink: 0;
}
.nav-brand span {
  color: var(--green);
  text-shadow: 0 0 24px rgba(0,230,118,0.5);
}
.nav-links { display: flex; gap: 2px; flex: 1; }
.nav-link {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--gray-light);
  font-weight: 500;
  font-size: 13px;
  transition: color var(--transition), background var(--transition);
}
.nav-link:hover { color: var(--white); background: var(--bg-secondary); }
.nav-right { display: flex; align-items: center; gap: 12px; }
.balance-chip { display: flex; flex-direction: column; align-items: flex-end; }
.balance-label {
  font-size: 9px;
  color: var(--gray);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2px;
}
.balance-value { font-size: 15px; font-weight: 700; color: var(--green); line-height: 1; }

/* Nav Avatar */
.nav-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #000;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  flex-shrink: 0;
}
.nav-avatar { overflow: hidden; }
.nav-avatar:hover { opacity: 0.82; transform: scale(1.08); }

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition), background var(--transition), box-shadow var(--transition);
  white-space: nowrap;
  user-select: none;
}
.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); opacity: 1; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: var(--green);
  color: #000;
  border-color: var(--green);
}
.btn-primary:hover { box-shadow: 0 4px 16px rgba(0,230,118,0.25); }
.btn-ghost { background: var(--bg-secondary); color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: #3a3a3a; }
.btn-danger { background: var(--red-dim); color: var(--red); border-color: rgba(255,82,82,0.2); }
.btn-sm { padding: 5px 11px; font-size: 12px; }
.btn-full { width: 100%; }
.btn-row { display: flex; gap: 8px; }

/* === LAYOUT === */
.main { min-height: calc(100vh - 56px); }
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 36px 28px;
}
.container-sm {
  max-width: 860px;
  margin: 0 auto;
  padding: 36px 28px;
}
.section { margin-top: 28px; }
.section > h3 { margin-bottom: 14px; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: -0.4px; }
h3 { font-size: 14px; font-weight: 600; }
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* === AUTH === */
.auth-container {
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.6px;
}
.auth-header h1 .text-green {
  text-shadow: 0 0 28px rgba(0,230,118,0.45);
}
.auth-header p { color: var(--gray-light); margin-top: 6px; font-size: 13px; }

.tabs {
  display: flex;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 3px;
  margin-bottom: 24px;
}
.tab {
  flex: 1;
  padding: 7px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--gray-light);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--transition);
}
.tab.active { background: var(--bg-card); color: var(--white); }

.auth-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  color: var(--gray);
  font-size: 12px;
}
.auth-separator::before,
.auth-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.google-btn-container { display: flex; justify-content: center; }

/* Fields */
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-light);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,230,118,0.08);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--gray); }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%235a5a5a' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 30px;
}
.error-msg {
  background: var(--red-dim);
  border: 1px solid rgba(255,82,82,0.18);
  color: var(--red);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 12px;
  margin-bottom: 12px;
}

/* === MARKETS GRID === */
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-btn {
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: transparent;
  color: var(--gray-light);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
}
.filter-btn:hover,
.filter-btn.active {
  border-color: var(--green);
  color: var(--white);
  background: var(--green-dim);
}
.markets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.market-card:hover {
  border-color: #333;
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.market-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.market-card-title { font-weight: 500; font-size: 14px; line-height: 1.45; }
.badge {
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge-active {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0,230,118,0.2);
  box-shadow: 0 0 8px rgba(0,230,118,0.08);
}
.badge-closed   { background: rgba(255,165,0,0.08); color: #ffa500; border: 1px solid rgba(255,165,0,0.15); }
.badge-resolved { background: var(--bg-secondary); color: var(--gray-light); border: 1px solid var(--border); }

/* Prob bar */
.prob-bar-container { margin-bottom: 14px; }
.prob-bar {
  height: 5px;
  background: rgba(255,82,82,0.2);
  border-radius: 100px;
  overflow: hidden;
  margin-bottom: 7px;
}
.prob-bar-yes {
  height: 100%;
  background: var(--green);
  border-radius: 100px;
  transition: width 500ms cubic-bezier(0.4,0,0.2,1);
}
.prob-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
}
.market-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--gray);
}

/* === MARKET DETAIL === */
.back-btn {
  background: none;
  border: none;
  color: var(--gray-light);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  margin-bottom: 24px;
  display: inline-block;
  transition: color var(--transition);
}
.back-btn:hover { color: var(--white); }

.market-detail-grid {
  display: grid;
  grid-template-columns: 1fr 296px;
  gap: 24px;
  align-items: start;
}
.market-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}
.market-title-block h2 { font-size: 19px; line-height: 1.35; }
.market-desc { margin-top: 6px; font-size: 13px; line-height: 1.5; }
.market-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
  text-align: right;
}

.stats-row {
  display: flex;
  gap: 28px;
  margin-bottom: 20px;
}
.stat-label {
  font-size: 10px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 5px;
  font-weight: 600;
}
.stat-value { font-size: 22px; font-weight: 700; line-height: 1; }

.chart-wrap { margin-bottom: 24px; }
.chart-label {
  font-size: 11px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  margin-bottom: 10px;
}
.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 16px 10px;
  height: 220px;
  position: relative;
}

.recent-bets-list { display: flex; flex-direction: column; }
.bet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.bet-row:last-child { border-bottom: none; }
.bet-user { color: var(--gray-light); min-width: 80px; }
.bet-side-yes { color: var(--green); font-weight: 700; font-size: 11px; letter-spacing: 0.3px; }
.bet-side-no  { color: var(--red);   font-weight: 700; font-size: 11px; letter-spacing: 0.3px; }
.bet-amount { font-weight: 600; }
.bet-time { color: var(--gray); font-size: 11px; text-align: right; }

/* Bet Panel */
.bet-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 72px;
}
.bet-panel h3 { margin-bottom: 16px; }

.side-selector { display: flex; gap: 8px; margin-bottom: 14px; }
.side-btn {
  flex: 1;
  padding: 12px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--gray-light);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.side-btn .side-label { font-size: 10px; font-weight: 700; letter-spacing: 0.8px; }
.side-btn .side-pct   { font-size: 22px; font-weight: 700; line-height: 1; }
.side-btn.yes-btn.active { border-color: var(--green); background: var(--green-dim); color: var(--green); }
.side-btn.no-btn.active  { border-color: var(--red);   background: var(--red-dim);   color: var(--red); }
.side-btn:not(.active):hover { border-color: #3a3a3a; }

.quick-amounts {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
  margin-top: -4px;
}
.quick-btn {
  flex: 1;
  padding: 5px 4px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--gray-light);
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.quick-btn:hover { border-color: var(--green); color: var(--green); }

.payout-preview {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  margin-bottom: 14px;
}
.payout-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--gray-light);
  padding: 5px 0;
}
.payout-row:not(.last) { border-bottom: 1px solid var(--border); }
.payout-row span:last-child { font-weight: 600; color: var(--text); }
.fee-note {
  text-align: center;
  color: var(--gray);
  font-size: 11px;
  margin-top: 10px;
}

/* Resolved Panel */
.resolved-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  position: sticky;
  top: 72px;
}
.resolved-outcome {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

/* === LEADERBOARD === */
.lb-table { display: flex; flex-direction: column; gap: 8px; }
.lb-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--transition), transform var(--transition);
}
.lb-row:hover { border-color: #2a2a2a; transform: translateX(2px); }
.lb-row.rank-1 { border-color: rgba(255,215,0,0.3); background: linear-gradient(90deg, rgba(255,215,0,0.04) 0%, var(--bg-card) 100%); }
.lb-row.rank-2 { border-color: rgba(192,192,192,0.25); background: linear-gradient(90deg, rgba(192,192,192,0.03) 0%, var(--bg-card) 100%); }
.lb-row.rank-3 { border-color: rgba(205,127,50,0.25); background: linear-gradient(90deg, rgba(205,127,50,0.03) 0%, var(--bg-card) 100%); }
.lb-row-me { border-color: rgba(0,230,118,0.25) !important; }

.lb-rank { font-size: 22px; width: 34px; text-align: center; flex-shrink: 0; line-height: 1; }
.lb-rank-num { font-size: 15px; font-weight: 700; color: var(--gray-light); }
.lb-info { flex: 1; min-width: 0; }
.lb-username { font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.lb-sub { font-size: 12px; color: var(--gray-light); margin-top: 2px; }
.lb-you {
  font-size: 10px;
  background: var(--green-dim);
  color: var(--green);
  padding: 1px 7px;
  border-radius: 100px;
  font-weight: 700;
  border: 1px solid rgba(0,230,118,0.2);
}
.lb-stats { text-align: right; flex-shrink: 0; min-width: 80px; }
.lb-stat-val { font-size: 16px; font-weight: 700; line-height: 1; }
.lb-stat-label { font-size: 10px; color: var(--gray); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.5px; }
.lb-balance { min-width: 80px; }

/* === PROFILE === */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}
.profile-header-info { flex: 1; min-width: 0; }
.profile-username { font-size: 20px; font-weight: 700; letter-spacing: -0.3px; }
.profile-bio { font-size: 13px; margin-top: 4px; line-height: 1.4; }

/* Avatar circles */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  color: #000;
  flex-shrink: 0;
  line-height: 1;
}
.avatar-lg {
  width: 72px;
  height: 72px;
  font-size: 28px;
  box-shadow: 0 0 24px rgba(0,0,0,0.4);
  flex-shrink: 0;
}

/* Color swatches */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  outline: 2px solid transparent;
  outline-offset: 2px;
}
.color-swatch:hover { transform: scale(1.18); }
.color-swatch.selected {
  outline-color: var(--white);
  transform: scale(1.1);
}

/* Profile grid */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card-label {
  font-size: 10px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  font-weight: 600;
  margin-bottom: 8px;
}
.card-value { font-size: 24px; font-weight: 700; line-height: 1; }

/* Daily reward card */
.daily-reward-card {
  background: var(--bg-card);
  border: 1px solid rgba(0,230,118,0.18);
  border-radius: var(--radius);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  position: relative;
  overflow: hidden;
}
.daily-reward-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--green);
  border-radius: 3px 0 0 3px;
}
.daily-icon { font-size: 26px; flex-shrink: 0; }
.daily-info { flex: 1; }
.daily-title { font-weight: 600; font-size: 14px; }
.daily-desc { font-size: 12px; margin-top: 3px; }

/* Preset amounts */
.preset-amounts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.preset-amount {
  flex: 1;
  min-width: 64px;
  padding: 9px 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.preset-amount:hover { border-color: var(--green); color: var(--green); }
.preset-amount.active { border-color: var(--green); background: var(--green-dim); color: var(--green); }

/* Top-up info bar */
.topup-info-bar {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--gray-light);
  line-height: 1.4;
}

/* === ADMIN === */
.admin-grid {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  align-items: start;
}
.admin-list { display: flex; flex-direction: column; gap: 8px; }
.admin-market-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.admin-market-info { flex: 1; min-width: 0; }
.admin-market-title {
  font-weight: 500;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-market-sub { font-size: 11px; color: var(--gray); margin-top: 3px; }
.admin-market-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* === TABLE === */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left;
  padding: 8px 14px;
  font-size: 10px;
  font-weight: 700;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.015); }

/* === TOAST === */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  transform: translateY(64px);
  opacity: 0;
  transition: all 280ms cubic-bezier(0.34,1.56,0.64,1);
  z-index: 1000;
  max-width: 340px;
  pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast-success { background: var(--green); color: #000; }
.toast-error   { background: var(--red); color: #fff; }
.toast-info    { background: var(--bg-secondary); color: var(--text); border: 1px solid var(--border); }

/* === STATES === */
.loading { color: var(--gray); padding: 40px; text-align: center; font-size: 13px; }
.empty   { color: var(--gray); padding: 32px; text-align: center; font-size: 13px; }

/* === RESPONSIVE === */
@media (max-width: 960px) {
  .market-detail-grid { grid-template-columns: 1fr; }
  .admin-grid          { grid-template-columns: 1fr; }
  .bet-panel           { position: static; }
  .resolved-panel      { position: static; }
  .lb-balance          { display: none; }
}
@media (max-width: 640px) {
  .container, .container-sm { padding: 20px 18px; }
  .markets-grid  { grid-template-columns: 1fr; }
  .stats-row     { flex-wrap: wrap; gap: 18px; }
  .nav-inner     { padding: 0 18px; gap: 10px; }
  .nav-links     { display: none; }
  .balance-value { font-size: 13px; }
  .profile-grid  { grid-template-columns: repeat(2, 1fr); }
  .lb-stats      { min-width: 60px; }
  .lb-stat-val   { font-size: 14px; }
  .profile-header { flex-direction: column; text-align: center; }
  .profile-header .btn { align-self: center; }
  .lb-row { padding: 12px 14px; gap: 10px; }
}

/* === LIVE CHAT FULL PAGE === */
.livechat-container {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 28px;
  height: calc(100vh - 56px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.livechat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.livechat-header-left { display: flex; align-items: center; gap: 12px; }
.livechat-header-left h2 { font-size: 20px; font-weight: 700; }
.livechat-online-badge {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(0,230,118,0.2);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
}
.livechat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 0;
}
.livechat-messages::-webkit-scrollbar { width: 4px; }
.livechat-messages::-webkit-scrollbar-track { background: transparent; }
.livechat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.livechat-msg { display: flex; gap: 12px; align-items: flex-start; }
.livechat-msg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
  overflow: hidden;
}
.livechat-msg-body { flex: 1; min-width: 0; }
.livechat-msg-meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 3px; }
.livechat-msg-name { font-weight: 600; font-size: 13px; color: var(--green); }
.livechat-msg-time { font-size: 11px; color: var(--gray-light); }
.livechat-msg-text { font-size: 14px; color: var(--text); line-height: 1.5; word-break: break-word; }
.livechat-footer {
  display: flex;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.livechat-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 16px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.livechat-input:focus { border-color: var(--border-focus); }
@media (max-width: 600px) {
  .livechat-container { padding: 0 16px; }
}

/* === MARKET CHAT === */
.market-chat-section {
  grid-column: 2;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
}
.market-chat-messages {
  height: 260px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-bottom: 0;
}
@media (max-width: 960px) {
  .market-chat-section { grid-column: 1; }
}

/* === ONLINE COUNT === */
.online-count {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

/* === CHAT === */
.chat-open-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green);
  color: #000;
  font-size: 20px;
  border: none;
  cursor: pointer;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,230,118,0.35);
  transition: transform var(--transition), box-shadow var(--transition);
}
.chat-open-btn:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(0,230,118,0.5); }

.chat-panel {
  position: fixed;
  bottom: 88px;
  right: 24px;
  width: 320px;
  height: 480px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  z-index: 999;
  box-shadow: 0 12px 40px rgba(0,0,0,0.6);
  overflow: hidden;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.chat-online { margin-left: auto; font-size: 11px; color: var(--green); font-weight: 500; }
.chat-close-btn {
  background: none;
  border: none;
  color: var(--gray-light);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 0 0 0 4px;
  transition: color var(--transition);
}
.chat-close-btn:hover { color: var(--white); }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-messages::-webkit-scrollbar { width: 3px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.chat-msg { display: flex; gap: 8px; align-items: flex-start; }
.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #000;
  flex-shrink: 0;
}
.chat-msg-content { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-msg-user { font-size: 11px; font-weight: 600; color: var(--green); }
.chat-msg-text { font-size: 13px; color: var(--text); word-break: break-word; line-height: 1.4; }

.chat-input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}
.chat-input-wrap input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color var(--transition);
}
.chat-input-wrap input:focus { border-color: var(--border-focus); }

@media (max-width: 480px) {
  .chat-panel {
    right: 0; bottom: 0;
    width: 100%; height: 65vh;
    border-radius: var(--radius) var(--radius) 0 0;
  }
  .chat-open-btn { bottom: 16px; right: 16px; }
}

/* === MINI PROFILE === */
.mp-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.mp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 340px;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  animation: mpIn 140ms ease;
}
@keyframes mpIn {
  from { opacity: 0; transform: scale(0.94) translateY(8px); }
  to   { opacity: 1; transform: scale(1)    translateY(0);   }
}
.mp-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: var(--gray-light);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background var(--transition), color var(--transition);
}
.mp-close:hover { background: var(--bg-secondary); color: var(--text); }
.mp-avatar {
  width: 68px; height: 68px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
  color: #000;
  margin: 0 auto 14px;
  overflow: hidden;
}
.mp-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mp-name {
  text-align: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
}
.mp-handle {
  text-align: center;
  color: var(--gray-light);
  font-size: 13px;
  margin-bottom: 6px;
}
.mp-joined {
  text-align: center;
  color: var(--gray);
  font-size: 12px;
  margin-bottom: 22px;
}
.mp-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mp-stat {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}
.mp-stat-label {
  font-size: 11px;
  color: var(--gray-light);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.mp-stat-val {
  font-size: 15px;
  font-weight: 700;
}
.mp-trigger { cursor: pointer; }
.mp-trigger:hover { text-decoration: underline; }

/* === ROLE BADGES === */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.role-majitel {
  color: #ff6b6b;
  background: rgba(139,0,0,0.15);
  border: 1px solid rgba(180,0,0,0.35);
  text-shadow: 0 0 10px rgba(220,0,0,0.7);
  box-shadow: 0 0 12px rgba(180,0,0,0.2);
}
.role-admin {
  color: #7aabff;
  background: rgba(0,48,135,0.15);
  border: 1px solid rgba(0,80,200,0.35);
  text-shadow: 0 0 10px rgba(0,100,255,0.6);
  box-shadow: 0 0 12px rgba(0,80,200,0.2);
}
.mp-role-wrap { text-align: center; margin-bottom: 10px; }

.role-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 12px;
  padding: 3px 6px;
  cursor: pointer;
}
.role-select:focus { outline: none; border-color: var(--border-focus); }

/* === ACTIVITY LOGS === */
.log-list { display: flex; flex-direction: column; gap: 1px; }
.log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--bg-secondary);
  font-size: 13px;
  transition: background var(--transition);
}
.log-row:hover { background: var(--bg-card); }
.log-icon { font-size: 16px; flex-shrink: 0; width: 24px; text-align: center; }
.log-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.log-user { font-weight: 600; font-size: 12px; color: var(--green); }
.log-desc { color: var(--text); opacity: 0.75; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.log-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; flex-shrink: 0; }
.log-amt { font-weight: 700; font-size: 13px; }
.log-time { font-size: 11px; color: var(--gray-light); }

/* === WIN NOTIFICATIONS === */
.win-notifications {
  position: fixed;
  top: 72px;
  left: 20px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.win-notif {
  border-radius: 14px;
  padding: 14px 18px;
  max-width: 270px;
  pointer-events: auto;
  animation: winIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.win-notif--out {
  opacity: 0;
  transform: translateX(-20px);
}
.win-notif--won {
  background: linear-gradient(135deg, #001a0a 0%, #002d14 100%);
  border: 1px solid var(--green);
  box-shadow: 0 8px 32px rgba(0,230,118,0.3), 0 0 0 1px rgba(0,230,118,0.1);
}
.win-notif--lost {
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.win-notif-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 3px;
}
.win-notif--won  .win-notif-title { color: var(--green); }
.win-notif--lost .win-notif-title { color: var(--gray-light); }
.win-notif-body {
  font-size: 12px;
  color: var(--text);
  opacity: 0.8;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 230px;
}
.win-notif-amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--green);
  margin-top: 4px;
}
@keyframes winIn {
  from { opacity: 0; transform: translateX(-28px) scale(0.92); }
  to   { opacity: 1; transform: translateX(0)     scale(1);    }
}
