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

:root {
    --bg: #0E1117;
    --bg-elevated: #161A20;
    --primary: #2EC4A9;
    --primary-muted: rgba(46, 196, 169, 0.12);
    --primary-glow: rgba(46, 196, 169, 0.15);
    --primary-dark: #26A68E;
    --accent: #F04E62;
    --accent-glow: rgba(240, 78, 98, 0.12);
    --text: #E8EAED;
    --text-light: #8B919A;
    --surface: #1A1E24;
    --shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 8px 40px rgba(0, 0, 0, 0.50);
    --radius: 14px;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.10);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Grain texture overlay */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.5;
}

/* Ambient background glow */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background:
        radial-gradient(ellipse at 40% 50%, var(--primary-glow) 0%, transparent 60%),
        radial-gradient(ellipse at 60% 40%, var(--accent-glow) 0%, transparent 60%);
    pointer-events: none;
    z-index: 0;
    filter: blur(60px);
}

h1, h2, h3 {
    font-family: 'Quicksand', system-ui, sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Layout */
.container {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

main {
    flex: 1;
    position: relative;
    z-index: 1;
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 0 32px;
}

.logo {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.hero .tagline {
    font-size: 1.15rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Coming Soon Badge */
a.badge {
    text-decoration: none;
    cursor: pointer;
}

.badge {
    display: inline-block;
    margin: 20px 0 0;
    padding: 8px 24px;
    background: var(--accent);
    color: #fff;
    font-family: 'Quicksand', system-ui, sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    border-radius: 999px;
    text-transform: uppercase;
    box-shadow: 0 0 24px var(--accent-glow), 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulse 2.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

/* Description */
.description {
    text-align: center;
    padding: 0 0 48px;
}

.description p {
    font-size: 1.05rem;
    color: var(--text-light);
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.75;
}

/* Feature Cards */
.features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding-bottom: 48px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    background: var(--primary-muted);
    border-radius: 12px;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
    white-space: nowrap;
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.65;
}

@media (hover: hover) {
    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-hover);
        border-color: var(--border-hover);
    }

    .feature-card:hover::before {
        opacity: 1;
    }
}

/* Signup Form */
.signup {
    text-align: center;
    padding: 24px 24px 56px;
    position: relative;
}

.signup h2 {
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.signup .subtitle {
    color: var(--text-light);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

.form-wrapper {
    display: flex;
    max-width: 480px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 5px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-muted);
}

.form-wrapper input[type="email"] {
    flex: 1;
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: var(--text);
    font-size: 16px;
    font-family: 'Atkinson Hyperlegible', system-ui, sans-serif;
    outline: none;
    min-width: 0;
}

.form-wrapper input[type="email"]::placeholder {
    color: var(--text-light);
}

.form-wrapper button {
    padding: 12px 28px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-family: 'Quicksand', system-ui, sans-serif;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.3s;
    white-space: nowrap;
    min-height: 44px;
}

.form-wrapper button:hover {
    background: var(--primary-dark);
    box-shadow: 0 0 20px var(--primary-glow);
}

.form-wrapper button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-message {
    margin-top: 12px;
    font-size: 0.9rem;
    min-height: 1.4em;
    transition: opacity 0.5s ease;
}

.form-message.fade-out {
    opacity: 0;
}

.form-message.success {
    color: var(--primary);
}

.form-message.error {
    color: var(--accent);
}

/* Footer */
footer {
    text-align: center;
    padding: 24px 0;
    color: var(--text-light);
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-hover), transparent);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-up:nth-child(2) { animation-delay: 0.15s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
.fade-in-up:nth-child(4) { animation-delay: 0.45s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (min-width: 640px) {
    .hero {
        padding-top: 80px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 639px) {
    .form-wrapper {
        flex-direction: column;
        border-radius: var(--radius);
    }

    .form-wrapper button {
        width: 100%;
        border-radius: var(--radius);
    }
}

@media (min-width: 1024px) {
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Admin styles */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.admin-table th,
.admin-table td {
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-family: 'Quicksand', system-ui, sans-serif;
    font-weight: 700;
    color: var(--text);
    background: var(--bg);
}

.admin-table td {
    color: var(--text-light);
    font-size: 0.95rem;
}

.admin-header {
    padding: 40px 0 16px;
    text-align: center;
}

.admin-count {
    color: var(--text-light);
    text-align: center;
    font-size: 0.9rem;
}
