
:root {
  --bg-navy: #020836;
  --bg-panel: #040d4a;
  --gold: #f5c724;
  --gold-row: #e8be24;
  --gold-row-border: #8c6d08;
  --active-blue: #1a94d6;
  --link-blue: #22a8f0;
  --text-red: #d12617;
  --text-dark: #0f0f0f;
  --text-white: #f4f6fa;
  --sub-blue: #2b66b3;
  --green-ok: #2ee66b;
}

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

html, body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background-color: var(--bg-navy);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  color: var(--text-white);
}

.lcpd-terminal {
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-navy);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.lcpd-terminal::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    rgba(18, 16, 16, 0) 50%,
    rgba(0, 0, 0, 0.14) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
  z-index: 50;
}

/* ================= HEADER ================= */
.header {
  position: relative;
  padding-top: 2.2vh;
  flex-shrink: 0;
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 0 3.5vw 0.4vh 11.5vw;
}

.wallet-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 20;
}

.btn-wallet {
  background: #061466;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-weight: 700;
  font-size: clamp(12px, 1.05vw, 15px);
  padding: 5px 14px;
  cursor: pointer;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: all 0.12s;
}

.btn-wallet:hover, .btn-wallet.connected {
  background: var(--gold);
  color: #020836;
}

.btn-wallet.connected:hover {
  background: #c91e14;
  border-color: #ff7a70;
  color: #ffffff;
}

.sol-balance-pill {
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 700;
  color: var(--green-ok);
  background: rgba(46, 230, 107, 0.1);
  border: 1px solid rgba(46, 230, 107, 0.4);
  padding: 5px 10px;
}

.btn-x-link {
  background: #040d4a;
  border: 2px solid var(--link-blue);
  color: #ffffff;
  font-weight: 700;
  font-size: clamp(11px, 0.95vw, 14px);
  padding: 5px 12px;
  text-decoration: none;
  letter-spacing: 0.5px;
  transition: all 0.12s;
}

.btn-x-link:hover {
  background: var(--link-blue);
  color: #020836;
}

.dept-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(22px, 2.5vw, 38px);
  font-weight: 700;
  letter-spacing: 1px;
  color: #ffffff;
  line-height: 1;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.75);
}

.gold-bar {
  height: clamp(6px, 0.8vh, 9px);
  background-color: var(--gold);
  width: 100%;
}

.header-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5vh 3.5vw 0 11.5vw;
}

.live-telemetry-strip {
  font-size: clamp(11px, 0.95vw, 13px);
  font-weight: 700;
  color: #8ba8d9;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green-ok);
  margin-right: 5px;
  box-shadow: 0 0 8px var(--green-ok);
}

.dept-motto {
  font-size: clamp(11px, 1vw, 14px);
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--sub-blue);
}

/* Header Brand Logo Emblem */
.badge-container {
  position: absolute;
  top: 1.2vh;
  left: 3vw;
  width: clamp(74px, 6.8vw, 104px);
  height: clamp(74px, 6.8vw, 104px);
  z-index: 25;
  cursor: pointer;
  border: 3px solid var(--gold);
  background: #020836;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85);
  overflow: hidden;
  transition: transform 0.12s;
}

.badge-container:hover {
  transform: scale(1.04);
}

.header-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ================= MAIN CONTENT ================= */
.content {
  flex: 1;
  padding: 1.5vh 5vw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.view {
  display: none;
  width: 100%;
  height: 100%;
}

.view.active {
  display: flex;
  flex-direction: column;
}

/* ================= GTA WANTED STARS ================= */
.gta-stars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  vertical-align: middle;
}

.gta-star {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.gta-star.lg {
  width: 24px;
  height: 24px;
}

.gta-star.earned path {
  fill: #f5c724;
  stroke: #000000;
  stroke-width: 1.8;
}

.gta-star.unearned path {
  fill: rgba(2, 8, 54, 0.45);
  stroke: rgba(0, 0, 0, 0.55);
  stroke-width: 1.5;
}

.gta-star.unearned.on-dark path {
  fill: #0b1859;
  stroke: #22388f;
  stroke-width: 1.4;
}

@keyframes sirenFlash {
  0%, 100% { filter: drop-shadow(0 0 4px #ff2a2a); transform: scale(1.04); }
  50% { filter: drop-shadow(0 0 6px #2a9dff); transform: scale(1); }
}

.gta-stars.escaped .gta-star.earned {
  animation: sirenFlash 0.9s infinite;
}

.escaped-badge {
  display: inline-block;
  background: #c91e14;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 6px;
  letter-spacing: 0.8px;
  margin-left: 6px;
  border: 1px solid #ff7a70;
}

/* ================= VIEW 1: MAIN MENU ================= */
.main-menu-view {
  justify-content: center;
  padding-left: 6vw;
}

.menu-heading {
  font-size: clamp(32px, 3.6vw, 52px);
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.8px;
  margin-bottom: 0.4vh;
}

.menu-subheading {
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 600;
  color: #d8deeb;
  margin-bottom: 3vh;
}

.menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2vh;
}

.menu-item {
  font-size: clamp(20px, 2.15vw, 32px);
  font-weight: 600;
  color: var(--link-blue);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  position: relative;
  padding-left: 2.6vw;
  width: fit-content;
}

.menu-item.selected {
  color: #ffffff;
}

.menu-item .star-cursor {
  position: absolute;
  left: 0;
  font-size: clamp(20px, 2vw, 28px);
  color: #ffffff;
  opacity: 0;
}

.menu-item.selected .star-cursor {
  opacity: 1;
}

/* Official $WANTED CA Tab on Homepage */
.ca-menu-item {
  font-size: clamp(16px, 1.55vw, 22px);
  color: var(--gold);
  margin-top: 0.6vh;
}

.ca-inline-code {
  font-family: monospace;
  font-size: clamp(13px, 1.25vw, 18px);
  background: rgba(4, 14, 82, 0.9);
  border: 1.5px solid #2b48ad;
  padding: 4px 10px;
  color: #2ee66b;
  letter-spacing: 0.3px;
}

.ca-menu-item.selected .ca-inline-code,
.ca-menu-item:hover .ca-inline-code {
  border-color: var(--gold);
}

.ca-copy-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  background: var(--gold);
  color: #020836;
  letter-spacing: 0.6px;
}

/* ================= VIEW 2: WANTED BOARD ================= */
.wanted-view {
  padding: 0 2vw;
  justify-content: flex-start;
  padding-top: 1vh;
}

.board-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 1.4vh;
  flex-wrap: wrap;
}

.board-tab {
  background: #061259;
  border: 2px solid #243b94;
  color: #8eb4eb;
  font-size: clamp(11px, 0.95vw, 14px);
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.board-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #020836;
}

.table-headers {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.1fr 1.4fr;
  text-align: center;
  font-size: clamp(13px, 1.25vw, 18px);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 0.6vh;
  letter-spacing: 0.6px;
}

.wanted-table-scroll {
  flex: 1;
  overflow-y: auto;
  border-top: 2px solid var(--gold-row-border);
  max-height: 58vh;
}

.wanted-row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.2fr 1.1fr 1.4fr;
  align-items: center;
  text-align: center;
  background-color: var(--gold-row);
  border-bottom: 2px solid var(--gold-row-border);
  padding: 7px 10px;
  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 700;
  color: var(--text-dark);
  cursor: pointer;
}

.wanted-row.high-priority {
  color: var(--text-red);
}

.wanted-row.selected {
  background-color: var(--active-blue);
  color: #041526;
}

.row-coin-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
  padding-left: 8px;
}

.row-thumb {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border: 1.5px solid #020836;
  background: #020836;
  flex-shrink: 0;
}

.empty-board-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px dashed #253d96;
  background: rgba(5, 16, 79, 0.55);
  padding: 3vh 2vw;
  text-align: center;
  gap: 14px;
}

.empty-board-state h3 {
  font-size: clamp(18px, 1.7vw, 24px);
  color: var(--gold);
  letter-spacing: 0.6px;
}

.empty-board-state p {
  font-size: clamp(13px, 1.1vw, 16px);
  color: #b8c7e6;
  max-width: 540px;
  line-height: 1.5;
}

/* ================= VIEW 3: FILE A RECORD (LAUNCH COIN) ================= */
.launch-view {
  padding: 0 2vw;
  justify-content: center;
}

.launch-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.95fr;
  gap: 3vw;
  align-items: center;
  height: 100%;
}

.form-section-title {
  font-size: clamp(20px, 2vw, 28px);
  font-weight: 700;
  color: var(--gold);
  margin-bottom: 1.2vh;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.field-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.lcpd-input {
  background: #030b42;
  border: 2px solid #2b48ad;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  padding: 9px 12px;
  outline: none;
  user-select: text;
}

.lcpd-input:focus {
  border-color: var(--gold);
}

.dev-buy-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.preset-sol-btn {
  background: #07166e;
  border: 1.5px solid #3556c7;
  color: #d6e4ff;
  font-size: 12px;
  font-weight: 700;
  padding: 9px 10px;
  cursor: pointer;
}

.preset-sol-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.image-upload-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #040e52;
  border: 2px solid #2b48ad;
  padding: 10px 12px;
}

.square-coin-preview {
  width: 68px;
  height: 68px;
  aspect-ratio: 1 / 1;
  border: 2px solid var(--gold);
  background: #020836;
  object-fit: cover;
  flex-shrink: 0;
}

.btn-action-gold {
  background: var(--gold);
  border: 2px solid var(--gold);
  color: #020836;
  font-size: 15px;
  font-weight: 800;
  padding: 11px 20px;
  cursor: pointer;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.btn-action-gold:hover {
  background: #ffe066;
}

.btn-action-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mugshot-preview-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.mugshot-frame {
  width: clamp(230px, 21vw, 290px);
  height: clamp(260px, 24vw, 325px);
  border: 5px solid var(--gold);
  background: linear-gradient(180deg, #b8f2ff 0%, #e1fbff 100%);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
}

.mugshot-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ================= VIEW 4: COIN RECORD DOSSIER ================= */
.dossier-view {
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  padding: 1vh 4vw;
  gap: 3vw;
}

.dossier-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5vh;
}

.dossier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 24px;
}

.detail-item .lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.6px;
  margin-bottom: 3px;
}

.detail-item .val {
  font-size: clamp(16px, 1.5vw, 22px);
  font-weight: 700;
  color: var(--link-blue);
}

.curve-box {
  background: #040e52;
  border: 2px solid #2b48ad;
  padding: 10px 14px;
}

.curve-bar-bg {
  width: 100%;
  height: 14px;
  background: #020836;
  border: 1.5px solid var(--gold);
  margin-top: 6px;
  overflow: hidden;
}

.curve-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f5c724, #ff9900);
  width: 0%;
  transition: width 0.35s ease;
}

.dossier-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.btn-secondary {
  background: #061466;
  border: 2px solid var(--link-blue);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
  text-transform: uppercase;
}

.btn-secondary:hover {
  background: var(--link-blue);
  color: #020836;
}

/* ================= VIEW 5: PROTOCOL & FEE INTEL ================= */
.intel-view {
  padding: 1vh 4vw;
  justify-content: center;
  gap: 14px;
}

.intel-card {
  border: 2px solid var(--gold);
  background: rgba(4, 13, 74, 0.75);
  padding: 14px 18px;
}

.intel-card h4 {
  color: var(--gold);
  font-size: 16px;
  margin-bottom: 5px;
  letter-spacing: 0.5px;
}

.intel-card p {
  color: #e4ecfa;
  font-size: 14px;
  line-height: 1.45;
}

/* ================= MODALS ================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(1, 4, 26, 0.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: #030b42;
  border: 3px solid var(--gold);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 92vw;
}

.poster-preview-canvas {
  max-height: 64vh;
  width: auto;
  border: 2px solid var(--gold);
}

.wallet-option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #040e52;
  border: 2px solid #2b48ad;
  color: #ffffff;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.12s;
}

.wallet-option-btn:hover {
  background: #1a94d6;
  border-color: var(--gold);
  color: #020836;
}

.wallet-status-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  background: rgba(46, 230, 107, 0.15);
  border: 1px solid #2ee66b;
  color: #2ee66b;
  letter-spacing: 0.5px;
}

.wallet-status-tag.missing {
  background: rgba(245, 199, 36, 0.12);
  border-color: var(--gold);
  color: var(--gold);
}

/* ================= FOOTER ================= */
.footer-wrapper {
  padding-bottom: 1.6vh;
  flex-shrink: 0;
}

.footer-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1vh 4.5vw 0 4.5vw;
  font-size: clamp(13px, 1.15vw, 17px);
  font-weight: 700;
  color: #d8deeb;
}

.controls-right {
  display: flex;
  gap: 2.2vw;
}

.control-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.keycap {
  border: 1.5px solid #8e9bb5;
  border-radius: 3px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.toast {
  position: fixed;
  top: 11vh;
  right: 3.5vw;
  background: #020836;
  border: 2px solid var(--gold);
  color: var(--gold);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 700;
  z-index: 120;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.toast.show {
  opacity: 1;
}
