/* =========================================
   LoveOdds — App styles (modals, wallet, portfolio)
   ========================================= */

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

.modal-overlay.active { display: flex; }

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
  position: relative;
  box-shadow: var(--shadow-card), var(--shadow-glow-pink);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}
.modal-close:hover { color: var(--text-primary); }

.modal-couple {
  font-family: var(--font-display);
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.modal-question {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
  margin-bottom: 20px;
}

.modal-odds {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.modal-opt {
  padding: 16px;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.modal-opt:hover { transform: translateY(-1px); }

.modal-opt.active {
  border: 2px solid;
  transform: translateY(-1px);
}

.modal-yes { background: var(--yes-bg); border: 1px solid rgba(78, 205, 196, 0.2); }
.modal-yes.active { border-color: var(--accent-teal); }

.modal-no { background: var(--no-bg); border: 1px solid rgba(255, 107, 157, 0.2); }
.modal-no.active { border-color: var(--accent-pink); }

.modal-opt-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.modal-opt-pct {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
}
.modal-yes .modal-opt-pct { color: var(--accent-teal); }
.modal-no .modal-opt-pct { color: var(--accent-pink); }

.modal-opt-price {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.modal-amount-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-amount-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.modal-amount-input-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
}

.modal-dollar {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
}

.modal-amount-input {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
  width: 80px;
  text-align: right;
  outline: none;
  font-family: var(--font-body);
}

.modal-payout {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 16px;
}

.modal-cta {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  background: var(--accent-pink);
  color: white;
}

.modal-cta:disabled {
  background: var(--bg-elevated);
  color: var(--text-muted);
  cursor: not-allowed;
}

.modal-cta:not(:disabled):hover {
  background: var(--accent-rose);
  transform: translateY(-1px);
}

.modal-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

/* Share modal */
.modal-share-header {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-pink);
  text-align: center;
  margin-bottom: 12px;
}

.modal-share-slug {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 16px;
}

.modal-payout-line {
  font-size: 15px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 20px;
}

.share-tweet-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  background: #000;
  color: white;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s;
  cursor: pointer;
}
.share-tweet-btn:hover { opacity: 0.85; }

/* ---- WALLET NAV ---- */
.wallet-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-teal);
  cursor: pointer;
  transition: border-color 0.2s;
}
.wallet-pill:hover { border-color: var(--border-light); }

.wallet-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-teal);
}

/* ---- DYNAMIC THE-TEA MARKET GRID ---- */
.market-grid-dynamic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}
.market-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-card);
}

.market-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.m-card-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.m-avatar {
  font-size: 32px;
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 12px;
}

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

.m-names {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 3px;
}

.m-context {
  font-size: 12px;
  color: var(--text-muted);
}

.m-question {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 16px;
  line-height: 1.4;
}

.m-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

.m-option {
  padding: 12px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.m-yes { background: var(--yes-bg); border: 1px solid rgba(78, 205, 196, 0.2); }
.m-no  { background: var(--no-bg);  border: 1px solid rgba(255, 107, 157, 0.2); }

.m-opt-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.m-opt-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.m-opt-pct {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}
.m-yes .m-opt-pct { color: var(--accent-teal); }
.m-no  .m-opt-pct { color: var(--accent-pink); }

.m-opt-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.m-bar {
  height: 5px;
  border-radius: 99px;
  background: var(--bg-primary);
  overflow: hidden;
  display: flex;
  margin-bottom: 14px;
}

.bar-yes { background: var(--accent-teal); }
.bar-no  { background: var(--accent-pink); }

.m-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.m-bet-cta {
  color: var(--accent-pink);
  font-weight: 600;
  font-size: 13px;
}

/* Hero card placeholder */
.hero-card-empty {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-card);
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* ---- PORTFOLIO PAGE ---- */
.portfolio-page {
  min-height: 100vh;
  background: var(--bg-primary);
}

.portfolio-header {
  padding: 48px 24px 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.portfolio-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.portfolio-sub {
  font-size: 16px;
  color: var(--text-secondary);
}

.portfolio-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-teal);
  margin-top: 16px;
}

.portfolio-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 24px;
}

.portfolio-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.pstat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 20px;
  text-align: center;
}

.pstat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 4px;
}
.pstat-num.teal { color: var(--accent-teal); }
.pstat-num.pink { color: var(--accent-pink); }
.pstat-num.gold { color: var(--accent-gold); }

.pstat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

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

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

.bet-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.bet-item-left { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.bet-couple {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

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

.bet-amount {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-right: 16px;
}

.bet-side-pill {
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.bet-side-yes { background: var(--yes-bg); color: var(--accent-teal); border: 1px solid rgba(78, 205, 196, 0.3); }
.bet-side-no  { background: var(--no-bg);  color: var(--accent-pink); border: 1px solid rgba(255, 107, 157, 0.3); }

.payout-badge {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-gold);
}

.no-bets {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  font-size: 15px;
}

/* ---- TOP PREDICTOR BANNER (homepage) ---- */
.top-predictor-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(255, 179, 71, 0.08);
  border: 1px solid rgba(255, 179, 71, 0.28);
  border-radius: 12px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.tp-crown { font-size: 18px; }

.tp-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--accent-gold);
}

.tp-handle {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold);
  text-decoration: none;
}
.tp-handle:hover { text-decoration: underline; }

.tp-stats {
  font-size: 13px;
  color: var(--text-muted);
  flex: 1;
}

.tp-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-pink);
  text-decoration: none;
  white-space: nowrap;
}
.tp-link:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .market-grid-dynamic { grid-template-columns: 1fr; }
  .portfolio-stats { grid-template-columns: 1fr; }
}