:root {
  --bg: #110f0b;
  --bg-surface: #1a1712;
  --bg-card: #1e1b15;
  --bg-card-hover: #262219;
  --border: #2e2920;
  --border-hover: #3e3728;
  --text-primary: #e8dcc8;
  --text-secondary: #b09a78;
  --text-muted: #6e5f48;
  --accent: #c89b5f;
  --accent-warm: #d4a76a;
  --accent-dim: rgba(200, 155, 95, 0.08);
  --mono: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
  --serif: 'Libre Baskerville', 'Georgia', serif;
  --sans: 'IBM Plex Sans', -apple-system, sans-serif;
}

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

html {
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  position: relative;
  overflow-x: hidden;
}

/* Warm ambient glow from top */
body::before {
  content: '';
  position: fixed;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(ellipse, rgba(200, 155, 95, 0.06) 0%, rgba(160, 110, 50, 0.02) 40%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Secondary warm glow from bottom */
body::after {
  content: '';
  position: fixed;
  bottom: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(ellipse, rgba(180, 120, 50, 0.03) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Subtle noise texture overlay */
.noise {
  position: fixed;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  pointer-events: none;
  z-index: 0;
}

.container {
  max-width: 680px;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ---- OUTER PANEL (warm bordered surface) ---- */
.panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg-surface);
  padding: 1.4rem 2rem 1.4rem;
  box-shadow:
    0 1px 3px rgba(0,0,0,0.3),
    inset 0 1px 0 rgba(200, 155, 95, 0.04);
}

/* ---- HEADER ---- */
.header {
  text-align: center;
  margin-bottom: 1.3rem;
  animation: fadeIn 0.6s ease-out both;
}

.site-title {
  font-family: var(--serif);
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.15;
}

.site-title .title-highlight {
  color: var(--accent-warm);
}

.site-subtitle {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

.site-subtitle .bracket {
  color: var(--accent);
  opacity: 0.7;
}

.site-subtitle .matrix-text {
  color: var(--accent-warm);
}

/* Thin decorative rule */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  margin: 0 auto 1.3rem;
  max-width: 80%;
  animation: fadeIn 0.6s ease-out 0.1s both;
}

/* ---- SERVER BADGE ---- */
.server-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.15rem 0.5rem;
  display: inline-block;
  margin-bottom: 1rem;
  animation: fadeIn 0.6s ease-out 0.1s both;
}

.server-badge-key {
  color: var(--accent);
  opacity: 0.6;
}

/* ---- STEPS ---- */
.step {
  margin-bottom: 1.2rem;
}

.step:last-of-type {
  margin-bottom: 0;
}

.step-label {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
  animation: fadeIn 0.6s ease-out 0.15s both;
}

.step-number {
  color: var(--accent);
}

.step-instruction {
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  animation: fadeIn 0.6s ease-out 0.18s both;
}

/* ---- CARDS ---- */
.cards {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 0;
}

.card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2), 0 0 0 1px rgba(200, 155, 95, 0.05);
}

.card:hover::before {
  opacity: 1;
}

.card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(3px);
}

.card:hover .card-icon {
  color: var(--accent);
}

.card:nth-child(1) { animation: slideUp 0.5s ease-out 0.2s both; }
.card:nth-child(2) { animation: slideUp 0.5s ease-out 0.28s both; }
.card:nth-child(3) { animation: slideUp 0.5s ease-out 0.36s both; }
.card:nth-child(4) { animation: slideUp 0.5s ease-out 0.44s both; }
.card:nth-child(5) { animation: slideUp 0.5s ease-out 0.52s both; }

.card-icon {
  font-size: 1.2rem;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 2rem;
  text-align: center;
  transition: color 0.25s ease;
  position: relative;
  z-index: 1;
}

.card-icon-img {
  width: 1.4rem;
  height: 1.4rem;
  object-fit: contain;
  border-radius: 3px;
  display: block;
  margin: 0 auto;
}

.card-body {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.card-title {
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 3px;
  line-height: 1.35;
}

.card-desc {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.card-note {
  font-family: var(--sans);
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-style: italic;
  opacity: 0.7;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.6em;
}

.card-meta .meta-sep {
  color: var(--border-hover);
  font-size: 0.6rem;
}

.card-arrow {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--text-muted);
  flex-shrink: 0;
  transition: all 0.25s ease;
  position: relative;
  z-index: 1;
}

/* ---- DESKTOP DOWNLOADS ---- */
.desktop-downloads {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 0.4rem;
  flex-wrap: wrap;
}

.desktop-dl-intro {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
  flex-shrink: 0;
}

.desktop-dl-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.desktop-dl-link {
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 0.25rem 0.6rem;
  text-decoration: none;
  transition: all 0.2s ease;
}

.desktop-dl-link:hover {
  color: var(--accent);
  border-color: var(--border-hover);
}

/* ---- REGISTRATION NOTE ---- */
.reg-note {
  margin-bottom: 1rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  animation: fadeIn 0.6s ease-out 0.1s both;
}

.reg-note-title {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.reg-note-body {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ---- ENCRYPTION NOTE ---- */
.encryption-note {
  margin-top: 0.9rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 8px;
  animation: fadeIn 0.6s ease-out 0.5s both;
}

.encryption-note-title {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.encryption-note-body {
  font-family: var(--sans);
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- FOOTER ---- */
.footer {
  text-align: center;
  margin-top: 0.8rem;
  animation: fadeIn 0.6s ease-out 0.55s both;
}

.footer-abuse {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.footer-abuse a {
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 1px solid rgba(176, 154, 120, 0.25);
  transition: all 0.2s ease;
}

.footer-abuse a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.footer-tagline {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--text-muted);
  letter-spacing: 0.18em;
  text-transform: lowercase;
  opacity: 0.6;
}

.footer-tagline .sep {
  display: inline-block;
  margin: 0 0.5em;
  opacity: 0.4;
}

.pulse-heart {
  display: inline-block;
  color: var(--accent);
  margin-right: 0.35em;
  font-size: 0.75rem;
  animation: heartbeat 3s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.3); opacity: 1; }
}

/* ---- ANIMATIONS ---- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---- THEME TOGGLES ---- */
.theme-toggles {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.theme-toggle {
  width: 0.9rem;
  height: 0.9rem;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.theme-toggle:hover {
  transform: scale(1.25);
}

.theme-toggle.active {
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px currentColor;
}

.theme-toggle[data-theme="amber"]  { background: #c89b5f; color: #c89b5f; }
.theme-toggle[data-theme="green"]  { background: #5fc88a; color: #5fc88a; }
.theme-toggle[data-theme="blue"]   { background: #5f9bc8; color: #5f9bc8; }
.theme-toggle[data-theme="purple"] { background: #9b5fc8; color: #9b5fc8; }
.theme-toggle[data-theme="yellow"] { background: #c8c05f; color: #c8c05f; }
.theme-toggle[data-theme="pink"]   { background: #FFC5D3; color: #FFC5D3; }
.theme-toggle[data-theme="red"]    { background: #c84040; color: #c84040; }

/* ---- RESPONSIVE ---- */
@media (max-width: 560px) {
  .panel {
    padding: 2rem 1.3rem 1.5rem;
  }

  .site-title {
    font-size: 1.9rem;
  }

  .card {
    padding: 0.9rem 1rem;
    gap: 0.8rem;
  }

  .card-icon {
    font-size: 1.05rem;
    width: 1.6rem;
  }
}
