:root{
  --bg:#07080b;
  --text:#e9eaf2;
  --muted:#a9afc3;
  --line:rgba(255,255,255,.10);
  --shadow: 0 20px 60px rgba(0,0,0,.55);
  --radius: 22px;
  --radius2: 32px;
  --accent:#7c5cff;
  --accent2:#2de2e6;
  --danger:#ff4d6d;

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

*{ box-sizing:border-box; }
html, body{ height:100%; }

body{
  margin:0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(1200px 900px at 20% 10%, rgba(124,92,255,.18), transparent 60%),
    radial-gradient(900px 700px at 80% 20%, rgba(45,226,230,.12), transparent 55%),
    radial-gradient(900px 700px at 40% 90%, rgba(255,77,109,.10), transparent 55%),
    var(--bg);
  overflow-x:hidden;
}

/* subtle noise overlay */
.noise{
  pointer-events:none;
  position:fixed;
  inset:0;
  opacity:.08;
  mix-blend-mode:overlay;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

/* ================= ENTER / COVER PAGE ================= */

.enter{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(0,0,0,.82);
  backdrop-filter: blur(14px);
  z-index:999;
}

.enter-card{
  width:min(820px, 96%);
  border-radius: 36px;
  border:1px solid rgba(255,255,255,.18);
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  padding:22px 22px 26px;
  text-align:center;
}

/* BIG cover image */
.enter-cover{
  border-radius: 32px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.25);
  margin-bottom:18px;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.02),
    0 30px 80px rgba(0,0,0,.55);
}
.enter-cover img{
  width:100%;
  height: 770px;
object-fit: contain;
  display:block;
}

.enter-title{
  font-size:42px;
  letter-spacing:-.04em;
  margin:14px 0 8px;
  line-height:1.05;
  text-shadow:
    0 12px 30px rgba(0,0,0,.55),
    0 2px 0 rgba(0,0,0,.35);
}

.enter-sub{
  color: rgba(233,234,242,.80);
  font-size:14px;
  letter-spacing:.12em;
  text-transform:uppercase;
  margin-bottom:18px;
}

.enter-btn{
  padding:14px 22px;
  border-radius: 18px;
  font-size:15px;
}

.enter-hint{
  margin-top:18px;
  font-size:12px;
  color: rgba(233,234,242,.60);
}

/* ================= HEADER ================= */

.top{
  position:sticky;
  top:0;
  z-index:50;
  backdrop-filter: blur(10px);
  background: linear-gradient(to bottom, rgba(7,8,11,.9), rgba(7,8,11,.35));
  border-bottom:1px solid var(--line);
}

.top-inner{
  max-width:1100px;
  margin:0 auto;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
}
.logo{
  width:36px;
  height:36px;
  border-radius:10px;
  background: url("images/logo.png") center / contain no-repeat;
}

.brand-text .name{
  font-size:14px;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.brand-text .sub{
  font-size:12px;
  color: var(--muted);
}

/* ================= HUD ================= */

.hud{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.pill{
  font-family: var(--mono);
  font-size:12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.18);
  padding:8px 10px;
  border-radius:999px;
}

.kbd{
  font-family: var(--mono);
  font-size:11px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.16);
  padding:3px 6px;
  border-radius:8px;
}

.tiny{
  font-size:12px;
  color: var(--muted);
}

/* X logo */
.xlink{
  display:inline-grid;
  place-items:center;
  width:36px;
  height:36px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  transition: transform .12s ease, background .12s ease;
}
.xlink:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,.08);
}
.xlogo{
  width:18px;
  height:18px;
  fill: currentColor;
  color: rgba(233,234,242,.9);
}

/* Contract pill */
.contract{
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  font-family: var(--mono);
  font-size:11px;
  cursor:pointer;
}
.contract:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(124,92,255,.45);
}
.contract .address{
  max-width:140px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.contract.copied{
  border-color: rgba(45,226,230,.7);
  box-shadow: 0 0 0 6px rgba(45,226,230,.15);
}

/* ================= BOOK / PAGE ================= */

.book{
  max-width:1100px;
  margin:0 auto;
  padding:18px 18px 46px;
}

.page{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
  overflow:hidden;
}

.page-inner{
  display:grid;
  grid-template-columns: 1fr 1fr;
  min-height:640px;
}
@media (max-width: 980px){
  .page-inner{ grid-template-columns:1fr; }
}

.page-left{
  padding:22px;
  border-right:1px solid rgba(255,255,255,.10);
}

.meta .kicker{
  font-family: var(--mono);
  font-size:12px;
  letter-spacing:.08em;
  color: rgba(233,234,242,.7);
}
.meta .title{
  font-size:30px;
  margin:6px 0;
}
.meta .subtitle{
  color: var(--muted);
  max-width:60ch;
}

/* story text */
.story{
  margin-top:18px;
  padding:16px;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
}
.story p{
  margin:0 0 12px;
  line-height:1.6;
}

/* ================= ART + CHAT ================= */

.page-right{
  padding:22px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.art{
  border-radius: var(--radius2);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
}
.art img{
  width:100%;
  height:380px;
  object-fit:cover;
}
.caption{
  padding:12px;
  font-size:12px;
  color: rgba(233,234,242,.7);
}

/* chat BELOW image */
.chatbox{
  border-radius:18px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.35);
}
.chathead{
  display:flex;
  justify-content:space-between;
  padding:10px 12px;
  font-family: var(--mono);
  font-size:12px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.chatlog{
  max-height:240px;
  overflow:auto;
  padding:10px;
}

.msg{
  padding:9px 10px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  margin-bottom:8px;
}
.msg.dev{ border-color: rgba(45,226,230,.25); }
.msg.hype{ border-color: rgba(255,77,109,.35); }

/* ================= DOTS ================= */

.dots{
  display:flex;
  justify-content:center;
  gap:8px;
  padding:16px;
}
.dot{
  width:10px;
  height:10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.10);
}
.dot.active{
  background: linear-gradient(135deg, var(--accent), var(--accent2));
}

/* ================= BUTTONS ================= */

.btn{
  appearance:none;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color: var(--text);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  font-weight:800;
}
.btn.primary{
  background: linear-gradient(135deg, rgba(124,92,255,.35), rgba(45,226,230,.14));
}
.btn:hover{ background: rgba(255,255,255,.08); }

/* ================= OFFLINE PAGE ================= */

.page.offline-page{
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
}
.offline-note{
  margin-top:18px;
  padding:16px;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.30);
}
.bar{
  margin-top:12px;
  width:220px;
  height:8px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
}
.bar i{
  display:block;
  width:36%;
  height:100%;
  background: linear-gradient(90deg, var(--danger), var(--accent), var(--accent2));
  animation: load 1.2s linear infinite;
}
@keyframes load{
  0%{ transform:translateX(-120%); }
  100%{ transform:translateX(320%); }
}