/* ═══════════════════════════════════════════════
   TheGamblingKing Bet Slip — Spotify-Inspired Theme
   ═══════════════════════════════════════════════ */

:root {
  --bg-primary: #121212;
  --bg-secondary: #181818;
  --bg-card: #242424;
  --bg-elevated: #2a2a2a;
  --bg-input: #333333;
  --bg-hover: #3e3e3e;

  --accent: #1db954;
  --accent-hover: #1ed760;
  --accent-dim: rgba(29, 185, 84, 0.15);

  --text-primary: #ffffff;
  --text-secondary: #b3b3b3;
  --text-muted: #727272;
  --text-danger: #f15e6c;

  --discord-blue: #5865f2;
  --discord-hover: #4752c4;

  --whale-gold: #ffd700;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --transition: all 0.2s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

.hidden { display: none !important; }

/* ── Screens ── */
.screen {
  min-height: 100vh;
}

/* ── Login Screen ── */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #121212 0%, #1a1a2e 50%, #121212 100%);
}

.login-card {
  text-align: center;
  padding: 48px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  max-width: 400px;
  width: 90%;
}

.login-logo-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 16px;
  border-radius: 50%;
  filter: drop-shadow(0 0 20px rgba(255, 215, 0, 0.4));
}

.header-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
}

.login-card h1 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 4px;
  background: linear-gradient(135deg, #fff, #b3b3b3);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 32px;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 500px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-discord {
  background: var(--discord-blue);
  color: white;
  width: 100%;
}
.btn-discord:hover {
  background: var(--discord-hover);
  transform: scale(1.02);
}

.btn-submit {
  background: var(--accent);
  color: #000;
  width: 100%;
  padding: 16px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin-top: 8px;
}
.btn-submit:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: scale(1.01);
}
.btn-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-new {
  background: var(--accent);
  color: #000;
  padding: 12px 28px;
  font-weight: 700;
}
.btn-new:hover {
  background: var(--accent-hover);
}

.btn-logout {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 500px;
  border: 1px solid var(--bg-hover);
  transition: var(--transition);
}
.btn-logout:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* ── Header ── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-logo {
  font-size: 24px;
}

.header-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

/* ── Header Nav ── */
.header-nav {
  display: flex;
  gap: 4px;
  margin-left: 20px;
  background: var(--bg-primary);
  border-radius: 500px;
  padding: 3px;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 500px;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-primary);
}

.nav-link.active {
  background: var(--accent);
  color: #000;
}

/* ── Main Content ── */
.main-content {
  display: flex;
  justify-content: center;
  padding: 32px 16px 80px;
}

.slip-container {
  width: 100%;
  max-width: 640px;
}

.slip-header {
  margin-bottom: 24px;
}

.slip-header h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.slip-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* ── Form ── */
.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  flex: 1 1 100%;
}

label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.optional {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
}

input, select, textarea {
  background: var(--bg-input);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  padding: 12px 14px;
  outline: none;
  transition: var(--transition);
  width: 100%;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

input::placeholder, textarea::placeholder {
  color: var(--text-muted);
}

select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23727272' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

textarea {
  resize: vertical;
  min-height: 60px;
}

/* ── Toggle Button Group ── */
.toggle-group {
  display: flex;
  gap: 8px;
}

.toggle-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 2px solid var(--bg-hover);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.toggle-btn.active {
  border-color: var(--accent);
  background: var(--accent-dim);
  color: var(--accent);
}

.toggle-btn:hover:not(.active) {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* ── Whale Toggle ── */
.whale-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-input);
  border: 2px solid transparent;
  transition: var(--transition);
}

.whale-toggle-label:has(input:checked) {
  border-color: var(--whale-gold);
  background: rgba(255, 215, 0, 0.08);
}

.whale-toggle-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--whale-gold);
  cursor: pointer;
}

.whale-toggle-text {
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  color: var(--text-primary);
}

/* ── Section Divider ── */
.section-divider {
  display: flex;
  align-items: center;
  margin: 24px 0 16px;
  gap: 12px;
}

.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bg-hover);
}

.section-divider span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}

/* ── Parlay Legs ── */
.parlay-leg-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.parlay-leg-card .leg-header {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.parlay-leg-card .leg-number {
  background: var(--accent);
  color: #000;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

/* ── Success Card ── */
.success-card {
  text-align: center;
  padding: 48px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(29, 185, 84, 0.3);
}

.success-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.success-card h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
}

.success-card p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

/* ── Error Toast ── */

/* ── DateTime Picker ── */
.datetime-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.datetime-input-wrap input[type="text"] {
  flex: 1;
}

.datetime-picker-hidden {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
}

.btn-calendar {
  background: var(--bg-input);
  border: 1px solid var(--bg-hover);
  color: var(--text-secondary);
  font-size: 18px;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.btn-calendar:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}

.btn-calendar:active {
  transform: scale(0.95);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-danger);
  color: white;
  padding: 12px 24px;
  border-radius: 500px;
  font-size: 14px;
  font-weight: 600;
  z-index: 999;
  box-shadow: 0 4px 20px rgba(241, 94, 108, 0.4);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ═══════════════════════════════════════════════
   Stats Dashboard
   ═══════════════════════════════════════════════ */

.stats-container {
  width: 100%;
  max-width: 900px;
}

.stats-header {
  margin-bottom: 24px;
}

.stats-header h2 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.stats-controls {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.stats-loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--bg-hover);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.stats-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* ── KPI Cards ── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.kpi-card.accent {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.kpi-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.kpi-value.positive { color: var(--accent); }
.kpi-value.negative { color: var(--text-danger); }

/* ── Highlights ── */
.highlights-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.highlight-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.highlight-card.best {
  border-left: 3px solid var(--accent);
}

.highlight-card.worst {
  border-left: 3px solid var(--text-danger);
}

.highlight-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.highlight-value {
  font-size: 20px;
  font-weight: 700;
}

.highlight-sub {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Stats Sections ── */
.stats-section {
  margin-bottom: 28px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-primary);
}

/* ── Breakdown Bars ── */
.breakdown-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.breakdown-name {
  font-size: 14px;
  font-weight: 600;
  min-width: 140px;
  flex-shrink: 0;
}

.breakdown-bar-wrap {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 500px;
  overflow: hidden;
  position: relative;
}

.breakdown-bar {
  height: 100%;
  border-radius: 500px;
  transition: width 0.6s ease;
}

.breakdown-bar.green { background: var(--accent); }
.breakdown-bar.red { background: var(--text-danger); }

.breakdown-stats {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 200px;
  text-align: right;
  white-space: nowrap;
}

.breakdown-net {
  font-weight: 700;
  font-size: 13px;
}

.breakdown-net.positive { color: var(--accent); }
.breakdown-net.negative { color: var(--text-danger); }

/* ── P&L Table ── */
.pnl-table-wrap {
  max-height: 320px;
  overflow-y: auto;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pnl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pnl-table thead {
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
}

.pnl-table th {
  padding: 10px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.pnl-table td {
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.pnl-table tbody tr {
  background: var(--bg-card);
}

.pnl-table tbody tr:hover {
  background: var(--bg-elevated);
}

.pnl-positive { color: var(--accent); font-weight: 600; }
.pnl-negative { color: var(--text-danger); font-weight: 600; }

/* ── Recent Bets ── */
.recent-bets-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-bet-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.recent-bet-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.recent-bet-status {
  font-size: 16px;
  flex-shrink: 0;
}

.recent-bet-pick {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-bet-sport {
  font-size: 11px;
  color: var(--text-muted);
}

.recent-bet-details {
  text-align: right;
  flex-shrink: 0;
}

.recent-bet-odds {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.recent-bet-units {
  font-size: 11px;
  color: var(--text-muted);
}

.recent-bet-whale {
  font-size: 14px;
  flex-shrink: 0;
}

/* ── Leaderboard ── */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lb-row {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  gap: 14px;
  border: 1px solid rgba(255, 255, 255, 0.03);
}

.lb-row:first-child { border-color: rgba(255, 215, 0, 0.3); }
.lb-row:nth-child(2) { border-color: rgba(192, 192, 192, 0.2); }
.lb-row:nth-child(3) { border-color: rgba(205, 127, 50, 0.2); }

.lb-rank {
  font-size: 16px;
  font-weight: 800;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.lb-name {
  font-size: 14px;
  font-weight: 600;
  flex: 1;
}

.lb-record {
  font-size: 12px;
  color: var(--text-secondary);
}

.lb-net {
  font-size: 15px;
  font-weight: 800;
  min-width: 70px;
  text-align: right;
}

.lb-net.positive { color: var(--accent); }
.lb-net.negative { color: var(--text-danger); }

/* ── Responsive ── */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 12px;
  }

  .slip-header h2 {
    font-size: 22px;
  }

  .login-card {
    padding: 32px 24px;
  }

  .app-header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .header-title {
    font-size: 16px;
  }

  .header-nav {
    margin-left: 8px;
  }

  .nav-link {
    font-size: 11px;
    padding: 5px 10px;
  }

  .user-name {
    display: none;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .highlights-row {
    grid-template-columns: 1fr;
  }

  .breakdown-row {
    flex-wrap: wrap;
  }

  .breakdown-stats {
    min-width: auto;
    text-align: left;
  }

  .stats-controls .form-row {
    flex-direction: column;
  }
}

/* ════════════════════════════════════════════════════════════
   MY BETS PAGE
   ════════════════════════════════════════════════════════════ */

.bets-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

.bets-header {
  margin-bottom: 24px;
}

.bets-header h2 {
  font-size: 28px;
  font-weight: 800;
}

.bets-controls {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.bets-filters {
  display: flex;
  gap: 10px;
  flex: 1;
  flex-wrap: wrap;
}

.filter-select {
  min-width: 140px;
  flex: 1;
}

.filter-search {
  min-width: 180px;
  flex: 2;
}

.bets-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 16px;
  font-size: 14px;
}

/* Bet Card */
.bet-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: border-color 0.2s;
}

.bet-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

.bet-card.status-win   { border-left: 3px solid var(--accent); }
.bet-card.status-loss  { border-left: 3px solid var(--text-danger); }
.bet-card.status-push  { border-left: 3px solid #808080; }
.bet-card.status-open  { border-left: 3px solid #FFD700; }

.bet-status-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.bet-info {
  flex: 1;
  min-width: 0;
}

.bet-pick-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.bet-pick-text {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bet-whale-badge {
  font-size: 14px;
}

.bet-retro-badge {
  font-size: 10px;
  background: rgba(255, 153, 0, 0.15);
  color: #FF9900;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.bet-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}

.bet-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.bet-odds-col {
  text-align: right;
  flex-shrink: 0;
  min-width: 80px;
}

.bet-odds-val {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-secondary);
}

.bet-units-val {
  font-size: 12px;
  color: var(--text-muted);
}

.bet-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-action {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-action.btn-win   { color: var(--accent); }
.btn-action.btn-loss  { color: var(--text-danger); }
.btn-action.btn-push  { color: #808080; }
.btn-action.btn-edit  { color: #5865F2; }
.btn-action.btn-del   { color: var(--text-danger); }

/* Close bet dropdown */
.close-dropdown {
  display: flex;
  gap: 4px;
}

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(4px);
}

.modal-card {
  background: var(--bg-elevated);
  border-radius: var(--radius);
  padding: 28px;
  width: 90%;
  max-width: 420px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.modal-card.modal-sm {
  max-width: 340px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.confirm-msg {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.btn-danger {
  background: var(--text-danger) !important;
  color: #fff !important;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--text-secondary) !important;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.14) !important;
}

/* Parlay legs in bet card */
.bet-legs {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bet-leg {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0;
  flex-wrap: wrap;
}

.bet-leg-status {
  font-size: 12px;
}

.bet-leg-num {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 11px;
  min-width: 36px;
}

.bet-leg-pick {
  font-weight: 500;
  color: var(--text-secondary);
  flex: 1;
}

.bet-leg-sport {
  font-size: 10px;
  color: var(--text-muted);
}

.leg-actions {
  display: flex;
  gap: 2px;
  margin-left: auto;
}

.leg-btn {
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 5px;
  transition: var(--transition);
}

.leg-btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
}

.leg-win:hover { border-color: var(--accent); }
.leg-loss:hover { border-color: var(--text-danger); }
.leg-push:hover { border-color: var(--text-secondary); }
.leg-void:hover { border-color: var(--text-muted); }

/* ════════════════════════════════════════════════════════════
   REMINDERS PAGE
   ════════════════════════════════════════════════════════════ */

.reminders-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 32px 24px;
}

.reminders-header {
  margin-bottom: 24px;
}

.reminders-header h2 {
  font-size: 28px;
  font-weight: 800;
}

.reminders-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 24px;
  align-items: start;
}

.reminder-create-card,
.reminder-list-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 24px;
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.form-textarea {
  resize: vertical;
  min-height: 60px;
  font-family: inherit;
}

.btn-block {
  width: 100%;
  margin-top: 8px;
}

.success-inline {
  text-align: center;
  margin-top: 12px;
  padding: 10px;
  background: rgba(29, 185, 84, 0.1);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

.reminder-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.reminder-list-header .card-title {
  margin-bottom: 0;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.reminders-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.reminder-card {
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.reminder-icon {
  font-size: 22px;
  flex-shrink: 0;
  margin-top: 2px;
}

.reminder-info {
  flex: 1;
  min-width: 0;
}

.reminder-type-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.reminder-msg {
  font-size: 14px;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 6px;
  word-break: break-word;
}

.reminder-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-muted);
}

.reminder-meta span {
  display: flex;
  align-items: center;
  gap: 3px;
}

.repeat-badge {
  background: rgba(88, 101, 242, 0.15);
  color: #5865F2;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
}

.btn-cancel-reminder {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 11px;
  color: var(--text-danger);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  align-self: center;
}

.btn-cancel-reminder:hover {
  background: rgba(255, 77, 77, 0.15);
}

.btn-edit-reminder {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
  align-self: center;
}

.btn-edit-reminder:hover {
  background: rgba(255, 255, 255, 0.12);
}

.reminder-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

/* Textarea with emoji button */
.textarea-with-emoji {
  position: relative;
}

.btn-emoji-picker {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.15s;
  z-index: 2;
}

.btn-emoji-picker:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Emoji picker popup */
.emoji-picker-popup {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 1000;
  background: var(--bg-elevated);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
  width: 280px;
  max-height: 260px;
  overflow: hidden;
  margin-top: 4px;
}

.emoji-picker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.emoji-picker-header button {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

.emoji-picker-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px;
  max-height: 200px;
  overflow-y: auto;
}

.emoji-pick-btn {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 4px;
  cursor: pointer;
  transition: all 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.emoji-pick-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ════════════════════════════════════════════════════════════
   TOOLS PAGE
   ════════════════════════════════════════════════════════════ */

.tools-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 24px;
}

.tools-header {
  margin-bottom: 24px;
}

.tools-header h2 {
  font-size: 28px;
  font-weight: 800;
}

.tools-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.tool-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 24px;
}

.odds-result {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.odds-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.odds-label {
  font-size: 13px;
  color: var(--text-muted);
}

.odds-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent);
}

.reference-grid {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ref-section h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ref-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ref-list li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.ref-list li strong {
  color: var(--text-secondary);
}

/* ── Responsive additions ── */
@media (max-width: 768px) {
  .reminders-layout {
    grid-template-columns: 1fr;
  }

  .tools-layout {
    grid-template-columns: 1fr;
  }

  .bet-card {
    flex-wrap: wrap;
  }

  .bet-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .bets-filters {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .bet-card {
    padding: 12px 14px;
    gap: 10px;
  }

  .bet-odds-col {
    min-width: auto;
  }

  .bet-actions .btn-action {
    padding: 5px 8px;
    font-size: 11px;
  }
}
