/* CHOPPELGANGER SITE THEME (clean + responsive) */

:root{
  --bg0:#070812;
  --bg1:#0b0d1f;
  --muted: rgba(255,255,255,.74);
  --yellow:#f3d44c;
  --aqua:#33e7ff;
  --pink:#ff6ec7;
  --shadow: 0 24px 70px rgba(0,0,0,.55);
  --radius: 22px;
  --radius2: 16px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
img, canvas, video { max-width:100%; height:auto; display:block; }
/* ✅ Smooth scroll for anchor links */
html {
  scroll-behavior: smooth;
}
/* Offset anchor scroll for sticky header */
section {
  scroll-margin-top: 90px;
}

body{
  margin:0;
  font-family:'Comic Neue',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  color:#fff;
  background:
    radial-gradient(1100px 700px at 50% -120px, rgba(51,231,255,.18), transparent 60%),
    radial-gradient(900px 520px at 10% 20%, rgba(243,212,76,.20), transparent 60%),
    radial-gradient(900px 520px at 90% 28%, rgba(255,110,199,.12), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  overflow-x:hidden;
  -webkit-text-size-adjust: 100%;
}

.grain{
  position:fixed; inset:0;
  pointer-events:none;
  background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1px);
  background-size:3px 3px;
  opacity:.12;
  mix-blend-mode:overlay;
}

a{ color:inherit; text-decoration:none; }
p{ color: var(--muted); line-height:1.7; margin:0 0 12px; }

.container{
  max-width:1100px;
  margin:0 auto;
  padding:0 20px;
}

h1,h2,h3{
  font-family:'Press Start 2P', monospace;
  margin: 0 0 12px;
  line-height:1.3;
}
h2{ font-size:1.25rem; }
h3{ font-size:.9rem; }

.accent{ color: var(--aqua); }
.muted{ color: var(--muted); }
.lead{ font-size:1.12rem; color: rgba(255,255,255,.86); }
.lead.small{ font-size:1.02rem; }
.tiny{ font-size:.88rem; }

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:14px 26px;
  border-radius:999px;
  border:0;
  background: linear-gradient(135deg, var(--yellow), #ffd86b);
  color:#0b0b0f;
  font-weight:900;
  box-shadow:0 10px 0 #000;
  transform:translateY(0);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  cursor:pointer;
}
.btn:hover{ transform:translateY(3px); box-shadow:0 7px 0 #000; filter:saturate(1.08); }
.btn:active{ transform:translateY(6px); box-shadow:0 4px 0 #000; }
.btn.primary{ background: linear-gradient(135deg, var(--pink), var(--yellow)); }
.btn.ghost{
  background: transparent;
  color:#fff;
  border:2px solid rgba(255,255,255,.22);
  box-shadow:none;
}
.btn.small{ padding:10px 16px; box-shadow:0 7px 0 #000; }
.btn.tiny{ padding:8px 12px; font-size:.9rem; box-shadow:0 6px 0 #000; }
.btn.full{ width:100%; }

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  left:0;
  z-index:50;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  background: rgba(0,0,0,.35);
  border-bottom:1px solid rgba(255,255,255,.10);
  -webkit-tap-highlight-color: transparent;
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))){
  .topbar{
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))){
  .topbar{ background: rgba(0,0,0,.85); }
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:'Press Start 2P', monospace;
  font-size:.85rem;
}
.brand-dot{
  width:12px; height:12px;
  border-radius:4px;
  background: linear-gradient(135deg, var(--aqua), var(--yellow));
  box-shadow: 0 0 0 2px rgba(0,0,0,.6);
}
.brand-name{ white-space:nowrap; }
.ticker{
  font-family:'Comic Neue', sans-serif;
  font-weight:900;
  color: var(--yellow);
  margin-left:6px;
}

/* Nav */
.nav{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
.nav a{
  padding:8px 10px;
  border-radius:999px;
  color: rgba(255,255,255,.85);
  font-weight:900;
  position:relative;
  z-index:2;
}
.nav a:hover{ background: rgba(255,255,255,.08); color:#fff; }

.nav-cta a{ position:relative; z-index:2; }

/* Sections */
.section{ padding:70px 0; }
.hero{ padding:70px 0 40px; }

/* Hero layout */
.hero-grid{
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap:26px;
  align-items:start;
  min-width:0;
}

.pill{
  display:inline-block;
  padding:8px 12px;
  border-radius:999px;
  background: rgba(255,255,255,.07);
  border:1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.86);
  font-weight:900;
}

.hero h1{
  margin-top:14px;
  font-size:2rem;
  color: var(--yellow);
  text-shadow:4px 4px 0 #000;
}

.hero-actions{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin:16px 0 14px;
}

/* Contract row */
.contract-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  padding:12px 14px;
  border-radius:16px;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  margin-top:10px;
}
.contract-row .label{ font-weight:900; color: rgba(255,255,255,.9); }
#contractText{
  padding:8px 10px;
  border-radius:12px;
  background: rgba(0,0,0,.35);
  border:1px solid rgba(255,255,255,.12);
  color:#fff;
  word-break:break-all;
}

/* Mini facts */
.mini-facts{
  margin-top:14px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:10px;
  min-width:0;
}
.fact{
  padding:12px 14px;
  border-radius:16px;
  background: rgba(255,255,255,.05);
  border:1px solid rgba(255,255,255,.10);
}
.fact span{ display:block; color: rgba(255,255,255,.75); font-weight:900; }
.fact strong{ display:block; font-size:1.1rem; color:#fff; }

/* Mascot card */
.mascot-card{
  position:relative;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border:2px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.mascot{ width:100%; height:auto; }

/* Cards */
.cards{
  margin-top:18px;
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:14px;
  min-width:0;
}
.card{
  padding:18px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
}
.card p{ margin:0; color: rgba(255,255,255,.78); }

.buy-buttons{
  margin-top:18px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* Chart */
.chart{
  margin-top:18px;
  border-radius: var(--radius);
  overflow:hidden;
  border:2px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  background: rgba(0,0,0,.35);
}
.chart iframe{
  width:100%;
  height:620px;
  border:0;
}

/* Choppelator */
.chop-header{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}
.chop-grid{
  margin-top:16px;
  display:grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap:14px;
  align-items:stretch;
  min-width:0;
}
/* iOS-safe hidden file inputs (label triggers the picker reliably) */
.file-input{
  position:absolute;
  left:-9999px;
  width:1px;
  height:1px;
  opacity:0;
}


/* Dropzones */
.dropzone{
  padding:16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.05);
  border:2px dashed rgba(255,255,255,.28);
  min-height:320px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  text-align:center;
  gap:10px;
}
.drop-title{ color: rgba(255,255,255,.92); }
.drop-sub{ color: rgba(255,255,255,.72); font-weight:900; }

.preview{
  width:100%;
  max-height:260px;
  object-fit: contain;
  border-radius:14px;
  display:none;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
}

/* Controls */
.controls{
  display:flex;
  flex-direction:column;
  gap:14px;
}
.control-card{
  padding:16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
}
.text{
  width:100%;
  padding:12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.35);
  color:#fff;
  font-weight:900;
  margin-bottom:10px;
  outline:none;
}
.text:focus{ border-color: rgba(51,231,255,.45); }
.row{ display:flex; gap:12px; flex-wrap:wrap; }
.check{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:900;
  color: rgba(255,255,255,.82);
}
.divider{ height:1px; background: rgba(255,255,255,.12); margin:12px 0; }

/* Output */
.meme-output{
  margin-top:18px;
  border-radius: var(--radius);
  overflow:hidden;
  border:2px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  background: rgba(0,0,0,.35);
}
#memeCanvas{ width:100%; height:auto; display:block; }

.results-header{
  padding:12px 16px;
  font-family:'Press Start 2P', monospace;
  font-size:.85rem;
  background: rgba(255,255,255,.06);
  border-bottom:1px solid rgba(255,255,255,.12);
  text-align:center;
  color: var(--yellow);
}
/* Hall list (scrollable, newest first) */
.hall-list-wrap{
  margin-top:18px;
  border-radius: var(--radius);
  overflow:hidden;
  border:2px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  background: rgba(0,0,0,.35);
}

.hall-list{
  max-height: 70vh;
  overflow:auto;
  -webkit-overflow-scrolling: touch;
  padding:14px;
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap:14px;
}

.hall-item{
  display:block;
  border-radius:18px;
  overflow:hidden;
  background: rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.12);
  box-shadow: 0 14px 30px rgba(0,0,0,.28);
}

.hall-item img{
  width:100%;
  height:auto;
  display:block;
}

.hall-meta{
  padding:10px 12px 12px;
  color: rgba(255,255,255,.78);
  font-weight:900;
  font-size:.92rem;
}

/* Hall preview uses same component as meme output */
.hall-preview{ margin-top:18px; }
.hall-static{
  width:100%;
  height:auto;
  display:block;
}
.hall-hero-link{
  display:block;
}
.hall-hero-link:hover{
  filter:saturate(1.08);
}
.hall-hero-link:active{
  transform: translateY(2px);
}

/* Footer */
.footer{
  padding:40px 0;
  border-top:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.30);
}
.footer-grid{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  flex-wrap:wrap;
}
.footer-links{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.footer-links a{
  color: rgba(255,255,255,.86);
  font-weight:900;
}
.footer-links a:hover{ color:#fff; text-decoration:underline; }

/* Mobile */
@media (max-width: 980px){
  .hero-grid{ grid-template-columns:1fr; }
  .cards{ grid-template-columns:1fr; }
  .chop-grid{ grid-template-columns:1fr; }
  .chart iframe{ height:520px; }

  /* Keep nav on phones (scrollable) */
  .topbar{
    flex-wrap:wrap;
    gap:10px;
  }
  .nav{
    width:100%;
    display:flex;
    gap:10px;
    overflow:auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom:4px;
  }
  .nav a{ white-space:nowrap; }
}

@media (max-width: 420px){
  .btn{ padding:13px 20px; }
  .topbar{ padding:12px 14px; }
  .brand-name{ display:none; }
}
/* Single meme page (meme.php) */
.meme-view{
  margin-top:18px;
  border-radius: var(--radius);
  overflow:hidden;
  border:2px solid rgba(255,255,255,.14);
  box-shadow: var(--shadow);
  background: rgba(0,0,0,.35);
}

.meme-view img{
  width:100%;
  height:auto;
  display:block;
  -webkit-touch-callout: default; /* allows iOS save menu */
  -webkit-user-select: auto;
  user-select: auto;
}

.meme-actions{
  margin-top:14px;
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}
