/* ═══ POLYSTATS — Modals & Overlay Styles ═══ */

/* ── Profit Lock Overlay ── */
.profit-lock-overlay {
  position: fixed; inset: 0; z-index: 5000;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; animation: fadeIn 0.4s;
}
.profit-lock-overlay .big-text {
  font-family: 'Orbitron', monospace; font-size: 52px; font-weight: 900;
  color: var(--green); text-shadow: 0 0 40px rgba(0,255,136,0.5);
  margin-bottom: 10px; animation: profitPulse 1.5s infinite;
}
.profit-lock-overlay .sub-text {
  font-family: 'Inter', sans-serif; font-size: 16px; color: var(--muted);
  margin-bottom: 30px;
}

/* ── Chinese Word Modal ── */
.cw-overlay,
.cq-overlay {
  position: fixed; inset: 0; z-index: 4000;
  background: rgba(0,0,0,0.88);
  display: flex; align-items: center; justify-content: center;
}
.cw-card,
.cq-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 14px; padding: 32px; max-width: 420px; width: 90%;
  text-align: center; animation: fadeInUp 0.35s;
}
.cw-char {
  font-size: 64px; margin-bottom: 8px;
  text-shadow: 0 0 20px rgba(0,212,255,0.3);
}
.cw-pinyin {
  font-family: 'Inter', sans-serif; font-size: 18px; color: var(--cyan);
  margin-bottom: 4px;
}
.cw-meaning {
  font-family: 'Inter', sans-serif; font-size: 15px; color: var(--text);
  margin-bottom: 12px;
}
.cw-example {
  font-size: 14px; color: var(--muted);
  line-height: 1.6; margin-bottom: 6px;
}
.cw-example-cn { font-size: 18px; color: var(--text); }

/* ── Chinese Quiz ── */
.cq-question {
  font-size: 48px; margin-bottom: 20px;
  text-shadow: 0 0 16px rgba(0,212,255,0.3);
}
.cq-options { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.cq-option {
  padding: 10px 16px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); cursor: pointer; font-size: 14px;
  transition: all 0.15s; text-align: left;
}
.cq-option:hover { border-color: var(--cyan); background: rgba(0,212,255,0.05); }
.cq-option.correct { border-color: var(--green); background: rgba(0,255,136,0.1); color: var(--green); }
.cq-option.wrong { border-color: var(--red); background: rgba(255,68,102,0.1); color: var(--red); }
.cq-progress {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: var(--muted); margin-bottom: 12px;
}
.cq-score {
  font-family: 'Orbitron', monospace; font-size: 24px; font-weight: 700;
  color: var(--green); margin-top: 12px;
}

/* ── Session History Modal ── */
.sh-list { max-height: 60vh; overflow-y: auto; }
.sh-item {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  cursor: pointer; transition: background 0.15s;
}
.sh-item:hover { background: rgba(0,212,255,0.04); }
.sh-date { font-family: 'JetBrains Mono', monospace; font-size: 13px; color: var(--text); }
.sh-profit { font-family: 'JetBrains Mono', monospace; font-size: 14px; font-weight: 700; }
.sh-detail {
  padding: 16px; animation: fadeIn 0.25s;
}
.sh-detail-table { width: 100%; border-collapse: collapse; }
.sh-detail-table th {
  font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.8px; padding: 8px; text-align: left;
  border-bottom: 1px solid var(--border);
}
.sh-detail-table td {
  padding: 8px; font-family: 'JetBrains Mono', monospace; font-size: 12px;
}

/* ── Stats Modal ── */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.stats-card {
  padding: 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; text-align: center;
}
.stats-card-label {
  font-size: 10px; color: var(--muted); text-transform: uppercase;
  letter-spacing: 0.8px; margin-bottom: 6px;
}
.stats-card-value {
  font-family: 'Orbitron', monospace; font-size: 22px; font-weight: 700;
}//
.stats-chart-area { margin-top: 16px; }
.stats-chart-area canvas {
  width: 100%; height: 180px; border-radius: 8px;
  background: var(--bg); border: 1px solid var(--border);
}

/* ── Positions / Polymarket Trade History ── */
.pos-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}
.pos-card {
  padding: 14px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; transition: border-color 0.2s;
}
.pos-card:hover { border-color: var(--cyan); }
.pos-event { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; line-height: 1.4; }
.pos-outcome { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.pos-outcome-dot {
  width: 6px; height: 6px; border-radius: 50%;
}
.pos-outcome-name { font-size: 12px; color: var(--muted); }
.pos-outcome-price {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 700;
  margin-left: auto;
}
.pos-size { font-size: 11px; color: var(--muted); margin-top: 4px; }

/* ── PM History events + detail ── */
.pm-event-group {
  margin-bottom: 12px; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden;
}
.pm-event-header {
  padding: 10px 14px; background: var(--panel); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; font-weight: 600; color: var(--text);
  transition: background 0.15s;
}
.pm-event-header:hover { background: rgba(0,212,255,0.04); }
.pm-event-trades {
  padding: 0 14px 10px; font-size: 12px; color: var(--muted);
}
.pm-trade-row {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 0; border-bottom: 1px solid rgba(26,58,74,0.3);
}
.pm-trade-row:last-child { border-bottom: none; }
.pm-side-buy { color: var(--green); font-weight: 700; font-size: 11px; }
.pm-side-sell { color: var(--red); font-weight: 700; font-size: 11px; }
.pm-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 12px;
}

/* ── Friends Modal ── */
.friends-search {
  position: relative; margin-bottom: 16px;
}
.friends-search input {
  width: 100%; padding: 10px 14px 10px 36px;
  background: var(--bg); border: 1px solid var(--border);
  color: var(--text); border-radius: 8px;
  font-family: 'Inter', sans-serif; font-size: 14px;
}
.friends-search input:focus { border-color: var(--cyan); outline: none; }
.friend-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid rgba(26,58,74,0.3);
}
.friend-item:last-child { border-bottom: none; }
.friend-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Orbitron', monospace; font-size: 14px; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.friend-info { flex: 1; }
.friend-name { font-size: 14px; font-weight: 600; color: var(--text); }
.friend-status { font-size: 11px; color: var(--muted); }
.friend-action {
  padding: 5px 12px; border-radius: 6px; font-size: 11px;
  font-weight: 600; cursor: pointer; border: 1px solid;
  transition: all 0.2s;
}

/* ── Admin Panel ── */
.admin-user-list { max-height: 60vh; overflow-y: auto; }
.admin-user-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.admin-user-row:hover { background: rgba(0,212,255,0.03); }
.admin-user-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--text); }
.admin-actions { display: flex; gap: 6px; }

/* ── Profile Edit Section ── */
.profile-edit-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 600px) { .profile-edit-grid { grid-template-columns: 1fr; } }
.profile-avatar-picker {
  display: flex; align-items: center; gap: 16px;
  padding: 16px; background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; grid-column: 1 / -1;
}
.profile-avatar-preview {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-family: 'Orbitron', monospace; font-weight: 900;
  color: #fff; flex-shrink: 0;
}
