:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2d3a;
  --text: #e8eaf0;
  --dim: #8b8fa8;
  --accent: #6c63ff;
  --green: #22c55e;
  --danger: #f85149;
  --card-radius: 14px;
}

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

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

/* ── Header ── */
header {
  text-align: center;
  padding: 16px 12px 12px;
  background: var(--bg);
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 10px;
}

.logo {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
}

h1 {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--text);
  line-height: 1.2;
}

.header-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.date-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.date-label {
  font-size: 0.88rem;
  color: var(--dim);
}

.request-access-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  background: linear-gradient(135deg, #7c5cbf, #5b8cde);
  border: none;
  border-radius: 50px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.2s;
  box-shadow: 0 4px 14px rgba(92, 140, 222, 0.3);
}
.request-access-btn:hover { opacity: 0.88; }
.request-access-btn svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Desktop */
@media (min-width: 640px) {
  header { padding: 24px 16px 16px; }
  h1 { font-size: 1.75rem; }
  .picks-grid { grid-template-columns: 1fr 1fr !important; }
}

/* ── Refresh button ── */
.refresh-btn {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
}
.refresh-btn:hover { border-color: var(--accent); color: var(--text); }
.refresh-btn:disabled { opacity: 0.5; }

/* ── Main ── */
main {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 16px 40px;
}

/* ── Loading ── */
.loading-state {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 40px 0;
  justify-content: center;
  color: var(--dim);
  font-size: 0.9rem;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ── Sections ── */
.section-header {
  margin: 24px 0 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 2px;
}

.section-sub {
  font-size: 0.75rem;
  color: var(--dim);
}

.section-date {
  font-size: 0.72rem;
  color: var(--dim);
  opacity: 0.7;
  margin-top: 2px;
  font-style: italic;
}

/* ── Grid ── */
.picks-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* ── Cards ── */
.pick-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.pick-card:active {
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.card-top-bar {
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.card-body {
  padding: 12px 14px;
}

.card-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.team-block {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.team-name {
  min-width: 0;
  padding-right: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text);
}

.opponent-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--dim);
}

.eats-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 6px;
  padding: 3px 8px;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.odds-row {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: nowrap;
}

.odds-item {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.odds-label {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--dim);
}

.odds-value {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--danger);
}

.odds-value.neutral {
  color: var(--text);
}

.empty-state {
  color: var(--dim);
  font-size: 0.85rem;
  padding: 16px 0;
  text-align: center;
}

.error {
  color: var(--danger);
  font-size: 0.85rem;
  text-align: center;
  padding: 40px 0;
}

.pick-count {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--dim);
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.2);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 8px;
}

/* ── Paywall ── */
/* ── Skeleton placeholders ── */
@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}

.skeleton-line,
.skeleton-label,
.skeleton-badge {
  background: linear-gradient(90deg, #1e2130 25%, #282c3e 50%, #1e2130 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 4px;
  color: transparent !important;
}

.skeleton-card {
  opacity: 0.65;
}

.skeleton-body {
  min-height: 72px;
}

.skeleton-bar-dark {
  background: linear-gradient(90deg, #1e2130 25%, #282c3e 50%, #1e2130 75%) !important;
  background-size: 800px 100% !important;
  animation: shimmer 1.4s ease-in-out infinite !important;
  border-radius: 0 !important;
  color: transparent !important;
}

.skeleton-line-lg {
  width: 55%;
  height: 18px;
  display: block;
}

.skeleton-badge {
  width: 56px;
  height: 24px;
  border-radius: 6px;
  display: block;
  flex-shrink: 0;
}

.skeleton-odds-row {
  display: flex;
  gap: 20px;
}

.skeleton-odds-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skeleton-label {
  width: 38px;
  height: 10px;
  display: block;
}

.skeleton-line-sm {
  width: 44px;
  height: 16px;
  display: block;
}

/* When blurred-card wraps a card inside a grid, it becomes the grid item — make it transparent */
.picks-grid > .blurred-card {
  min-width: 0;
}

/* Gate sits inside the grid — spans full width */
.gate-grid-item {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
}

#paywall-gate {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: #13131fee;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.8), 0 0 0 1px rgba(108,99,255,0.15);
}

.gate-lock-icon { font-size: 1.6rem; margin-bottom: 8px; display: block; opacity: 0.75; }
.gate-title { font-size: 1.05rem; font-weight: 800; color: #fff; margin-bottom: 3px; }
.gate-sub { font-size: 0.7rem; color: #5a5a7a; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; }
.gate-form { display: flex; gap: 8px; align-items: center; }

.gate-input {
  flex: 1;
  padding: 11px 12px;
  background: #0d0d18;
  border: 1px solid #2a2a40;
  border-radius: 8px;
  color: #e8e8f0;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  outline: none;
  transition: border-color 0.2s;
  min-width: 0;
}
.gate-input:focus { border-color: #7c5cbf; }
.gate-input.error { border-color: var(--danger); animation: shake 0.3s ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.gate-btn {
  padding: 11px 18px;
  background: linear-gradient(135deg, #7c5cbf, #5b8cde);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s;
  flex-shrink: 0;
}
.gate-btn:hover { opacity: 0.85; }
.gate-error { margin-top: 8px; font-size: 0.75rem; color: var(--danger); min-height: 14px; }

/* ── Sort bar ── */
.sort-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  margin: 12px 0 4px;
  flex-wrap: nowrap;
}

.sort-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-right: 1px;
  white-space: nowrap;
}

.sort-btn {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 6px;
  white-space: nowrap;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  letter-spacing: 0.02em;
}

.sort-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.sort-btn.active {
  background: rgba(108, 99, 255, 0.15);
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Card right (time + badge) ── */
.card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.eats-time {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--dim);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.card-row-top {
  align-items: flex-start !important;
}


