:root {
  --bg: #0a0c1a;
  --bg2: #0d1028;
  --surface: #131630;
  --surface2: #1a1f3a;
  --accent: #7c6ef7;
  --accent2: #a78bfa;
  --pink: #f472b6;
  --teal: #34d399;
  --yellow: #fbbf24;
  --text: #e8eaf6;
  --muted: #8892b0;
  --border: rgba(124,110,247,0.2);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* STARS BACKGROUND */
.stars-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.stars-bg::before, .stars-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 50% 10%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 35%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(2px 2px at 20% 90%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 45%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 40% 70%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 55%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 45%, rgba(255,255,255,0.3) 0%, transparent 100%);
  background-size: 400px 400px, 350px 350px, 500px 500px, 300px 300px, 450px 450px, 380px 380px, 420px 420px, 360px 360px, 410px 410px, 330px 330px;
  animation: twinkle 6s ease-in-out infinite alternate;
}
.stars-bg::after {
  background-image:
    radial-gradient(1px 1px at 25% 15%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 55% 75%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1.5px 1.5px at 75% 25%, rgba(255,255,255,0.7) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 55%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 95% 65%, rgba(255,255,255,0.4) 0%, transparent 100%);
  background-size: 500px 500px, 450px 450px, 400px 400px, 350px 350px, 480px 480px;
  animation-delay: 3s;
}
@keyframes twinkle {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 68px;
  background: rgba(10,12,26,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-logo {
  font-family: 'Fredoka', cursive;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
}
.nav-logo span { color: var(--accent2); }
.nav-links {
  display: flex;
  gap: 8px;
  list-style: none;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  transition: all 0.2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface2); }
.nav-cta {
  background: var(--accent) !important;
  color: white !important;
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--accent2) !important; transform: translateY(-1px); }

/* PAGE WRAPPER */
.page { position: relative; z-index: 1; }
.page-content { animation: fadeInUp 0.4s ease; padding-top: 68px; min-height: calc(100vh - 68px); }

/* HERO */
#home {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 20px 80px;
  position: relative;
}
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124,110,247,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(124,110,247,0.15);
  border: 1px solid rgba(124,110,247,0.3);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent2);
  margin-bottom: 28px;
  animation: fadeInDown 0.6s ease both;
}
.hero-badge::before { content: '✦'; }
.hero-title {
  font-family: 'Fredoka', cursive;
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 20px;
  animation: fadeInUp 0.7s 0.1s ease both;
}
.hero-title .grad {
  background: linear-gradient(135deg, var(--accent2), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 500px;
  line-height: 1.7;
  margin-bottom: 40px;
  animation: fadeInUp 0.7s 0.2s ease both;
}
.hero-sub strong { color: var(--text); }
.hero-btns {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 60px;
  animation: fadeInUp 0.7s 0.3s ease both;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #5b4ee0);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 100px;
  font-family: 'Fredoka', cursive;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  box-shadow: 0 0 30px rgba(124,110,247,0.4);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 0 50px rgba(124,110,247,0.6); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 14px 32px;
  border-radius: 100px;
  font-family: 'Fredoka', cursive;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-ghost:hover { background: var(--surface2); border-color: var(--accent2); transform: translateY(-2px); }

/* BEAR IMAGE */
.hero-bear {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 3px solid rgba(124,110,247,0.4);
  box-shadow: 0 0 60px rgba(124,110,247,0.3), 0 0 120px rgba(124,110,247,0.1);
  animation: float 4s ease-in-out infinite, fadeInUp 0.8s 0.4s ease both;
  object-fit: cover;
  margin-bottom: 40px;
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

/* STATS BAR */
.stats-bar {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 32px 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  animation: fadeInUp 0.7s 0.5s ease both;
}
.stat { text-align: center; }
.stat-num {
  font-family: 'Fredoka', cursive;
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent2);
  line-height: 1;
}
.stat-label { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

/* FEATURES SECTION */
.features-section {
  padding: 100px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--accent2);
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-family: 'Fredoka', cursive;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 16px;
}
.section-sub {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 60px;
  max-width: 500px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(124,110,247,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover {
  border-color: rgba(124,110,247,0.4);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 18px;
}
.feature-icon.purple { background: rgba(124,110,247,0.15); }
.feature-icon.pink { background: rgba(244,114,182,0.15); }
.feature-icon.teal { background: rgba(52,211,153,0.15); }
.feature-icon.yellow { background: rgba(251,191,36,0.15); }
.feature-title {
  font-family: 'Fredoka', cursive;
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.feature-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }

/* PERSONALITIES SECTION */
.personalities-section {
  padding: 80px 40px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.personalities-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.personalities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 50px;
}
@media (max-width: 680px) {
  .personalities-grid { grid-template-columns: 1fr; }
}
.personality-card {
  border-radius: 20px;
  padding: 28px;
  border: 1px solid;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}
.personality-card:hover { transform: scale(1.02); }
.pc-gremlin { background: rgba(124,110,247,0.08); border-color: rgba(124,110,247,0.3); }
.pc-softie { background: rgba(244,114,182,0.08); border-color: rgba(244,114,182,0.3); }
.pc-bestie { background: rgba(52,211,153,0.08); border-color: rgba(52,211,153,0.3); }
.pc-hype { background: rgba(251,191,36,0.08); border-color: rgba(251,191,36,0.3); }
.pc-label {
  font-family: 'Fredoka', cursive;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  margin-bottom: 12px;
  display: inline-block;
}
.pc-gremlin .pc-label { background: rgba(124,110,247,0.2); color: var(--accent2); }
.pc-softie .pc-label { background: rgba(244,114,182,0.2); color: var(--pink); }
.pc-bestie .pc-label { background: rgba(52,211,153,0.2); color: var(--teal); }
.pc-hype .pc-label { background: rgba(251,191,36,0.2); color: var(--yellow); }
.pc-name { font-family: 'Fredoka', cursive; font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.pc-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.6; margin-bottom: 14px; }
.pc-emojis { font-size: 0.8rem; color: var(--muted); }
.pc-bear-img {
  position: absolute;
  right: -10px;
  bottom: -10px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: 0.3;
  object-fit: cover;
  filter: grayscale(30%);
}

/* COMMANDS PAGE */
#commands {
  padding: 40px 40px 80px;
  max-width: 900px;
  margin: 0 auto;
}
.commands-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 40px;
}
.commands-table th {
  font-family: 'Fredoka', cursive;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: left;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.commands-table td {
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}
.commands-table tr:hover td { background: rgba(124,110,247,0.05); }
.cmd-name {
  font-family: 'Fredoka', cursive;
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent2);
  background: rgba(124,110,247,0.1);
  padding: 4px 10px;
  border-radius: 8px;
  display: inline-block;
}
.cmd-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.cmd-tag {
  font-size: 0.72rem;
  padding: 3px 10px;
  border-radius: 100px;
  font-weight: 600;
  display: inline-block;
}
.tag-fun { background: rgba(244,114,182,0.15); color: var(--pink); }
.tag-ai { background: rgba(124,110,247,0.15); color: var(--accent2); }
.tag-util { background: rgba(52,211,153,0.15); color: var(--teal); }
.commands-section-head {
  font-family: 'Fredoka', cursive;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  padding: 24px 20px 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* LEGAL PAGE */
#terms, #privacy {
  padding: 40px 40px 80px;
  max-width: 760px;
  margin: 0 auto;
}
.legal-header {
  margin-bottom: 50px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}
.legal-date { font-size: 0.82rem; color: var(--muted); margin-top: 8px; }
.legal-body h2 {
  font-family: 'Fredoka', cursive;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent2);
  margin: 36px 0 12px;
}
.legal-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  margin-bottom: 12px;
}
.legal-body ul {
  list-style: none;
  padding: 0;
  margin-bottom: 12px;
}
.legal-body ul li {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.8;
  padding-left: 20px;
  position: relative;
}
.legal-body ul li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--accent2);
}
.legal-highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin: 16px 0;
}
.legal-highlight p { margin: 0; }

/* FOOTER */
footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 50px 40px 30px;
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand .nav-logo { font-size: 1.8rem; }
.footer-brand p { font-size: 0.85rem; color: var(--muted); margin-top: 10px; max-width: 240px; line-height: 1.6; }
.footer-links h4 {
  font-family: 'Fredoka', cursive;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 10px; }
.footer-links ul li a {
  font-size: 0.88rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  cursor: pointer;
}
.footer-links ul li a:hover { color: var(--accent2); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.8rem; color: var(--muted); }
.footer-bottom span { color: var(--pink); }

/* ANIMATIONS */
@keyframes fadeInDown {
  from { opacity:0; transform: translateY(-16px); }
  to { opacity:1; transform: translateY(0); }
}
@keyframes fadeInUp {
  from { opacity:0; transform: translateY(20px); }
  to { opacity:1; transform: translateY(0); }
}

/* BEAR SHOWCASE */
.bear-showcase {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  padding: 60px 40px;
  max-width: 900px;
  margin: 0 auto;
}
.bear-card {
  width: 120px;
  height: 120px;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all 0.3s;
  cursor: pointer;
}
.bear-card:hover {
  border-color: var(--accent2);
  transform: scale(1.1) rotate(-2deg);
  box-shadow: 0 10px 40px rgba(124,110,247,0.4);
}
.bear-card img { width: 100%; height: 100%; object-fit: cover; }

/* INVITE BANNER */
.invite-banner {
  margin: 0 40px 80px;
  background: linear-gradient(135deg, rgba(124,110,247,0.2), rgba(244,114,182,0.1));
  border: 1px solid rgba(124,110,247,0.3);
  border-radius: 28px;
  padding: 60px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.invite-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 50%, rgba(124,110,247,0.1), transparent 50%),
              radial-gradient(circle at 70% 50%, rgba(244,114,182,0.1), transparent 50%);
  pointer-events: none;
}
.invite-banner h2 {
  font-family: 'Fredoka', cursive;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 12px;
}
.invite-banner p { color: var(--muted); margin-bottom: 30px; }

/* MOBILE NAV */
@media (max-width: 640px) {
  nav { padding: 0 20px; }
  .nav-links { display: none; }
  .hero-title { font-size: 2.5rem; }
  .features-section, .personalities-section, #commands, #terms, #privacy { padding-left: 20px; padding-right: 20px; }
  .invite-banner { margin: 0 20px 60px; padding: 40px 24px; }
  .footer-top { flex-direction: column; }
  .personalities-grid { grid-template-columns: 1fr; }
}

/* SCROLL indicator */
.scroll-hint {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  animation: bounce 2s ease-in-out infinite;
}
.scroll-hint svg { opacity: 0.5; }
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* Active nav highlight */
.nav-links a.active-page { color: var(--text); background: var(--surface2); }
