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

:root{
  --bg:#000000;
  --panel:rgba(0,0,0,0.60);
  --panel-strong:rgba(6,6,6,0.78);
  --line:rgba(214,179,106,0.26);
  --line-strong:rgba(214,179,106,0.42);
  --gold:#d6b36a;
  --gold-soft:#efd9aa;
  --text:#f3f0e8;
  --muted:rgba(243,240,232,0.72);
  --shadow:0 20px 60px rgba(0,0,0,0.5);
}

html, body {
  width: 100%;
  min-height: 100%;
  background: #000;
}

body {
  position: relative;
  font-family: "Marcellus", "Times New Roman", serif;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--text);
  background: #000;
}

.bg-stage{
  position:fixed;
  inset:0;
  z-index:0;
  overflow:hidden;
  background:#000;
}

.bg-slide{
  position:absolute;
  inset:-4%;
  background-size:cover;
  background-position:center center;
  background-repeat:no-repeat;
  opacity:0;
  filter:blur(18px) grayscale(1) brightness(.30) contrast(1.04);
  transform:scale(1.08);
  animation:fadeCycle 32s infinite;
  will-change:opacity,transform;
}

.bg-slide::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 50% 20%, rgba(255,255,255,.05), transparent 32%),
    linear-gradient(to bottom, rgba(0,0,0,.66), rgba(0,0,0,.84));
}

.bg-slide:nth-child(1){animation-delay:0s}
.bg-slide:nth-child(2){animation-delay:8s}
.bg-slide:nth-child(3){animation-delay:16s}
.bg-slide:nth-child(4){animation-delay:24s}

@keyframes fadeCycle{
  0%{opacity:0;transform:scale(1.08)}
  8%{opacity:.72}
  25%{opacity:.72}
  33%{opacity:0}
  100%{opacity:0}
}

.page-wrap{
  position:relative;
  z-index:2;
  width:min(1200px, calc(100vw - 40px));
  margin:0 auto;
  padding:34px 0 64px;
}

.mast-top{
  height:90px;
  display:flex;
  align-items:flex-end;
  justify-content:center;
}

.nav-shell{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:14px 18px;
  border:1px solid var(--line);
  background:linear-gradient(to bottom, rgba(0,0,0,.76), rgba(10,10,10,.56));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.03);
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
  text-decoration:none;
}

.brand-logo{
  width:56px;
  height:56px;
  border-radius:999px;
  object-fit:cover;
  border:1px solid rgba(214,179,106,.45);
  box-shadow:0 0 0 2px rgba(255,255,255,.03);
  background:#111;
  flex:0 0 auto;
}

.brand-text{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.brand-text .eyebrow{
  color:#b89555;
  font-size:11px;
  letter-spacing:.26em;
  text-transform:uppercase;
}

.brand-text .name{
  color:#f3eee5;
  font-size:19px;
  letter-spacing:.08em;
  text-transform:uppercase;
  white-space:nowrap;
}

.nav-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px 22px;
  align-items:center;
  justify-content:flex-end;
  font-size:15px;
  letter-spacing:.18em;
  text-transform:uppercase;
}

.nav-links a{
  color:var(--gold);
  text-decoration:none;
  position:relative;
  padding:6px 0;
  transition:color .2s ease;
}

.nav-links a::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:1px;
  background:var(--gold);
  transform:scaleX(0);
  transform-origin:left center;
  transition:transform .25s ease;
  opacity:.85;
}

.nav-links a:hover{
  color:var(--gold-soft);
}

.nav-links a:hover::after{
  transform:scaleX(1);
}

.hero {
  position: relative;
  z-index: 2;
  text-align:center;
  padding: 54px 18px 10px;
}

.hero h1 {
  color: #000;
  font-weight: 400;
  font-size: clamp(4rem, 11vw, 8rem);
  line-height: 0.92;
  letter-spacing: 0.05em;
  -webkit-text-stroke: 2px #f0dfb0;
  text-shadow: 0 0 26px rgba(214,179,106,.18), 0 0 70px rgba(0,0,0,.75);
}

.hero .sub{
  margin:18px auto 0;
  width:min(760px, 100%);
  color:var(--muted);
  font-size:15px;
  line-height:1.8;
  letter-spacing:.03em;
}

.chat-shell{
  position:relative;
  z-index:3;
  width:min(1120px, calc(100vw - 40px));
  margin: 26px auto 0;
}

.chat-card{
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,0.04);
  padding: 22px;
}

.chat-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-bottom:18px;
  margin-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,0.08);
  color:var(--muted);
  font-size:14px;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.chat-model{
  display:flex;
  align-items:center;
  gap:10px;
}

.dot{
  width:10px;
  height:10px;
  border-radius:50%;
  background:var(--gold);
  box-shadow:0 0 12px rgba(214,179,106,0.45);
}

.chat-layout{
  display:grid;
  grid-template-columns:280px minmax(0, 1fr);
  gap:22px;
}

.chat-sidebar{
  background: rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.1);
  padding:18px;
}

.sidebar-block + .sidebar-block{
  margin-top:18px;
  padding-top:18px;
  border-top:1px solid rgba(255,255,255,0.08);
}

.sidebar-label{
  color:var(--gold);
  font-size:12px;
  letter-spacing:.18em;
  text-transform:uppercase;
  margin-bottom:8px;
}

.sidebar-value{
  color:var(--text);
  font-size:15px;
  line-height:1.6;
}

.muted{
  color:var(--muted);
}

.feature-list{
  list-style:none;
  display:grid;
  gap:8px;
  color:var(--muted);
  font-size:14px;
  line-height:1.6;
}

.feature-list li{
  position:relative;
  padding-left:14px;
}

.feature-list li::before{
  content:"•";
  position:absolute;
  left:0;
  color:var(--gold);
}

.chat-main{
  display:grid;
  gap:18px;
}

.messages{
  background: rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.1);
  padding:18px;
  min-height:420px;
  display:grid;
  gap:14px;
  align-content:start;
}

.message{
  display:grid;
  gap:6px;
}

.message-role{
  color:rgba(255,255,255,0.65);
  text-transform:uppercase;
  letter-spacing:.10em;
  font-size:12px;
}

.message-bubble{
  width:fit-content;
  max-width:min(100%, 760px);
  padding:14px 16px;
  line-height:1.75;
  font-size:15px;
  border:1px solid rgba(255,255,255,0.1);
}

.message.assistant .message-bubble{
  background:rgba(255,255,255,0.04);
  color:var(--text);
}

.message.user{
  justify-items:end;
}

.message.user .message-bubble{
  background:rgba(214,179,106,0.10);
  border-color:rgba(214,179,106,0.22);
  color:#fff7e7;
}

.composer{
  background: rgba(255,255,255,0.03);
  border:1px solid rgba(255,255,255,0.1);
  padding:16px;
}

.composer textarea{
  width:100%;
  resize:vertical;
  min-height:96px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.42);
  color:var(--text);
  padding:14px;
  outline:none;
  font-family:"Marcellus", "Times New Roman", serif;
  font-size:15px;
  line-height:1.6;
}

.composer textarea:focus{
  border-color:rgba(214,179,106,0.35);
}

.composer-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:12px;
}

.ghost-btn,
.send-btn{
  appearance:none;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(255,255,255,0.05);
  color:var(--text);
  font-family:"Marcellus", "Times New Roman", serif;
  font-size:14px;
  letter-spacing:0.10em;
  text-transform:uppercase;
  padding:11px 16px;
  cursor:pointer;
  transition:background .2s ease, border-color .2s ease, color .2s ease;
}

.send-btn{
  border-color:rgba(214,179,106,0.35);
  background:rgba(214,179,106,0.10);
  color:#fff7e7;
}

.ghost-btn:hover,
.send-btn:hover{
  background:rgba(255,255,255,0.10);
  border-color:rgba(255,255,255,0.28);
}

.send-btn:hover{
  background:rgba(214,179,106,0.18);
  border-color:rgba(214,179,106,0.55);
}

.staking-footer {
  width: 100%;
  text-align: center;
  padding: 40px 0;
}

.staking-footer a {
  font-size: 20px;
  color: #ffffff;
  text-decoration: none;
  letter-spacing: 2px;
  transition: color 0.2s ease;
}

.staking-footer a:hover {
  color: #aaaaaa;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 920px){
  .chat-layout{
    grid-template-columns:1fr;
  }
}

@media (max-width: 640px){
  .page-wrap{
    width:min(100vw - 20px, 1200px);
    padding-top:16px;
  }

  .mast-top{
    height:50px;
  }

  .nav-shell{
    padding:12px 14px;
    gap:16px;
    flex-direction:column;
    align-items:flex-start;
  }

  .nav-links{
    justify-content:flex-start;
    gap:8px 16px;
    font-size:13px;
  }

  .brand-logo{
    width:48px;
    height:48px;
  }

  .brand-text .name{
    font-size:16px;
  }

  .hero{
    padding-top:40px;
  }

  .hero h1{
    font-size: clamp(3.2rem, 15vw, 5.4rem);
    -webkit-text-stroke: 1.5px #f0dfb0;
  }

  .chat-shell{
    width:min(100vw - 20px, 1120px);
  }

  .chat-card{
    padding:14px;
  }

  .chat-topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .messages{
    min-height:320px;
    padding:14px;
  }

  .composer{
    padding:14px;
  }

  .composer-actions{
    justify-content:stretch;
    flex-direction:column;
  }

  .ghost-btn,
  .send-btn{
    width:100%;
  }
}


.composer-meta{
  margin-top:10px;
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:var(--muted);
  font-size:12px;
  letter-spacing:.04em;
}

.messages{
  max-height:62vh;
  overflow-y:auto;
}

.typing-bubble{
  opacity:.75;
  font-style:italic;
}

.chat-state.is-error{
  color:#ffb3b3;
}

.ghost-btn:disabled,
.send-btn:disabled,
.composer textarea:disabled{
  opacity:.68;
  cursor:not-allowed;
}

.message-bubble{
  white-space:pre-wrap;
  word-break:break-word;
}

@media (max-width: 640px){
  .composer-meta{
    flex-direction:column;
    align-items:flex-start;
  }
}
