@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
    --bg: #08081c;
    --card: #12132e;
    --card-border: rgba(255, 255, 255, 0.08);
    --accent: #00abf0;
    --accent-2: #7c5cff;
    --text: #f4f6fb;
    --text-dim: #a6acc4;
    --radius: 14px;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    min-height: 100vh;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

::selection {
    background: var(--accent);
    color: #05131a;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent), var(--accent-2));
    border-radius: 10px;
    border: 2px solid var(--bg);
}

/* Ambient background */
.bg-glow {
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(600px circle at 15% 10%, rgba(0, 171, 240, 0.18), transparent 60%),
        radial-gradient(500px circle at 85% 20%, rgba(124, 92, 255, 0.16), transparent 60%),
        radial-gradient(700px circle at 30% 90%, rgba(0, 171, 240, 0.09), transparent 60%),
        radial-gradient(600px circle at 90% 80%, rgba(124, 92, 255, 0.1), transparent 60%);
    animation: drift 22s ease-in-out infinite alternate;
}

@keyframes drift {
    0% { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(-2%, 2%, 0) scale(1.05); }
}

.bg-grid {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 42px 42px;
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
    mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

.spotlight {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    background: radial-gradient(320px circle at var(--x, 50%) var(--y, 50%), rgba(0, 171, 240, 0.1), transparent 70%);
    transition: opacity .4s ease;
}

.spotlight.active {
    opacity: 1;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 18px 8%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(8, 8, 28, 0.55);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s ease, background .3s ease;
}

.header.scrolled {
    border-bottom-color: var(--card-border);
    background: rgba(8, 8, 28, 0.85);
}

.logo {
    font-size: 24px;
    font-weight: 800;
}

.logo span {
    color: var(--accent);
}

.navbar {
    display: flex;
    align-items: center;
    gap: 2.2rem;
}

.navbar a {
    position: relative;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dim);
    padding: 6px 0;
    transition: color .3s ease;
}

.navbar a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: var(--accent);
    transition: width .3s ease;
}

.navbar a:hover {
    color: var(--text);
}

.navbar a:hover::after {
    width: 100%;
}

/* Hero */
.hero {
    flex-grow: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 160px 8% 80px;
}

.eyebrow {
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: 13px;
    font-family: var(--font-mono);
    margin-bottom: 14px;
}

.hero h1 {
    font-size: clamp(28px, 5vw, 46px);
    font-weight: 700;
    max-width: 720px;
    background: linear-gradient(90deg, #ffffff, var(--accent) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero h1 img {
    height: 1em;
    width: auto;
    vertical-align: -0.2em;
    margin-right: 8px;
}

.hero h1 span {
    background: linear-gradient(90deg, #ffffff, var(--accent) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .lead {
    margin-top: 16px;
    color: var(--text-dim);
    font-size: 16px;
    max-width: 480px;
}

/* TTS card */
.tts-card {
    margin-top: 40px;
    width: 100%;
    max-width: 620px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 24px;
}

textarea {
    width: 100%;
    height: 220px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    color: var(--text);
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    outline: 0;
    padding: 18px;
    border-radius: 10px;
    resize: none;
    margin-bottom: 20px;
    transition: border-color .3s ease;
}

textarea:focus {
    border-color: var(--accent);
}

textarea::placeholder {
    color: var(--text-dim);
}

.row {
    display: flex;
    align-items: center;
    gap: 16px;
}

select {
    flex: 1;
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--card-border);
    height: 50px;
    padding: 0 20px;
    outline: 0;
    border-radius: 30px;
    appearance: none;
    font-size: 14px;
    background-image: url(images/dropdown.png);
    background-repeat: no-repeat;
    background-size: 13px;
    background-position: right 20px center;
    cursor: pointer;
    transition: border-color .3s ease;
}

select:hover,
select:focus {
    border-color: var(--accent);
}

select option {
    background: var(--card);
    color: var(--text);
}

button {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #05131a;
    font-size: 15px;
    font-weight: 700;
    padding: 0 30px;
    height: 50px;
    border-radius: 30px;
    border: 0;
    outline: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    white-space: nowrap;
    transition: transform .3s ease, filter .3s ease;
}

button:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

button img {
    width: 14px;
    margin-right: 10px;
    filter: brightness(0);
}

/* Footer */
.footer {
    width: 100%;
    text-align: center;
    padding: 24px 0;
    color: var(--text-dim);
    font-size: 14px;
    border-top: 1px solid var(--card-border);
}

@media (max-width: 680px) {
    .row {
        flex-direction: column;
        align-items: stretch;
    }

    button {
        justify-content: center;
    }

    .hero {
        padding: 140px 6% 60px;
    }
}
