/* ═══════════════════════════════════════════
   ModVault – Shared Stylesheet
   ═══════════════════════════════════════════ */

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

/* Global image performance */
img { max-width:100%; height:auto; display:block; }

/* Remove 300ms tap delay on all interactive elements */
button, [role="button"], .game-card {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
/* Cards are now <div> — restore pointer cursor */
.game-card { cursor: pointer; }
picture { display:block; }
/* Hero logo box on game pages */
.hero-logo-box picture { width:100%; height:100%; }
.hero-logo-box img { width:100%; height:100%; object-fit:contain; }

:root {
  --bg:        #0c0a08;
  --surface:   #141210;
  --card:      #1a1714;
  --card-hi:   #201d19;
  --border:    #2a2520;
  --border-hi: #3d3830;
  --accent:    #f59e0b;
  --accent2:   #fbbf24;
  --accent3:   #fd7e14;
  --red:       #ef4444;
  --green:     #22c55e;
  --blue:      #3b82f6;
  --text:      #f0ece6;
  --text2:     #c4bdb4;
  --muted:     #7a726a;
  --radius:    12px;
  --max-w:     1240px;
}

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(12,10,8,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(145deg, #f59e0b, #d97706);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(245,158,11,.35);
}

.logo-mark svg { width:18px; height:18px; fill:#0c0a08; }

.logo-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text);
}

.logo-name em { font-style:normal; color:var(--accent2); }

/* search */
.search-wrap {
  position: relative;
  flex: 1;
  max-width: 360px;
  margin-left: auto;
}

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px 8px 34px;
  color: var(--text);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.search-input::placeholder { color: var(--muted); }
.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}

.live-pill {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.18);
  border-radius: 20px;
  padding: 3px 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: blink 1.8s ease-in-out infinite;
}

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:.25} }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 20px;
  margin-top: 60px;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-copy { font-size: 11px; color: var(--muted); }
.footer-links { display:flex; gap:18px; }
.footer-links a {
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.footer-links a:hover { color: var(--text2); }

/* ── Download Progress Overlay ── */
.terminal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 400;
  background: rgba(0,0,0,.92);
  align-items: center;
  justify-content: center;
  padding: 20px;
  /* backdrop-filter is GPU-heavy on low-end mobile — skip it */
}

.terminal-overlay.show { display:flex; animation:fadeIn .22s ease; }

@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.terminal-box {
  background: #0f0f0f;
  border: 1px solid rgba(0,255,136,.18);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 32px 28px 28px;
  box-shadow: 0 0 40px rgba(0,255,136,.08), 0 8px 40px rgba(0,0,0,.6);
  animation: popIn .28s cubic-bezier(.34,1.4,.64,1);
}

@keyframes popIn {
  from { opacity:0; transform:scale(.93) translateY(18px); }
  to   { opacity:1; transform:scale(1)   translateY(0); }
}

/* icon + status text */
.dl-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,255,136,.08);
  border: 1px solid rgba(0,255,136,.2);
  border-radius: 14px;
}

.dl-icon svg { width:26px; height:26px; fill:none; stroke:#00ff88; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }

.dl-status {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #e0e0e0;
  letter-spacing: .3px;
  margin-bottom: 20px;
  min-height: 20px;
  transition: opacity .3s ease;
}

/* track */
.dl-track {
  width: 100%;
  height: 8px;
  background: rgba(255,255,255,.07);
  border-radius: 99px;
  overflow: hidden;
  position: relative;
  margin-bottom: 10px;
}

/* fill */
.dl-fill {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #00c875, #00ff88);
  box-shadow: 0 0 12px #00ff8899, 0 0 24px #00ff8844;
  transition: width .18s linear;
  position: relative;
}

/* shimmer on fill */
.dl-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.28) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  from { background-position: -200% 0; }
  to   { background-position:  200% 0; }
}

.dl-pct {
  text-align: right;
  font-size: 12px;
  font-weight: 700;
  color: #00ff88;
  letter-spacing: .5px;
}

/* ── Shared button ── */
.btn-dl {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 12px 22px;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  border: none;
  border-radius: 10px;
  color: #0c0a08;
  font-size: 14px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: .2px;
  transition: filter .15s, transform .1s, box-shadow .15s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 10px rgba(245,158,11,.3);
  text-decoration: none;
}

.btn-dl::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.15) 50%, transparent 100%);
  transform: translateX(-100%);
  transition: transform .45s ease;
}

.btn-dl:hover { filter:brightness(1.1); box-shadow:0 5px 18px rgba(245,158,11,.45); }
.btn-dl:hover::after { transform:translateX(100%); }
.btn-dl:active { transform:scale(.97); }
.btn-dl svg { width:15px; height:15px; fill:#0c0a08; flex-shrink:0; }

/* pulse animation on CTA */
@keyframes ctaPulse {
  0%,100% { box-shadow:0 3px 10px rgba(245,158,11,.3); }
  50%      { box-shadow:0 5px 24px rgba(245,158,11,.6); }
}

.btn-dl.pulse { animation: ctaPulse 2s ease-in-out infinite; }

/* ── Trust badges ── */
.trust-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 10px;
  letter-spacing: .3px;
}

.badge-green  { background:rgba(34,197,94,.1);  color:#22c55e; border:1px solid rgba(34,197,94,.2); }
.badge-amber  { background:rgba(245,158,11,.1); color:#f59e0b; border:1px solid rgba(245,158,11,.2); }
.badge-blue   { background:rgba(59,130,246,.1); color:#3b82f6; border:1px solid rgba(59,130,246,.2); }
.badge-red    { background:rgba(239,68,68,.1);  color:#ef4444; border:1px solid rgba(239,68,68,.2); }

.badge svg { width:11px; height:11px; fill:currentColor; }

/* ── Scroll fade-in ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .5s ease, transform .5s ease;
}
.reveal.visible { opacity:1; transform:translateY(0); }

/* ── Responsive helpers ── */
@media (max-width:600px) {
  .live-pill { display:none; }
  .search-wrap { max-width:100%; }

  /* ── Progress bar popup on mobile ── */
  .terminal-overlay { padding: 16px; align-items: flex-end; padding-bottom: 24px; }
  .terminal-box {
    padding: 24px 20px 20px;
    border-radius: 14px;
    /* slide up from bottom on mobile — feels more native */
    animation: slideUp .28s cubic-bezier(.34,1.4,.64,1);
  }
  @keyframes slideUp {
    from { opacity:0; transform:translateY(40px); }
    to   { opacity:1; transform:translateY(0); }
  }
  .dl-icon { width:44px; height:44px; margin-bottom:16px; border-radius:12px; }
  .dl-icon svg { width:22px; height:22px; }
  .dl-status { font-size:13px; margin-bottom:16px; }
  .dl-track { height:10px; margin-bottom:8px; }
  .dl-pct { font-size:13px; }
}
