/* ===== CoreX Scripts — Pure Black Space + Clear Glass ===== */
:root {
  --bg-deep: #000000;
  --bg-space: #050505;
  --accent: #ffffff;
  --accent-dim: #a0a0a0;
  --accent-glow: rgba(255, 255, 255, 0.15);
  --text: #f0f0f0;
  --text-muted: #888888;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-highlight: rgba(255, 255, 255, 0.06);
  --success: #4ade80;
  --danger: #f87171;
  --discord: #5865F2;
  --radius: 14px;
  --font-display: 'Orbitron', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== Pure Black Space Background ===== */
.space-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #000000;
}

.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20px 30px, #fff, transparent),
    radial-gradient(1px 1px at 40px 70px, rgba(255,255,255,0.7), transparent),
    radial-gradient(1.5px 1.5px at 90px 40px, #fff, transparent),
    radial-gradient(1px 1px at 130px 80px, rgba(255,255,255,0.5), transparent),
    radial-gradient(1px 1px at 160px 120px, #fff, transparent),
    radial-gradient(1px 1px at 50px 160px, rgba(255,255,255,0.6), transparent),
    radial-gradient(1.5px 1.5px at 200px 50px, #fff, transparent);
  background-size: 220px 220px;
  animation: drift 140s linear infinite;
  opacity: 0.85;
}

.stars::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 60px 40px, #fff, transparent),
    radial-gradient(1.5px 1.5px at 120px 140px, rgba(255,255,255,0.9), transparent),
    radial-gradient(1px 1px at 180px 90px, #fff, transparent),
    radial-gradient(1px 1px at 30px 180px, rgba(255,255,255,0.5), transparent);
  background-size: 280px 280px;
  animation: drift 200s linear infinite reverse;
}

.nebula {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 30% at 75% 15%, rgba(255, 255, 255, 0.03), transparent),
    radial-gradient(ellipse 40% 40% at 15% 75%, rgba(255, 255, 255, 0.02), transparent);
  pointer-events: none;
}

@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(-220px); }
}

/* ===== Clear Glass ===== */
.glass, .glass-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ===== Navbar ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-top: none;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--text);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.04em;
}

.logo-icon {
  color: #fff;
  font-size: 1.35rem;
  opacity: 0.9;
}

.logo .accent {
  color: #ccc;
  font-weight: 500;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-discord {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(255, 255, 255, 0.04);
  color: #ddd;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.82rem;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s, color 0.15s;
  font-family: var(--font-body);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.btn-discord:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #fff;
  transform: translateY(-1px);
}

.btn-discord svg {
  width: 15px;
  height: 15px;
  opacity: 0.85;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.35rem 0.75rem 0.35rem 0.4rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #222;
  border: 1px solid rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.user-name {
  font-weight: 600;
  font-size: 0.85rem;
}

.user-badge {
  font-size: 0.7rem;
  color: #aaa;
  font-weight: 500;
}

.user-badge.admin {
  color: #4ade80;
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-muted);
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-logout:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.25);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s, border-color 0.15s;
  font-family: var(--font-body);
}

.btn-primary {
  background: #fff;
  color: #000;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.15);
  background: #f0f0f0;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-admin {
  background: rgba(74, 222, 128, 0.12);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.25);
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
}

.btn-admin:hover {
  background: rgba(74, 222, 128, 0.2);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.2);
}

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
}

.hero-content {
  padding: 3rem 2.5rem;
  border-radius: var(--radius);
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.06);
  color: #ccc;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  color: #fff;
}

.gradient-text {
  color: #fff;
  opacity: 0.85;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.section-header p {
  color: var(--text-muted);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.feature-card {
  padding: 1.75rem;
  border-radius: var(--radius);
  transition: transform 0.2s, border-color 0.2s, background 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
}

.feature-icon {
  font-size: 1.8rem;
  margin-bottom: 0.9rem;
  opacity: 0.9;
}

.feature-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #fff;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.product-card {
  padding: 1.5rem;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
}

.product-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #bbb;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  width: fit-content;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.product-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.product-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: 1rem;
}

.product-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.price {
  font-weight: 700;
  color: #fff;
  font-family: var(--font-display);
}

.cta-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.cta-panel {
  padding: 3rem 2rem;
  border-radius: var(--radius);
  text-align: center;
}

.cta-panel h2 {
  font-family: var(--font-display);
  font-size: 1.7rem;
  margin-bottom: 0.75rem;
  color: #fff;
}

.cta-panel p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.footer {
  border-radius: 0;
  border-left: none;
  border-right: none;
  border-bottom: none;
  margin-top: 2rem;
  background: rgba(0, 0, 0, 0.6);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: #fff;
}

.docs-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  max-width: 1280px;
  margin: 0 auto;
  min-height: calc(100vh - 70px);
}

.docs-sidebar {
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  padding: 1.5rem 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.4);
}

.docs-sidebar h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #666;
  margin: 1.25rem 0 0.5rem;
  padding: 0 0.5rem;
}

.docs-sidebar h3:first-child {
  margin-top: 0;
}

.docs-nav-item {
  display: block;
  padding: 0.45rem 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.92rem;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-body);
}

.docs-nav-item:hover,
.docs-nav-item.active {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.docs-content {
  padding: 2rem 2.5rem 4rem;
  max-width: 800px;
}

.docs-content h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: #fff;
}

.docs-content .docs-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

.docs-content h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
  padding-top: 0.5rem;
  color: #fff;
}

.docs-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
  color: #eee;
}

.docs-content p {
  margin-bottom: 1rem;
  color: #b0b0b0;
}

.docs-content ul, .docs-content ol {
  margin: 0 0 1rem 1.25rem;
  color: #b0b0b0;
}

.docs-content li {
  margin-bottom: 0.35rem;
}

.docs-content code {
  background: rgba(255, 255, 255, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  color: #ddd;
}

.docs-content pre {
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
}

.docs-content pre code {
  background: none;
  padding: 0;
}

.changelog-entry {
  border-left: 2px solid rgba(255, 255, 255, 0.25);
  padding-left: 1rem;
  margin-bottom: 1.5rem;
}

.changelog-entry .version {
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
}

.changelog-entry .date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  background: rgba(74, 222, 128, 0.06);
  border: 1px solid rgba(74, 222, 128, 0.15);
  border-radius: 10px;
}

.admin-bar.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  width: min(560px, 92vw);
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.75rem;
  border-radius: var(--radius);
  position: relative;
  background: rgba(12, 12, 12, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: #fff;
}

.modal-content h2 {
  font-family: var(--font-display);
  margin-bottom: 1rem;
  color: #fff;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.25rem;
}

.auth-status {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.auth-status.error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.25);
  color: #fca5a5;
}

.auth-status.info {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ccc;
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: relative;
    top: 0;
    height: auto;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .hero-content {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 500px) {
  .hero-stats {
    gap: 1.5rem;
  }
}

/* ===== Shooting stars ===== */
.shooting-star {
  position: absolute;
  width: 80px;
  height: 1.5px;
  background: linear-gradient(90deg, rgba(255,255,255,0.9), transparent);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
  transform: rotate(-35deg);
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.6));
}

.shooting-star::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 8px 2px rgba(255,255,255,0.8);
}

@keyframes shoot {
  0% {
    opacity: 0;
    transform: rotate(-35deg) translateX(0);
  }
  5% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(-35deg) translateX(400px);
  }
}

/* ===== Custom cursor ===== */
body.custom-cursor,
body.custom-cursor * {
  cursor: none !important;
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px 1px rgba(255,255,255,0.7);
  mix-blend-mode: difference;
  transition: width 0.15s, height 0.15s, background 0.15s;
}

.cursor-dot.hover {
  width: 10px;
  height: 10px;
  background: #fff;
  box-shadow: 0 0 10px 2px rgba(255,255,255,0.85);
}

.cursor-trail {
  position: fixed;
  top: 0;
  left: 0;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* Hide custom cursor on touch devices */
@media (hover: none), (pointer: coarse) {
  body.custom-cursor,
  body.custom-cursor * {
    cursor: auto !important;
  }
  .cursor-dot,
  .cursor-trail {
    display: none !important;
  }
}


/* Star sparkle */
@keyframes twinkle {
  0%, 100% {
    opacity: 0.35;
    transform: scale(1);
    box-shadow: 0 0 2px rgba(255,255,255,0.4);
  }
  50% {
    opacity: 1;
    transform: scale(1.35);
    box-shadow: 0 0 8px 2px rgba(255,255,255,0.75);
  }
}

/* ===== Mind-blow layer ===== */

/* Glass panels catch a moving light */
.glass-panel,
.feature-card,
.product-card,
.cta-panel,
.hero-content {
  position: relative;
  overflow: hidden;
  --mx: 50%;
  --my: 50%;
}

.glass-panel::after,
.feature-card::after,
.cta-panel::after,
.hero-content::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    600px circle at var(--mx) var(--my),
    rgba(255, 255, 255, 0.07),
    transparent 40%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  z-index: 1;
}

.glass-panel:hover::after,
.feature-card:hover::after,
.cta-panel:hover::after,
.hero-content:hover::after {
  opacity: 1;
}

/* Keep content above the light layer */
.glass-panel > *,
.feature-card > *,
.cta-panel > *,
.hero-content > * {
  position: relative;
  z-index: 2;
}

/* Magnetic button subtle lift */
.btn {
  will-change: transform;
  transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.2s ease,
              background 0.15s,
              border-color 0.15s,
              color 0.15s;
}

/* Parallax layers */
.space-bg .stars {
  will-change: transform;
}
.space-bg .nebula {
  will-change: transform;
}

/* Constellation canvas */
#constellation {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* Hero entrance */
.hero-content {
  animation: heroIn 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Stagger feature cards */
.feature-card {
  animation: cardIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.feature-card:nth-child(1) { animation-delay: 0.05s; }
.feature-card:nth-child(2) { animation-delay: 0.12s; }
.feature-card:nth-child(3) { animation-delay: 0.19s; }
.feature-card:nth-child(4) { animation-delay: 0.26s; }
.feature-card:nth-child(5) { animation-delay: 0.33s; }
.feature-card:nth-child(6) { animation-delay: 0.40s; }

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

/* Logo subtle pulse glow */
.logo-icon {
  animation: logoPulse 4s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% {
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.25));
    opacity: 0.9;
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(255,255,255,0.55));
    opacity: 1;
  }
}

/* Scroll reveal utility */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Improved docs editor ===== */
.docs-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
  flex-wrap: wrap;
}

.docs-page-actions {
  flex-shrink: 0;
  padding-top: 0.25rem;
}

.admin-bar {
  align-items: center;
}

.admin-bar-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4ade80;
  margin-right: 0.35rem;
  padding: 0.25rem 0.5rem;
  background: rgba(74, 222, 128, 0.1);
  border-radius: 6px;
}

.modal-wide {
  width: min(760px, 94vw) !important;
}

.editor-hint {
  color: #999;
  font-size: 0.9rem;
  margin-bottom: 1.1rem;
  line-height: 1.5;
}

.editor-hint strong {
  color: #ddd;
}

.label-muted {
  color: #666;
  font-weight: 400;
  font-size: 0.8rem;
}

.editor-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 0.5rem;
}

.editor-tab {
  background: transparent;
  border: 1px solid transparent;
  color: #888;
  padding: 0.4rem 0.9rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.15s;
}

.editor-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.editor-tab.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.12);
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.5rem;
  padding: 0.45rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px 8px 0 0;
  border-bottom: none;
}

.editor-toolbar button {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.12s;
}

.editor-toolbar button:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.editor-toolbar .tb-sep {
  width: 1px;
  background: rgba(255,255,255,0.1);
  margin: 0 0.2rem;
  align-self: stretch;
}

.editor-textarea {
  min-height: 280px !important;
  font-family: ui-monospace, 'JetBrains Mono', monospace !important;
  font-size: 0.88rem !important;
  line-height: 1.55 !important;
  border-radius: 0 0 8px 8px !important;
  border-top: none !important;
}

.editor-preview {
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  padding: 1rem 1.15rem;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  margin-bottom: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 560px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* Sidebar manager */
.sidebar-editor-head {
  display: grid;
  grid-template-columns: 1fr 120px 40px;
  gap: 0.5rem;
  padding: 0 0.5rem 0.4rem 2rem;
  font-size: 0.75rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sidebar-row {
  display: grid;
  grid-template-columns: 1.5rem 1fr 120px 40px;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.sidebar-row-handle {
  color: #555;
  font-size: 0.75rem;
  text-align: center;
  user-select: none;
}

.sidebar-row input {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 7px;
  padding: 0.5rem 0.65rem;
  color: #eee;
  font-size: 0.9rem;
  font-family: var(--font-body);
  width: 100%;
}

.sidebar-row input:focus {
  outline: none;
  border-color: rgba(255,255,255,0.25);
}

.btn-icon {
  padding: 0.4rem 0 !important;
  min-width: 36px;
  font-size: 1.1rem !important;
  line-height: 1;
}

/* Toast */
.docs-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(20, 20, 20, 0.95);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  padding: 0.7rem 1.25rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
  box-shadow: 0 8px 30px rgba(0,0,0,0.5);
}

.docs-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.docs-toast.err {
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.docs-toast.ok {
  border-color: rgba(74, 222, 128, 0.3);
}


/* Modal sticky footer actions */
.modal-content {
  display: flex;
  flex-direction: column;
  max-height: 88vh;
}

.modal-content h2 {
  flex-shrink: 0;
}

#modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

#modal-body .editor-hint,
#modal-body .form-group,
#modal-body .form-row,
#modal-body .editor-tabs,
#modal-body .sidebar-editor-head {
  flex-shrink: 0;
}

#editor-write-pane,
#editor-preview-pane {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#editor-write-pane .form-group {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 0 !important;
}

.editor-textarea {
  flex: 1 !important;
  min-height: 180px !important;
  max-height: none !important;
}

.editor-preview {
  flex: 1;
  min-height: 180px;
  max-height: none;
}

.form-actions {
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  margin-top: 1rem !important;
  padding-top: 1rem;
  background: linear-gradient(to top, rgba(12,12,12,0.98) 60%, transparent);
  border-top: 1px solid rgba(255,255,255,0.08);
  z-index: 5;
}

.form-actions .btn-primary {
  min-width: 140px;
}
