/* CS2 Demo Analyzer — Matrix Style (cs2.matrix-leak.site) */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Share+Tech+Mono&display=swap');

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

:root {
  --bg:          #030503;
  --bg2:         rgba(0,18,0,0.82);
  --bg3:         rgba(0,30,0,0.6);
  --border:      rgba(0,255,65,0.15);
  --border2:     rgba(0,255,65,0.3);
  --green:       #00ff41;
  --green-dim:   #00c832;
  --green-glow:  rgba(0,255,65,0.18);
  --gold:        #c8a84b;
  --gold2:       #fbbf24;
  --gold-glow:   rgba(200,168,75,0.18);
  --red:         #ff3b30;
  --text:        #c8ffc8;
  --text-dim:    #4a7a4a;
  --text-bright: #e8ffe8;
  --mono:        'Share Tech Mono', 'Courier New', monospace;
  --head:        'Orbitron', sans-serif;
  --accent:      #00ff41;
  --danger:      #ff3b30;
}

html { font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  min-height: 100vh;
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
}

/* SCANLINES */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.08) 2px,
    rgba(0,0,0,0.08) 4px
  );
  pointer-events: none;
  z-index: 9999;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }

a { color: var(--green); text-decoration: none; transition: color 0.2s, opacity 0.2s; }
a:hover { color: var(--gold); text-decoration: underline; }

@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 8px var(--green-glow); }
  50% { box-shadow: 0 0 22px rgba(0,255,65,0.4); }
}

/* NAVBAR */
.navbar {
  border-bottom: 1px solid var(--border2);
  padding: 0 2rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(3,5,3,0.95);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  font-family: var(--head);
  font-size: 1rem;
  color: var(--green);
  letter-spacing: 3px;
  font-weight: 900;
  text-decoration: none;
  text-shadow: 0 0 12px var(--green-glow);
}
.navbar-brand:hover { color: var(--green); text-decoration: none; }
.navbar-links { display: flex; gap: 1.5rem; font-size: 0.85rem; }

/* CONTAINERS */
.container { max-width: 1100px; margin: 0 auto; padding: 2rem 1.5rem; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 2rem 1.5rem; }

/* CARD */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(4px);
}
.card-title {
  font-family: var(--head);
  font-size: 0.65rem;
  color: var(--green);
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
  text-shadow: 0 0 8px var(--green-glow);
}

/* HERO */
.hero { text-align: center; padding: 4rem 1rem 3rem; }
.hero h1 {
  font-family: var(--head);
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  color: var(--green);
  letter-spacing: 5px;
  text-shadow: 0 0 40px var(--green-glow), 0 0 80px rgba(0,255,65,0.08);
  margin-bottom: 0.5rem;
  font-weight: 900;
}
.hero .subtitle { color: var(--text-dim); font-size: 0.95rem; letter-spacing: 2px; }
.hero .cursor::after { content: '_'; animation: blink 1s step-end infinite; color: var(--green); }

/* UPLOAD ZONE */
.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: 4px;
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  background: var(--bg3);
  position: relative;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--green);
  background: var(--green-glow);
  box-shadow: 0 0 24px var(--green-glow), inset 0 0 24px rgba(0,255,65,0.04);
  animation: glow-pulse 2s ease-in-out infinite;
}
.upload-zone .upload-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.45; }
.upload-zone h2 { font-family: var(--head); font-size: 1rem; color: var(--text-bright); margin-bottom: 0.5rem; letter-spacing: 2px; }
.upload-zone p { color: var(--text-dim); font-size: 0.88rem; }
.upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* FILE INFO */
.file-info { display: none; background: var(--bg3); border: 1px solid var(--border2); border-radius: 4px; padding: 1rem 1.5rem; margin-top: 1rem; font-family: var(--mono); font-size: 0.9rem; }
.file-info.visible { display: flex; align-items: center; gap: 1rem; }
.file-info .fname { color: var(--green); flex: 1; }
.file-info .fsize { color: var(--text-dim); }

/* PROGRESS BAR */
.progress-wrap { background: rgba(0,0,0,0.5); border: 1px solid var(--border); border-radius: 2px; height: 6px; margin: 1rem 0; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--green-dim), var(--green)); box-shadow: 0 0 12px var(--green); transition: width 0.4s ease; width: 0%; }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.75rem; border-radius: 3px;
  font-family: var(--head); font-size: 0.78rem; letter-spacing: 2px;
  cursor: pointer; border: none; transition: all 0.2s;
  text-decoration: none; text-transform: uppercase;
}
.btn-primary { background: transparent; color: var(--green); border: 1px solid var(--green); box-shadow: 0 0 8px var(--green-glow); }
.btn-primary:hover { background: var(--green-glow); box-shadow: 0 0 20px rgba(0,255,65,0.4); color: var(--green); text-decoration: none; opacity: 1; }
.btn-primary:disabled { opacity: 0.3; cursor: not-allowed; box-shadow: none; }
.btn-gold { background: transparent; color: var(--gold); border: 1px solid var(--gold); box-shadow: 0 0 8px var(--gold-glow); }
.btn-gold:hover { background: var(--gold-glow); box-shadow: 0 0 20px rgba(200,168,75,0.4); color: var(--gold2); text-decoration: none; opacity: 1; }
.btn-outline { background: transparent; color: var(--text-dim); border: 1px solid var(--border2); }
.btn-outline:hover { border-color: var(--green); color: var(--green); text-decoration: none; }
.btn-danger { background: transparent; color: var(--red); border: 1px solid rgba(255,59,48,0.4); font-size: 0.72rem; padding: 0.4rem 0.9rem; letter-spacing: 1px; }
.btn-danger:hover { border-color: var(--red); background: rgba(255,59,48,0.08); color: var(--red); text-decoration: none; }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat-box { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 1.25rem 1rem; text-align: center; transition: border-color 0.2s; }
.stat-box:hover { border-color: var(--border2); }
.stat-box .stat-val { font-family: var(--head); font-size: clamp(1rem, 2.5vw, 2rem); font-weight: 700; color: var(--green); display: block; line-height: 1.1; text-shadow: 0 0 12px var(--green-glow); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-box .stat-val.gold { color: var(--gold); text-shadow: 0 0 12px var(--gold-glow); }
.stat-box .stat-label { font-size: 0.65rem; color: var(--text-dim); letter-spacing: 2px; text-transform: uppercase; margin-top: 0.3rem; font-family: var(--mono); }

/* TABLE */
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; font-family: var(--mono); }
th { font-family: var(--head); font-size: 0.62rem; letter-spacing: 2px; text-transform: uppercase; color: var(--text-dim); text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border2); }
td { padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:hover td { background: rgba(0,255,65,0.03); }
.mono { font-family: var(--mono); }
.green { color: var(--green); }
.gold  { color: var(--gold); }
.red   { color: var(--red); }

/* CHART CONTAINERS */
.chart-container { position: relative; width: 100%; height: 260px; }
.chart-container-lg { position: relative; width: 100%; height: 400px; }

/* SECTION HEADING */
.section-heading {
  font-family: var(--head); font-size: 0.65rem; letter-spacing: 4px; text-transform: uppercase;
  color: var(--green); margin-bottom: 1rem; display: flex; align-items: center; gap: 0.75rem;
  text-shadow: 0 0 8px var(--green-glow);
}
.section-heading::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border2), transparent); }

/* CLUTCH GRID */
.clutch-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
.clutch-cell { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 0.75rem 0.5rem; text-align: center; transition: border-color 0.2s; }
.clutch-cell:hover { border-color: var(--border2); }
.clutch-cell .label { font-family: var(--head); font-size: 0.7rem; color: var(--green); margin-bottom: 0.4rem; letter-spacing: 1px; }
.clutch-cell .won { color: var(--green); font-weight: 700; font-size: 1.2rem; text-shadow: 0 0 8px var(--green-glow); }
.clutch-cell .lost { color: var(--red); font-size: 0.85rem; }
.clutch-cell .mini { font-size: 0.68rem; color: var(--text-dim); }

/* ENTRY STATS */
.entry-stats { display: flex; gap: 1rem; flex-wrap: wrap; }
.entry-item { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 1rem; min-width: 130px; text-align: center; }
.entry-item .val { font-family: var(--head); font-size: 1.5rem; color: var(--text-bright); }
.entry-item .lbl { font-size: 0.68rem; color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; margin-top: 0.2rem; }

/* PAYMENT PAGE */
.pay-card { max-width: 480px; margin: 4rem auto; text-align: center; }
.pay-price { font-family: var(--head); font-size: 3rem; color: var(--gold); margin: 1rem 0; text-shadow: 0 0 20px var(--gold-glow); font-weight: 900; }
.pay-id { font-family: var(--mono); font-size: 0.72rem; color: var(--text-dim); margin-bottom: 2rem; word-break: break-all; }

/* ADMIN BADGES */
.badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 2px; font-size: 0.72rem; font-family: var(--mono); letter-spacing: 1px; }
.badge-pending { background: rgba(200,168,75,0.1);  color: var(--gold);  border: 1px solid rgba(200,168,75,0.3); }
.badge-paid    { background: var(--green-glow);      color: var(--green); border: 1px solid var(--border2); }
.badge-parsing { background: rgba(68,170,255,0.1);  color: #4af;         border: 1px solid rgba(68,170,255,0.3); }
.badge-done    { background: var(--green-glow);      color: var(--green); border: 1px solid var(--green); }
.badge-error   { background: rgba(255,59,48,0.1);   color: var(--red);   border: 1px solid rgba(255,59,48,0.3); }

/* SHARE ROW */
.share-row { display: flex; gap: 0.75rem; align-items: center; margin-top: 1rem; }
.share-input { flex: 1; background: rgba(0,0,0,0.5); border: 1px solid var(--border); border-radius: 3px; color: var(--text-dim); font-family: var(--mono); font-size: 0.8rem; padding: 0.5rem 0.75rem; }
.share-input:focus { outline: none; border-color: var(--border2); color: var(--text); }

/* HEATMAP */
.heatmap-container { background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; overflow: hidden; }

/* BACK LINK */
.back-link { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text-dim); font-size: 0.88rem; margin-bottom: 1.5rem; transition: color 0.2s; }
.back-link:hover { color: var(--green); text-decoration: none; }

/* WAITING PAGE */
.waiting-center { text-align: center; padding: 3rem 1rem; }
.spinner { width: 48px; height: 48px; border: 2px solid var(--border); border-top-color: var(--green); border-radius: 50%; animation: spin 0.8s linear infinite; margin: 1.5rem auto; box-shadow: 0 0 16px var(--green-glow); }

/* STATUS TEXT */
.status-text { font-family: var(--mono); font-size: 0.9rem; color: var(--green); min-height: 1.4em; }
.status-text::before { content: '> '; color: var(--text-dim); }

/* TERMINAL LOG */
.log-output { background: rgba(0,0,0,0.6); border: 1px solid var(--border); border-radius: 4px; padding: 1rem; font-family: var(--mono); font-size: 0.82rem; color: var(--text-dim); max-height: 220px; overflow-y: auto; line-height: 1.7; }
.log-output .log-ok   { color: var(--green); }
.log-output .log-warn { color: var(--gold); }
.log-output .log-err  { color: var(--red); }

/* PLAYER LIST */
.player-rank { font-family: var(--head); font-size: 1rem; color: var(--text-dim); width: 2.5rem; text-align: center; }
.player-rank.top { color: var(--gold); text-shadow: 0 0 8px var(--gold-glow); }
.player-name { font-family: var(--mono); color: var(--text-bright); font-size: 0.95rem; }
.rating-bar-wrap { width: 120px; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
.rating-bar { height: 100%; background: linear-gradient(90deg, var(--green-dim), var(--green)); box-shadow: 0 0 6px var(--green); }

/* RESPONSIVE */
@media (max-width: 600px) {
  .navbar { padding: 0 1rem; }
  .navbar-brand { font-size: 0.85rem; letter-spacing: 2px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .clutch-grid { grid-template-columns: repeat(3, 1fr); }
  th, td { padding: 0.6rem 0.5rem; }
  .hero h1 { font-size: 1.5rem; letter-spacing: 3px; }
}
