/* =========================
GLOBAL STYLES
========================= */

:root {
--background: #080711;
--surface: #121020;
--surface-light: #1b1830;
--primary: #a78bfa;
--secondary: #e879f9;
--text: #f5f3ff;
--muted: #aaa5c4;
--border: rgba(167, 139, 250, 0.22);
--shadow: rgba(139, 92, 246, 0.18);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
  }

body {
font-family: "Poppins", sans-serif;
background: var(--background);
color: var(--text);
overflow-x: hidden;
line-height: 1.6;
}

a {
text-decoration: none;
color: inherit;
}

button,
input {
font: inherit;
}

button {
cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
outline: 2px solid var(--secondary);
outline-offset: 4px;
}

::selection {
background: var(--primary);
color: #080711;
}

/* =========================
BACKGROUND
========================= */

.stars {
position: fixed;
inset: 0;
z-index: -1;
pointer-events: none;

```
background-image:
    radial-gradient(2px 2px at 20% 30%, #ffffff55 50%, transparent 100%),
    radial-gradient(2px 2px at 80% 20%, #a78bfa77 50%, transparent 100%),
    radial-gradient(1px 1px at 50% 70%, #ffffff66 50%, transparent 100%),
    radial-gradient(2px 2px at 70% 85%, #e879f955 50%, transparent 100%);

background-size: 250px 250px;
animation: starMove 25s linear infinite;
```

}

@keyframes starMove {
from {
background-position: 0 0;
}

```
to {
    background-position: 250px 250px;
}
```

}

/* =========================
NAVIGATION
========================= */

.navbar {
width: 100%;
min-height: 76px;
padding: 18px 8%;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;

```
background: rgba(8, 7, 17, 0.82);
border-bottom: 1px solid var(--border);

position: sticky;
top: 0;
z-index: 100;
backdrop-filter: blur(16px);
```

}

.logo {
font-size: 1.35rem;
font-weight: 700;
letter-spacing: 1px;
white-space: nowrap;
}

.logo span {
color: var(--secondary);
}

.navbar nav {
display: flex;
align-items: center;
gap: 28px;
}

.navbar nav a {
color: var(--muted);
font-size: 0.9rem;
transition: color 0.3s;
}

.navbar nav a:hover {
color: var(--secondary);
}

.theme-button {
width: 42px;
height: 42px;
border-radius: 50%;
background: var(--surface-light);
border: 1px solid var(--border);
color: var(--text);
font-size: 1.1rem;
}

/* =========================
BUTTONS
========================= */

.button {
display: inline-flex;
justify-content: center;
align-items: center;
gap: 8px;

```
padding: 13px 23px;
border-radius: 10px;
font-size: 0.9rem;
font-weight: 600;

border: 1px solid transparent;
transition: transform 0.3s, box-shadow 0.3s;
```

}

.button:hover {
transform: translateY(-3px);
}

.primary-button {
color: #10091c;
background: linear-gradient(135deg, var(--primary), var(--secondary));
box-shadow: 0 0 25px var(--shadow);
}

.primary-button:hover {
box-shadow: 0 0 35px rgba(232, 121, 249, 0.3);
}

.secondary-button {
border-color: var(--border);
background: var(--surface);
color: var(--text);
}

/* =========================
HERO SECTION
========================= */

.hero {
min-height: 620px;
padding: 90px 10%;
display: grid;
grid-template-columns: 1.2fr 0.8fr;
align-items: center;
gap: 60px;
}

.eyebrow {
color: var(--secondary);
font-size: 0.76rem;
font-weight: 600;
letter-spacing: 3px;
margin-bottom: 18px;
}

.hero h1 {
font-family: "Creepster", cursive;
font-size: clamp(3.3rem, 7vw, 6rem);
line-height: 1.05;
letter-spacing: 2px;
margin-bottom: 25px;
}

.hero h1 span,
.section-heading h2 span {
color: var(--secondary);
}

.hero-description {
max-width: 560px;
color: var(--muted);
font-size: 1rem;
line-height: 1.9;
}

.hero-buttons {
display: flex;
flex-wrap: wrap;
gap: 14px;
margin-top: 30px;
}

.status {
display: flex;
align-items: center;
gap: 10px;
margin-top: 35px;
font-size: 0.72rem;
letter-spacing: 1.5px;
color: #b7f7d5;
}

.status-dot {
display: inline-block;
width: 8px;
height: 8px;
border-radius: 50%;
background: #5ee6a8;
box-shadow: 0 0 12px #5ee6a8;
}

/* =========================
GHOST ILLUSTRATION
========================= */

.ghost-container {
min-height: 400px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: relative;
}

.moon {
width: 270px;
height: 270px;
position: absolute;
top: 25px;

```
border-radius: 50%;
background: radial-gradient(
    circle,
    rgba(167, 139, 250, 0.18),
    rgba(139, 92, 246, 0.04) 65%,
    transparent 70%
);
```

}

.ghost {
position: relative;
z-index: 2;

```
width: 175px;
height: 205px;

background: linear-gradient(145deg, #ffffff, #c7c1f5);
border-radius: 90px 90px 18px 18px;

box-shadow:
    0 0 40px rgba(167, 139, 250, 0.35),
    inset -12px -10px 25px rgba(93, 75, 155, 0.2);

animation: floatGhost 3s ease-in-out infinite;
```

}

.ghost::before,
.ghost::after {
content: "";
position: absolute;
bottom: -13px;
width: 48px;
height: 28px;
background: #d8d3fa;
border-radius: 0 0 50% 50%;
}

.ghost::before {
left: 0;
}

.ghost::after {
right: 0;
}

.ghost-eyes {
position: absolute;
top: 70px;
left: 43px;
display: flex;
gap: 35px;
}

.ghost-eyes span {
width: 17px;
height: 25px;
background: #21153c;
border-radius: 50%;
box-shadow: 0 0 10px #a78bfa;
}

.ghost-mouth {
position: absolute;
top: 113px;
left: 75px;
width: 25px;
height: 30px;
background: #21153c;
border-radius: 50%;
}

.ghost-shadow {
width: 150px;
height: 20px;
margin-top: 20px;
border-radius: 50%;
background: #a78bfa33;
filter: blur(9px);
animation: shadowPulse 3s ease-in-out infinite;
}

.ghost-caption {
color: var(--muted);
font-size: 0.85rem;
font-style: italic;
margin-top: 30px;
}

@keyframes floatGhost {
0%, 100% {
transform: translateY(0);
}

```
50% {
    transform: translateY(-20px);
}
```

}

@keyframes shadowPulse {
0%, 100% {
transform: scale(1);
opacity: 0.7;
}

```
50% {
    transform: scale(0.8);
    opacity: 0.4;
}
```

}

/* =========================
GENERAL SECTIONS
========================= */

.section {
padding: 90px 10%;
scroll-margin-top: 85px;
}

.section-heading {
text-align: center;
max-width: 680px;
margin: 0 auto 45px;
}

.section-heading h2 {
font-size: clamp(2rem, 4vw, 3rem);
margin-bottom: 12px;
}

.section-heading > p:last-child {
color: var(--muted);
font-size: 0.95rem;
}

/* =========================
CHAT SECTION
========================= */

.chat-section {
background: linear-gradient(
180deg,
transparent,
rgba(139, 92, 246, 0.055),
transparent
);
}

.chat-card {
max-width: 800px;
margin: auto;
overflow: hidden;

```
background: var(--surface);
border: 1px solid var(--border);
border-radius: 18px;

box-shadow: 0 20px 70px rgba(0, 0, 0, 0.25);
```

}

.chat-header {
padding: 20px;
display: flex;
align-items: center;
gap: 14px;
border-bottom: 1px solid var(--border);
}

.chat-avatar {
width: 46px;
height: 46px;
display: grid;
place-items: center;
border-radius: 14px;
background: var(--surface-light);
font-size: 1.5rem;
}

.chat-header h3 {
font-size: 1rem;
}

.chat-header p {
color: var(--muted);
font-size: 0.75rem;
}

.chat-header .status-dot {
width: 6px;
height: 6px;
}

.clear-button {
margin-left: auto;
background: transparent;
border: 1px solid var(--border);
color: var(--muted);
border-radius: 8px;
padding: 8px 12px;
font-size: 0.75rem;
}

.clear-button:hover {
color: var(--text);
}

.chat-messages {
height: 320px;
overflow-y: auto;
padding: 22px;
display: flex;
flex-direction: column;
gap: 20px;
}

.message {
display: flex;
gap: 10px;
max-width: 90%;
align-items: flex-start;
}

.message-avatar {
flex-shrink: 0;
font-size: 1.2rem;
}

.message-content {
padding: 13px 16px;
font-size: 0.88rem;
line-height: 1.8;
border-radius: 5px 15px 15px 15px;
overflow-wrap: anywhere;
}

.ghost-message .message-content {
background: var(--surface-light);
border: 1px solid var(--border);
}

.user-message {
align-self: flex-end;
flex-direction: row-reverse;
}

.user-message .message-content {
background: linear-gradient(135deg, #6d45b5, #8b5cf6);
color: white;
border-radius: 15px 5px 15px 15px;
}

.chat-input-area {
display: flex;
gap: 12px;
padding: 18px;
border-top: 1px solid var(--border);
}

.chat-input-area input {
flex: 1;
min-width: 0;
padding: 14px;
border: 1px solid var(--border);
border-radius: 10px;
outline: none;
background: var(--background);
color: var(--text);
}

.chat-input-area input:focus {
border-color: var(--primary);
}

.send-button {
padding: 0 22px;
border: none;
border-radius: 10px;
font-weight: 600;
background: var(--primary);
color: #10091c;
}

.privacy-note {
padding: 0 18px 18px;
color: var(--muted);
font-size: 0.72rem;
}

/* =========================
STORY CARDS
========================= */

.story-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 22px;
}

.story-card,
.feature-card {
padding: 28px;
background: var(--surface);
border: 1px solid var(--border);
border-radius: 16px;
transition: transform 0.3s, border-color 0.3s;
}

.story-card:hover,
.feature-card:hover {
transform: translateY(-6px);
border-color: var(--primary);
}

.story-icon {
font-size: 2.5rem;
margin-bottom: 18px;
}

.story-category {
color: var(--secondary);
font-size: 0.68rem;
letter-spacing: 2px;
font-weight: 600;
}

.story-card h3 {
font-size: 1.15rem;
margin: 12px 0;
}

.story-card > p:not(.story-category) {
min-height: 75px;
font-size: 0.84rem;
color: var(--muted);
}

.story-button {
margin-top: 20px;
padding: 0;
background: transparent;
border: none;
color: var(--primary);
font-weight: 600;
}

.story-button:hover {
color: var(--secondary);
}

.story-output {
max-width: 800px;
margin: 35px auto 20px;
padding: 25px;
min-height: 100px;

```
background: var(--surface-light);
border: 1px solid var(--border);
border-radius: 14px;

color: var(--muted);
font-size: 0.92rem;
line-height: 2;
white-space: pre-line;
```

}

.story-output h3 {
color: var(--secondary);
margin-bottom: 12px;
}

.random-button {
display: flex;
margin: 25px auto 0;
}

/* =========================
MYSTERY MESSAGE
========================= */

.messages-section {
background: linear-gradient(
180deg,
transparent,
rgba(232, 121, 249, 0.04),
transparent
);
}

.message-box {
max-width: 700px;
margin: auto;
padding: 45px 30px;
text-align: center;

```
border: 1px solid var(--border);
border-radius: 20px;

background: radial-gradient(
    circle at top,
    rgba(139, 92, 246, 0.14),
    var(--surface) 70%
);
```

}

.message-symbol {
font-size: 3rem;
margin-bottom: 20px;
}

.message-box > p {
font-size: 1.15rem;
font-style: italic;
color: var(--text);
margin-bottom: 28px;
}

/* =========================
OPEN SOURCE FEATURES
========================= */

.feature-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 22px;
}

.feature-card > span {
font-size: 2rem;
}

.feature-card h3 {
margin: 18px 0 10px;
}

.feature-card p {
color: var(--muted);
font-size: 0.85rem;
line-height: 1.9;
}

.open-source-note {
max-width: 800px;
margin: 30px auto 0;
text-align: center;
font-size: 0.82rem;
color: var(--muted);
}

/* =========================
FOOTER
========================= */

footer {
padding: 45px 10%;
text-align: center;
border-top: 1px solid var(--border);
background: rgba(8, 7, 17, 0.8);
}

footer > p {
margin-top: 12px;
color: var(--muted);
font-size: 0.85rem;
}

footer .footer-small {
font-size: 0.75rem;
}

footer .copyright {
margin-top: 25px;
font-size: 0.72rem;
}

/* =========================
LIGHT THEME
========================= */

body.light-theme {
--background: #f5f0ff;
--surface: #ffffff;
--surface-light: #eee7ff;
--primary: #7950c8;
--secondary: #a12db5;
--text: #211735;
--muted: #665d79;
--border: rgba(99, 70, 160, 0.22);
--shadow: rgba(139, 92, 246, 0.12);
}

body.light-theme .navbar {
background: rgba(245, 240, 255, 0.9);
}

body.light-theme .primary-button {
color: white;
}

body.light-theme .send-button {
background: var(--primary);
color: white;
}

body.light-theme .user-message .message-content {
background: var(--primary);
}

body.light-theme .ghost {
box-shadow: 0 0 40px rgba(121, 80, 200, 0.2);
}

body.light-theme .ghost-eyes span,
body.light-theme .ghost-mouth {
background: #21153c;
}

body.light-theme .ghost-caption {
color: var(--muted);
}

/* =========================
RESPONSIVE DESIGN
========================= */

@media (max-width: 900px) {
.navbar {
padding: 16px 5%;
}

```
.navbar nav {
    gap: 15px;
}

.navbar nav a {
    font-size: 0.8rem;
}

.hero {
    padding: 70px 6%;
    gap: 20px;
}

.section {
    padding: 75px 6%;
}

.story-grid,
.feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
```

}

@media (max-width: 650px) {
.navbar {
flex-wrap: wrap;
justify-content: space-between;
}

```
.navbar nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 10px;
    overflow-x: auto;
}

.navbar nav a {
    white-space: nowrap;
    font-size: 0.75rem;
}

.hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 65px 7% 40px;
}

.hero-description {
    margin: auto;
}

.hero-buttons {
    justify-content: center;
}

.status {
    justify-content: center;
}

.ghost-container {
    min-height: 330px;
}

.ghost {
    transform-origin: center;
}

.story-grid,
.feature-grid {
    grid-template-columns: 1fr;
}

.story-card > p:not(.story-category) {
    min-height: auto;
}

.chat-messages {
    height: 300px;
    padding: 15px;
}

.chat-input-area {
    padding: 12px;
    gap: 8px;
}

.chat-input-area input {
    padding: 11px;
    font-size: 0.8rem;
}

.send-button {
    padding: 0 14px;
    font-size: 0.8rem;
}

.section {
    padding: 65px 6%;
}

.message-box {
    padding: 35px 20px;
}

.message-box > p {
    font-size: 1rem;
}
```

}

@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
scroll-behavior: auto !important;
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
