/* ============================================================
   TOLLAN RECAP — CYAN PIXEL THEME (kembali ke warna awal)
   Layout rapi seperti gambar, loading bar, footer creator
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --bg:          #000000;
  --bg-card:     #0a0a0a;
  --bg-hover:    #111926;
  --border:      #00e5ff;
  --border-dim:  #0088aa;
  --accent:      #00e5ff;
  --accent-dim:  #005566;
  --profit:      #00e676;
  --loss:        #ff5252;
  --text-primary:   #ffffff;
  --text-secondary: #7a8899;
  --font-display: 'Press Start 2P', 'Courier New', monospace;
  --font-mono:    'VT323', 'Courier New', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1.5;
  padding-top: 72px;
  padding-bottom: 64px;
  min-height: 100vh;
}

/* ── FIXED HEADER ──────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #050505;
  border-bottom: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
}

.nav-logo-wrapper {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-primary);
  text-shadow: 2px 2px 0 var(--accent-dim);
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  letter-spacing: 1px;
  border-bottom: 2px solid transparent;
  transition: all 0.1s step-end;
}

.nav-links a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── FIXED FOOTER ──────────────────────────────────── */
.site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #050505;
  border-top: 3px solid var(--border);
  padding: 12px 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-creator a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px dotted var(--accent);
}

.footer-creator a:hover {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* ── HERO ──────────────────────────────────────────── */
.hero {
  padding: 12px 24px 8px;
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}

.hero-eyebrow {
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 5vw, 40px);
  letter-spacing: 4px;
  text-shadow: 4px 4px 0 var(--accent-dim);
}

.hero-subtitle {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--text-secondary);
  letter-spacing: 1px;
  margin-top: 10px;
}

/* ── MAIN CONTAINER ─────────────────────────────────── */
.main-container {
  max-width: 1500px;
  margin: 0 auto;
  padding: 16px 24px 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 136px);
}

/* ── SEARCH SECTION ───────────────────────────────── */
.search-section {
  background: var(--bg-card);
  border: 3px solid var(--border);
  padding: 16px;
  margin-bottom: 20px;
  margin-top: 12px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
  max-width: 1000px;
  box-shadow: 6px 6px 0 var(--accent-dim);
}

.search-label {
  display: block;
  font-family: var(--font-display);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.search-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  position: relative;
}

.search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: #000000;
  border: 2px solid var(--border);
  padding: 0;
}

.search-hash {
  padding: 0 8px 0 12px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 20px;
}

.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 18px;
  padding: 12px 12px 12px 0;
}

.search-input::placeholder {
  color: #444;
}

/* DROPDOWN */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #000;
  border: 2px solid var(--border);
  z-index: 100;
  list-style: none;
  margin-top: 4px;
}

.dropdown li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-dim);
  cursor: pointer;
}

.dropdown li:hover {
  background: var(--accent-dim);
}

.dropdown-pfp {
  width: 24px;
  height: 24px;
  object-fit: cover;
  image-rendering: pixelated;
  border: 1px solid var(--border);
}

.dropdown-name {
  font-family: var(--font-display);
  font-size: 10px;
}

.dropdown-addr {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.btn-search {
  background: var(--accent);
  color: #000;
  border: 2px solid #fff;
  font-family: var(--font-display);
  font-size: 12px;
  padding: 0 24px;
  cursor: pointer;
  text-transform: uppercase;
  box-shadow: 3px 3px 0 #000;
  transition: 0.05s linear;
}

.btn-search:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}

/* ── PLAYER CARD (layout rapi) ─────────────────────── */
.player-card {
  max-width: 1100px;
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-card);
  border: 3px solid var(--border);
  padding: 24px;
  box-shadow: 6px 6px 0 var(--accent-dim);
}

.card-tag {
  font-family: var(--font-display);
  font-size: 10px;
  background: var(--accent-dim);
  display: inline-block;
  padding: 4px 8px;
  margin-bottom: 0;
  color: #fff;
}

.card-header-row {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.pfp-wrap {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: #000;
}

.pfp {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}

.card-identity {
  flex: 2;
  min-width: 160px;
}

.player-name {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.player-address {
  font-size: 11px;
  word-break: break-all;
}

.profit-box {
  margin-left: auto;
  flex-shrink: 0;
  min-width: 160px;
  background: #0b1f16;
  border: 2px solid var(--profit);
  padding: 12px 18px;
  text-align: center;
}

.profit-value {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--profit);
}

.profit-value.negative {
  color: var(--loss);
}

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

.stat-card {
  background: #000000;
  border: 2px solid var(--border-dim);
  padding: 16px 12px;
  text-align: center;
}

.stat-label {
  font-family: var(--font-display);
  font-size: 9px;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  color: var(--text-primary);
  line-height: 1.2;
}

.stat-value--lg {
  font-size: 32px;
}

.stat-sublabel {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 6px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 2px solid var(--border-dim);
}

.projection-notice {
  font-family: var(--font-mono);
  font-size: 10px;
  text-align: left;
  line-height: 1.4;
  color: var(--text-secondary);
}

.btn-copy {
  background: #222;
  border: 2px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 10px;
  padding: 10px 20px;
  cursor: pointer;
  transition: 0.05s linear;
  white-space: nowrap;
}

.btn-copy:active {
  transform: translate(2px, 2px);
}

/* ── LOADING PROGRESS BAR ──────────────────────────── */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 24px;
  background: transparent;
  border: none;
  margin: 24px auto;
  max-width: 500px;
  width: 100%;
}

.loading-container {
  width: 100%;
  text-align: center;
}

.loading-text {
  font-family: var(--font-display);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.progress-bar-bg {
  background: #000000;
  border: 2px solid var(--border);
  height: 20px;
  width: 100%;
  margin-bottom: 12px;
}

.progress-bar-fill {
  background: var(--accent);
  width: 0%;
  height: 100%;
  transition: width 0.1s linear;
}

.progress-percent {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-primary);
  letter-spacing: 1px;
}

/* ── ERROR & LOG ─────────────────────────────────── */
.error-box, .system-log {
  border: 2px solid var(--border);
  background: #0a0a0a;
  padding: 16px;
  margin-top: 16px;
}

.error-box {
  border-color: var(--loss);
  color: var(--loss);
}

.log-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-dim);
  padding-bottom: 6px;
  margin-bottom: 8px;
}

.log-content {
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: pre-wrap;
}

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 800px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .card-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .profit-box {
    margin-left: 0;
    width: 100%;
  }
  .card-footer {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-copy {
    width: 100%;
  }
  .main-container {
    padding: 16px;
  }
  body {
    padding-top: 64px;
    padding-bottom: 56px;
  }
  .nav {
    padding: 8px 16px;
  }
  .nav-logo {
    font-size: 10px;
  }
  .site-footer {
    font-size: 9px;
    padding: 8px 16px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .player-card {
    padding: 16px;
  }
  .stat-value {
    font-size: 20px;
  }
  .stat-value--lg {
    font-size: 24px;
  }
  .hero-title {
    font-size: 20px;
  }
}

/* ===== RESULT PAGE V4 ===== */

/* Result card is allowed to be wider than the search box — uses the
   empty side margins so everything fits without scrolling on desktop. */
.player-card {
  max-width: 1500px;
}

.result-layout{
  display:grid;
  grid-template-columns: minmax(240px, 1fr) minmax(400px, 480px) minmax(240px, 1fr);
  justify-content:center;
  gap:28px;
  align-items:start;
}

.left-column,.right-column{
  display:flex;
  flex-direction:column;
  gap:14px;
}

.center-column{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.card-header-bar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(400px, 480px) minmax(240px, 1fr);
  align-items: center;
  margin-bottom: 16px;
  gap: 20px;
}

.journey-title{
  font-family:var(--font-display);
  font-size: 20px;
  letter-spacing:3px;
  text-align:center;
  color: var(--accent);
  text-shadow: 3px 3px 0 var(--accent-dim);
}

.center-column .pfp-wrap{
  width:120px;
  height:120px;
  box-shadow: 4px 4px 0 var(--accent-dim);
}

.center-column .player-name{
  text-align:center;
  font-size:20px;
  margin-top: 6px;
}

.center-column .player-address{
  text-align:center;
  font-size:10px;
}

.recap-title{
  font-family:var(--font-display);
  font-size:10px;
  color:var(--accent);
  letter-spacing:2px;
  margin-top:14px;
}

/* Groups the P/L result with the share CTA as one distinct block,
   visually separated from the identity info above it. */
.highlight-box{
  width:100%;
  max-width:400px;
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:8px;
  padding:14px;
  border:2px solid var(--border-dim);
  background:#000;
}

.center-column .profit-box{
  margin-left:0;
  width:100%;
  min-height:90px;
  padding: 12px;
}

.center-column .btn-copy{
  width:100%;
  white-space: normal;
  line-height: 1.6;
}

/* Primary CTA — share button gets the same treatment as the main
   search button so it stands out as the key action after results load. */
.btn-copy--primary{
  background: var(--accent);
  color: #000;
  border: 2px solid #fff;
  box-shadow: 3px 3px 0 #000;
}

.btn-copy--primary:active{
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 #000;
}

/* Right-column "—lg" values get extra room here, with a safe minimum
   for large numbers (5+ digit chest-open counts, etc). */
.result-layout .stat-value--lg{
  font-size: clamp(20px, 2.6vw, 28px);
}

/* Compact card sizing so the full recap fits one viewport without scroll. */
.player-card { padding: 18px; }
.result-layout { gap: 20px; }
.left-column, .right-column { gap: 10px; }

.result-layout .stat-card {
  padding: 12px 10px;
}

.result-layout .stat-label {
  font-size: 8px;
  margin-bottom: 6px;
}

.result-layout .stat-value {
  font-size: 22px;
}

.result-layout .stat-sublabel {
  font-size: 9px;
  margin-top: 4px;
}

.center-column .pfp-wrap {
  width: 100px;
  height: 100px;
}

.center-column .player-name {
  font-size: 18px;
  margin-top: 4px;
}

.recap-title {
  margin-top: 10px;
}

/* System log — moved to left column, below Jackpot Claim */
.player-terminal{
  background:#000;
  border:2px solid var(--border-dim);
  padding:12px;
  min-height:130px;
  flex: 1;
}

.terminal-header{
  font-family:var(--font-display);
  font-size:8px;
  border-bottom:1px solid var(--border-dim);
  padding-bottom:6px;
  margin-bottom:8px;
}

/* Empty slot reserved for a future animation/image, balancing the
   height of the right column against the center column's highlight box. */
.right-column-slot{
  flex: 1;
  min-height: 140px; 
  display: flex;
  justify-content: center;
  align-items: center; 
}

@media(max-width:1300px){
  .result-layout{
    grid-template-columns:1fr;
  }
  .center-column{
    order: -1;
  }
  .highlight-box{
    max-width: 100%;
  }
}
