/* ═══════════════════════════════════════════
   BETA SNIPE SITE
   Matches main server UI exactly
   ═══════════════════════════════════════════ */

:root {
  --bg-deep: #0e172a;
  --bg-primary: #142238;
  --bg-card: #16243c;
  --bg-card-hover: #1d2c46;
  --bg-row-alt: #111d31;
  --bg-hover: #223756;
  --border: rgba(255,255,255,0.08);
  --border-accent: rgba(255,255,255,0.14);
  --card-highlight: rgba(255,255,255,0.03);
  --text-primary: #e8eefc;
  --text-secondary: rgba(232,238,252,0.75);
  --text-muted: rgba(232,238,252,0.45);
  --accent: #22c55e;
  --accent-dim: #16a34a;
  --accent-glow: rgba(34,197,94,0.15);
  --accent2: #3b82f6;
  --green: #22c55e;
  --red: #ef4444;
  --warn: #eab308;
  --orange: #f97316;
  --font-display: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", "Cascadia Code", monospace;
  --radius-card: 16px;
  --radius-pill: 999px;
  --radius-input: 10px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.3);
  --focus-ring: 0 0 0 2px rgba(59,130,246,0.5);
}

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-display);
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

button:focus-visible, input:focus-visible, select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.scanlines { display: none; }

/* ── Login ── */
.login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: var(--bg-card); border: 1px solid var(--border-accent); border-radius: var(--radius-card); padding: 32px; width: 340px; box-shadow: var(--shadow-card); }
.login-title { font-family: var(--font-mono); font-size: 1.3rem; text-align: center; margin-bottom: 24px; letter-spacing: 0.15em; color: var(--accent); font-weight: 800; }
.login-input { display: block; width: 100%; padding: 10px 14px; margin-bottom: 12px; background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-input); color: var(--text-primary); font-family: var(--font-mono); font-size: 0.85rem; outline: none; transition: border-color 0.2s; }
.login-input:focus { border-color: var(--accent2); box-shadow: var(--focus-ring); }
.login-btn { display: block; width: 100%; padding: 10px 24px; background: var(--accent); border: 1px solid var(--accent); color: #fff; border-radius: var(--radius-pill); font-family: var(--font-display); font-weight: 600; font-size: 0.85rem; cursor: pointer; letter-spacing: 0.1em; transition: all 0.2s; }
.login-btn:hover { background: var(--accent-dim); border-color: var(--accent-dim); }
.login-error { color: var(--red); font-size: 0.8rem; margin-top: 8px; min-height: 1.2em; font-family: var(--font-mono); }
.login-toggle { text-align: center; margin-top: 16px; font-size: 0.8rem; color: var(--text-muted); }
.login-toggle a { color: var(--accent2); text-decoration: none; }

/* Discord button */
.discord-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 24px;
  background: #5865F2;
  border: none;
  border-radius: var(--radius-pill);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
}
.discord-btn:hover { background: #4752C4; }

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
}
.login-divider::before, .login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Questionnaire */
.questionnaire-box {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-card);
  padding: 32px;
  width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-card);
}
.q-group { margin-bottom: 18px; }
.q-label {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.q-options { display: flex; flex-wrap: wrap; gap: 6px; }
.q-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.15s;
}
.q-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(34,197,94,0.08);
  color: var(--accent);
}
.q-option input[type="radio"] { display: none; }

/* ── Locked state ── */
.locked-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 12px 16px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(220,38,38,0.08) 0%, rgba(220,38,38,0.02) 100%);
  border: 1px solid rgba(220,38,38,0.25);
  border-radius: var(--radius-card);
}
.locked-banner__text {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.locked-banner__form { display: flex; align-items: center; gap: 8px; }

.app--locked .snipe-topbar { opacity: 0.4; pointer-events: none; }
.app--locked #buylog-box { opacity: 0.4; }
.app--locked .settings-section-label { opacity: 0.4; }

/* Locked placeholder cards */
.snipe-card--locked {
  background: #1a1c22;
  border: 1px solid #2a2d35;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  position: relative;
  overflow: hidden;
}
.snipe-card--locked::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255,255,255,0.015) 10px,
    rgba(255,255,255,0.015) 20px
  );
}
.snipe-card--locked__text {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  color: var(--red);
  letter-spacing: 0.15em;
  z-index: 1;
  text-shadow: 0 0 20px rgba(239,68,68,0.3);
}

/* ── Header ── */
.header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.header__brand {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  font-family: var(--font-display);
}
.header__user {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ── Buttons ── */
.btn-small {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 4px 12px;
}
.btn-small:hover {
  border-color: var(--accent2);
  color: var(--accent2);
  background: rgba(59,130,246,0.06);
}

.btn-config-save {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: var(--radius-pill);
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
  font-size: 0.8rem;
  padding: 6px 18px;
}
.btn-config-save:hover {
  background: var(--accent-dim);
  border-color: var(--accent-dim);
}

/* ── App layout ── */
.app { padding: 8px 16px; }

/* ── Snipe topbar ── */
.snipe-topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  flex-wrap: wrap;
}
.topbar-sep { border-left: 1px solid var(--border-accent); height: 20px; }

/* ── Config dropdowns ── */
.snipe-cfg-details { position: relative; }
.snipe-cfg-toggle {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--warn);
  border: 1px solid var(--warn);
  border-radius: 12px;
  padding: 3px 12px;
  cursor: pointer;
  letter-spacing: 0.05em;
  list-style: none;
}
.snipe-cfg-toggle::-webkit-details-marker { display: none; }
.snipe-cfg-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  margin-top: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  min-width: 320px;
}
.snipe-cfg-row { display: flex; align-items: center; gap: 6px; }
.snipe-cfg-lbl {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  white-space: nowrap;
}

/* ── Settings inputs ── */
.settings-input {
  width: 120px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 1.1rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  border-radius: var(--radius-input);
  -moz-appearance: textfield;
  appearance: textfield;
}
.settings-input::-webkit-inner-spin-button,
.settings-input::-webkit-outer-spin-button { -webkit-appearance: none; }
.settings-input:focus {
  border-color: var(--accent2);
  box-shadow: var(--focus-ring);
}

.settings-section-label {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

/* ── Stats ── */
.pe-stat { display: flex; flex-direction: column; gap: 2px; }
.pe-stat__label { font-family: var(--font-mono); font-size: 0.6rem; color: var(--text-muted); letter-spacing: 0.12em; }
.pe-stat__value { font-family: var(--font-mono); font-size: 0.95rem; color: var(--text-primary); font-weight: 600; }

/* ── Snipe Cards Container ── */
.snipe-cards-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 12px;
  padding: 4px 0;
  overflow: hidden;
}
.snipe-cards-container > :nth-child(n+13) { display: none; }

/* ── Snipe Card (CSFloat style) — exact copy from main server ── */
.snipe-card {
  background: #1e2028;
  border: 1px solid #2a2d35;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.snipe-card:hover {
  border-color: #4b5563;
  box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

.sc-separator { height: 4px; }
.sc-separator--green { background: #16a34a; }
.sc-separator--purple { background: #7c3aed; }
.sc-separator--orange { background: #c2410c; }
.sc-separator--red { background: #b91c1c; }

.sc-header {
  padding: 10px 14px 8px;
  border-bottom: 1px solid #2a2d35;
}
.sc-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f3f4f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.sc-image {
  position: relative;
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px;
}
.sc-image--green   { background: linear-gradient(to top, rgba(22,163,74,0.45) 0%, rgba(22,163,74,0.10) 50%, transparent 100%), #1e2028; }
.sc-image--purple  { background: linear-gradient(to top, rgba(167,139,250,0.45) 0%, rgba(167,139,250,0.12) 50%, transparent 100%), #1e2028; }
.sc-image--orange  { background: linear-gradient(to top, rgba(234,88,12,0.35) 0%, rgba(234,88,12,0.08) 50%, transparent 100%), #1e2028; }
.sc-image--red     { background: linear-gradient(to top, rgba(220,38,38,0.35) 0%, rgba(220,38,38,0.08) 50%, transparent 100%), #1e2028; }
.sc-image img {
  position: absolute;
  right: 0;
  z-index: 0;
  max-height: 90%;
  max-width: 65%;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.6)) drop-shadow(0 0 4px rgba(255,255,255,0.1));
}
.sc-info-tl, .sc-profit-overlay, .sc-netexit, .sc-pump { z-index: 1; }

.sc-pump {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #fff;
}

.sc-info-tl {
  position: absolute;
  top: 6px;
  left: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.sc-info-row { display: flex; align-items: center; gap: 6px; }
.sc-liq {
  font-size: 0.9rem;
  font-weight: 800;
  font-family: var(--font-mono);
  padding: 3px 8px;
  border-radius: 5px;
  background: rgba(0,0,0,0.5);
}
.sc-ext {
  font-size: 0.68rem;
  font-weight: 600;
  color: #d1d5db;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}
.sc-float-img {
  font-size: 0.78rem;
  font-weight: 600;
  font-family: var(--font-mono);
  color: #67e8f9;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
  padding-left: 2px;
}

.sc-profit-overlay {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 4px;
}
.sc-profit-tag {
  font-size: 0.995rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #fff;
  padding: 3px 9px;
  border-radius: 5px;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}
.sc-profit-tag--green { background: #16a34a; }
.sc-profit-tag--purple { background: #7c3aed; }
.sc-profit-tag--orange { background: #ea580c; }
.sc-profit-tag--red { background: #dc2626; }

.sc-netexit {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #3b82f6;
}

.sc-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 14px 4px;
  font-family: var(--font-mono);
  text-decoration: none;
  color: inherit;
}
.sc-price-row:hover { background: rgba(255,255,255,0.03); }
.sc-price { font-size: 1.15rem; font-weight: 700; color: #f9fafb; }
.sc-price-market { font-size: 0.85rem; font-weight: 600; color: #f9fafb; font-style: italic; }

.sc-ref-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 2px 14px 6px;
  font-family: var(--font-mono);
  font-size: 0.936rem;
  color: #9ca3af;
}
.sc-ref-line { display: flex; align-items: center; gap: 6px; }
.sc-ref-label { color: #6b7280; font-weight: 500; font-size: 0.8rem; }
.sc-ref-price { color: #f472b6; font-weight: 600; }
.sc-ref-diff { font-weight: 600; }
.sc-ref-diff--green { color: #16a34a; }
.sc-ref-diff--purple { color: #a78bfa; }
.sc-ref-diff--orange { color: #ea580c; }
.sc-ref-diff--red { color: #dc2626; }

.sc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 14px 10px;
  border-top: 1px solid #2a2d35;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}
.sc-time { color: #6b7280; font-weight: 500; }
.sc-delay { white-space: nowrap; font-weight: 800; }
.sc-delay--fast { color: var(--green); }
.sc-delay--medium { color: var(--orange); }
.sc-delay--slow { color: var(--red); }

/* New card flash */
.snipe-card--new { animation: snipe-flash 1.5s ease-out; }
@keyframes snipe-flash {
  0% { box-shadow: 0 0 16px rgba(34,197,94,0.5); border-color: var(--green); }
  100% { box-shadow: none; border-color: #374151; }
}

/* ── Quick Buy overlay ── */
.sc-buy-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s;
}
.sc-buy-overlay--confirm { background: rgba(22, 163, 74, 0.75); }
.sc-buy-overlay--pending { background: rgba(234, 179, 8, 0.75); cursor: wait; }
.sc-buy-overlay--success { background: rgba(22, 163, 74, 0.85); }
.sc-buy-overlay--failed, .sc-buy-overlay--error { background: rgba(220, 38, 38, 0.80); }
.sc-buy-overlay .sc-buy-line2 { font-size: 0.72rem; font-weight: 500; opacity: 0.9; }

/* ── Admin Panel ── */
.admin-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-card);
  box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  width: 580px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 20px 24px;
}
.admin-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.admin-panel__title {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--warn);
}
.admin-section {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.admin-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.admin-user-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.admin-user-row:last-child { border-bottom: none; }
.admin-user-name { color: var(--text-primary); font-weight: 600; min-width: 100px; }
.admin-user-role { font-size: 0.7rem; padding: 1px 6px; border-radius: 4px; font-weight: 700; letter-spacing: 0.05em; }
.admin-user-role--admin { background: rgba(234,179,8,0.15); color: var(--warn); }
.admin-user-role--user { background: rgba(59,130,246,0.15); color: var(--accent2); }

.admin-invite-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border);
}
.admin-invite-row:last-child { border-bottom: none; }
.admin-invite-code-text { color: var(--accent); font-weight: 600; font-size: 0.75rem; word-break: break-all; }
.admin-invite-used { color: var(--text-muted); font-size: 0.7rem; }
.admin-invite-available { color: var(--accent); font-size: 0.7rem; font-weight: 600; }
