
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #080b16;
    --panel: #111426;
    --purple: #a78bfa;
    --text: #f3f0ff;
    --muted: #a2a5ba;
    --border: #292b43;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 50% 15%, #241641 0%, transparent 45%),
        var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

button, textarea, select {
    font: inherit;
}

button:focus-visible, textarea:focus-visible,
select:focus-visible, a:focus-visible {
    outline: 2px solid #c4b5fd;
    outline-offset: 4px;
}

.stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.25;
    z-index: -1;
    background-image:
        radial-gradient(white 1px, transparent 1px),
        radial-gradient(#a78bfa 1px, transparent 1px);
    background-size: 73px 73px, 117px 117px;
    background-position: 0 0, 32px 46px;
}

.navbar {
    max-width: 1100px;
    margin: auto;
    padding: 25px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.logo {
    color: white;
    text-decoration: none;
    font-weight: 800;
    letter-spacing: 1px;
}

.status {
    color: #c4b5fd;
    font-size: 11px;
    letter-spacing: 1px;
}

.dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #a78bfa;
    border-radius: 50%;
    margin-right: 6px;
    box-shadow: 0 0 10px #a78bfa;
}

.container {
    width: min(760px, 92%);
    margin: auto;
}

.hero {
    text-align: center;
    padding: 50px 0 35px;
}

.ghost {
    font-size: 65px;
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 0 20px #9c75ff66);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-14px) rotate(4deg); }
}

.eyebrow {
    color: var(--purple);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
}

h1 {
    font-size: clamp(36px, 7vw, 58px);
    line-height: 1.2;
    margin: 12px 0;
    letter-spacing: -2px;
}

h1 span {
    color: var(--purple);
    text-shadow: 0 0 28px #8b5cf655;
}

.subtitle {
    max-width: 510px;
    margin: auto;
    color: var(--muted);
    font-size: 15px;
}

.generator, .result {
    background: linear-gradient(145deg, #14172b, #0e1020);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: clamp(20px, 5vw, 32px);
    box-shadow: 0 15px 55px #0005;
}

.generator > label, .options label {
    display: block;
    color: #c4b5fd;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
}

textarea, select {
    width: 100%;
    background: #090c19;
    color: var(--text);
    border: 1px solid #34364e;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 23px;
    outline: none;
}

textarea {
    resize: vertical;
    min-height: 100px;
}

textarea::placeholder {
    color: #777b93;
}

textarea:focus, select:focus {
    border-color: var(--purple);
}

select {
    cursor: pointer;
}

.options {
    margin-top: -2px;
}

#generateBtn {
    width: 100%;
    padding: 16px;
    color: white;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(100deg, #6d3cc7, #9c69ee);
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 5px 25px #8b5cf633;
    transition: transform 0.2s, box-shadow 0.2s;
}

#generateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px #8b5cf655;
}

#generateBtn:disabled {
    opacity: 0.65;
    cursor: wait;
    transform: none;
}

.privacy {
    color: var(--muted);
    text-align: center;
    font-size: 11px;
    margin-top: 16px;
}

.result {
    margin-top: 24px;
    animation: appear 0.5s ease;
}

@keyframes appear {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
}

.signal {
    color: #a78bfa;
    font-size: 10px;
}

.result h2 {
    font-size: 25px;
    margin: 20px 0;
}

.story-text {
    color: #d3d2e2;
    font-size: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 2;
}

.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.secondary {
    padding: 10px 15px;
    color: #ddd3ff;
    background: #25203b;
    border: 1px solid #4b3c6c;
    border-radius: 8px;
    cursor: pointer;
}

.secondary:hover {
    background: #352653;
}

.message {
    min-height: 25px;
    color: #c4b5fd;
    font-size: 12px;
    text-align: center;
    margin: 12px 0;
}

.about {
    text-align: center;
    padding: 60px 0 45px;
}

.about h2 {
    font-size: 25px;
    margin-bottom: 12px;
}

.about > p {
    max-width: 550px;
    margin: auto;
    color: var(--muted);
    font-size: 13px;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 30px;
}

.features > div {
    background: #111426;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 8px;
}

.features span {
    color: var(--purple);
    font-size: 25px;
}

.features h3 {
    font-size: 14px;
    margin: 8px 0 3px;
}

.features p {
    color: var(--muted);
    font-size: 11px;
}

footer {
    text-align: center;
    color: #777b91;
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 25px 10px;
    border-top: 1px solid #202239;
}

@media (max-width: 500px) {
    .navbar {
        padding: 20px 12px;
        flex-wrap: wrap;
    }

    .status {
        font-size: 9px;
    }

    .hero {
        padding-top: 35px;
    }

    .features {
        gap: 8px;
    }

    .features > div {
        padding: 15px 4px;
    }

    .result-header {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
