:root {
  --bg: #07040c;
  --panel: #12081a;
  --discord-bg: #313338;
  --discord-dark: #2b2d31;
  --discord-darker: #1e1f22;
  --discord-sidebar: #2b2d31;
  --discord-servers: #1e1f22;
  --text: #f2f3f5;
  --muted: #b5bac1;
  --green: #23a559;
  --blurple: #5865f2;
  --accent: #b026ff;
  --accent-2: #7c3aed;
  --accent-glow: rgba(176, 38, 255, 0.35);
  --cyan: #22d3ee;
  --danger: #ed4245;
  --gold: #f0b232;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1000px 520px at 12% -8%, rgba(176, 38, 255, 0.28) 0%, transparent 55%),
    radial-gradient(900px 480px at 100% 0%, rgba(34, 211, 238, 0.12) 0%, transparent 45%),
    radial-gradient(700px 400px at 50% 100%, rgba(124, 58, 237, 0.18) 0%, transparent 50%),
    linear-gradient(180deg, #07040c 0%, #12081a 100%);
}

.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 3.5rem;
}

.hero {
  text-align: center;
  margin-bottom: 1.75rem;
  animation: fadeUp 0.7s ease both;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #f5e9ff 10%, #b026ff 55%, #22d3ee 120%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  margin: 0.75rem auto 0;
  max-width: 38rem;
  color: var(--muted);
  line-height: 1.5;
}

.replay {
  margin-top: 1.1rem;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  background: linear-gradient(135deg, #7c3aed, #b026ff 60%, #d946ef);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 28px var(--accent-glow);
}

.replay:hover { transform: translateY(-2px); }

.stage-wrap {
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(176, 38, 255, 0.7), rgba(34, 211, 238, 0.35), rgba(124, 58, 237, 0.45));
  animation: fadeUp 0.8s ease 0.1s both;
}

.discord {
  display: grid;
  grid-template-columns: 72px 230px minmax(0, 1fr) 200px;
  height: 620px;
  min-height: 620px;
  max-height: 620px;
  border-radius: 17px;
  overflow: hidden;
  background: var(--discord-bg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}

.servers,
.channels,
.members {
  min-height: 0;
  overflow: hidden;
}

.servers {
  background: var(--discord-servers);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  padding: 0.9rem 0;
}

.server {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #35373c;
  background-size: cover;
  background-position: center;
  transition: border-radius 0.2s ease, background 0.2s ease;
}

.server.active {
  border-radius: 16px;
  box-shadow: 0 0 0 2px var(--accent);
}

.channels {
  background: var(--discord-sidebar);
  padding: 0.85rem 0.6rem;
  color: var(--muted);
}

.guild-name {
  color: var(--text);
  font-weight: 700;
  padding: 0.35rem 0.55rem 0.9rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  margin-bottom: 0.7rem;
}

.cat {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.55rem 0.55rem 0.25rem;
}

.ch {
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  margin: 0.1rem 0;
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.ch.highlight {
  background: rgba(176, 38, 255, 0.16);
  color: var(--text);
  transform: translateX(2px);
}

.ch.active {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.chat {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--discord-bg);
}

.chat-head {
  flex: 0 0 48px;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  font-weight: 650;
}

.hash { color: var(--muted); }

.step-pill {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #b026ff);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  animation: pulse 1.8s ease infinite;
}

.messages {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem 1rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  scrollbar-width: thin;
  scrollbar-color: #4a1d6b transparent;
}

.msg {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 0.75rem;
  opacity: 0;
  transform: translateY(10px);
  animation: msgIn 0.45s ease forwards;
}

.av-img,
.msg .av {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background-size: cover;
  background-position: center;
  display: block;
}

.msg .av.admin { background-image: url('assets/admin.png'); }
.msg .av.bot { background-image: url('assets/bot.jpg'); }
.msg .av.user { background-image: url('assets/user.jpg?v=2'); }

.meta {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.15rem;
  flex-wrap: wrap;
}

.name { font-weight: 700; }
.name.admin { color: #e879f9; }
.name.bot { color: #c084fc; }
.name.user { color: #f5d0fe; }

.bot-tag {
  font-size: 0.62rem;
  font-weight: 800;
  background: var(--blurple);
  color: white;
  border-radius: 4px;
  padding: 0.1rem 0.3rem;
}
.time { color: var(--muted); font-size: 0.72rem; }

.slash {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  background: #2b2d31;
  border: 1px solid #1e1f22;
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
  margin-top: 0.2rem;
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88rem;
}

.slash b { color: var(--accent); }
.slash span { color: #ddd6fe; }

.panel {
  margin-top: 0.35rem;
  border-left: 4px solid var(--accent);
  background: #2b2d31;
  border-radius: 8px;
  padding: 0.85rem 0.95rem;
  max-width: 460px;
  animation: panelPop 0.5s ease both;
  box-shadow: inset 0 0 0 1px rgba(176, 38, 255, 0.08);
}

.panel h4 {
  margin: 0 0 0.45rem;
  font-size: 1.05rem;
}

.panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.panel .row {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.btn {
  border: 0;
  border-radius: 4px;
  padding: 0.4rem 0.7rem;
  font-weight: 650;
  font-size: 0.82rem;
  color: white;
}

.btn.primary { background: var(--accent); }
.btn.success { background: var(--accent-2); }
.btn.danger { background: var(--danger); }
.btn.cyan { background: #0891b2; }

.composer {
  flex: 0 0 auto;
  padding: 0.75rem 1rem 1rem;
}

.composer-box {
  background: #383a40;
  border-radius: 8px;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 0.9rem;
  color: var(--muted);
}

.composer-box.typing .ghost {
  color: var(--text);
}

.members {
  background: var(--discord-sidebar);
  padding: 1rem 0.75rem;
  color: var(--muted);
}

.m-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.member {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.45rem 0;
  color: var(--text);
  font-size: 0.88rem;
}

.member .av-img {
  width: 32px;
  height: 32px;
}

.cta-row {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1rem;
  animation: fadeUp 0.75s ease 0.2s both;
}

.cta {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  min-height: 140px;
  padding: 1.45rem 1.5rem;
  border-radius: 18px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  z-index: 0;
}

.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(500px 180px at 10% 0%, rgba(255, 255, 255, 0.16), transparent 60%);
  pointer-events: none;
}

.cta:hover {
  transform: translateY(-4px) scale(1.01);
}

.cta-buy {
  background: linear-gradient(135deg, #5b21b6 0%, #b026ff 55%, #d946ef 100%);
  box-shadow: 0 16px 40px rgba(176, 38, 255, 0.35);
}

.cta-buy:hover {
  box-shadow: 0 22px 50px rgba(176, 38, 255, 0.5);
  border-color: rgba(255, 255, 255, 0.28);
}

.cta-discord {
  flex-direction: row;
  align-items: center;
  gap: 1.15rem;
  background: linear-gradient(135deg, #2b2d31 0%, #3b3480 45%, #5865f2 100%);
  box-shadow: 0 16px 40px rgba(88, 101, 242, 0.28);
}

.cta-discord:hover {
  box-shadow: 0 22px 50px rgba(88, 101, 242, 0.42);
  border-color: rgba(255, 255, 255, 0.28);
}

.cta-discord-logo {
  position: relative;
  z-index: 1;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.cta-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.cta-kicker {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
}

.cta-title {
  position: relative;
  z-index: 1;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.cta-sub {
  position: relative;
  z-index: 1;
  font-size: 0.95rem;
  opacity: 0.88;
}

.features {
  margin-top: 1.75rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.features article {
  background: rgba(18, 8, 26, 0.88);
  border: 1px solid rgba(176, 38, 255, 0.18);
  border-radius: 14px;
  padding: 1.1rem 1.15rem;
  animation: fadeUp 0.7s ease both;
}

.features article:nth-child(2) { animation-delay: 0.08s; }
.features article:nth-child(3) { animation-delay: 0.16s; }

.features h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  color: #e9d5ff;
}

.features p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes msgIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes panelPop {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.18); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (max-width: 980px) {
  .discord {
    grid-template-columns: 64px 180px minmax(0, 1fr);
  }
  .members { display: none; }
  .features { grid-template-columns: 1fr; }
  .cta-row { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .discord {
    grid-template-columns: 1fr;
    min-height: 560px;
  }
  .servers, .channels { display: none; }
  .discord {
    height: 560px;
    min-height: 560px;
    max-height: 560px;
  }
  .cta-discord {
    flex-direction: row;
  }
}
