:root {
    --bg-dark: #0f172a;
    --primary: #f59e0b;
    --primary-hover: #fbbf24;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --glass: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Authentication Styling */
.auth-shell {
    max-width: 1120px;
    margin: 0 auto;
    padding: 10rem 2rem 6rem;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: start;
}

.auth-brand {
    padding: 3rem;
    border-radius: 24px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    position: relative;
    overflow: hidden;
}

.auth-brand__badge {
    display: inline-flex;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.auth-brand__title {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
}

.auth-brand__subtitle {
    color: var(--text-muted);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

.auth-brand__list {
    list-style: none;
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.auth-brand__list li {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-main);
    margin: 0 !important;
}

.auth-brand__list li::before {
    content: "✓";
    color: var(--primary);
    font-weight: bold;
}

.auth-brand__fineprint {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-brand__fineprint a {
    color: var(--primary);
    font-weight: 600;
}

.auth-card {
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.auth-card__header {
    margin-bottom: 2rem;
}

.auth-card__eyebrow {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.auth-card__title {
    font-size: clamp(1.5rem, 4vw, 2rem);
    font-weight: 700;
}

.auth-form {
    display: grid;
    gap: 1.5rem;
    width: 100%;
}

.field {
    display: grid;
    gap: 0.5rem;
}

.field__label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
}

.field__input {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 0.875rem 1rem;
    color: white;
    font-size: 1rem;
    transition: all 0.2s;
}

.field__input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.field__row {
    display: flex;
    gap: 0.5rem;
}

.field__row .field__input {
    flex: 1;
}

.field__toggle {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    padding: 0 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.field__toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

.field__hint {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.auth-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.auth-submit {
    background: var(--primary);
    color: #0f172a;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1rem;
}

.auth-submit:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 1rem 0;
}

.auth-divider::before, .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.auth-alt {
    display: grid;
    gap: 1rem;
}

.auth-alt__btn {
    background: white;
    color: #0f172a;
    padding: 0.875rem;
    border-radius: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.auth-card__footer {
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-align: center;
}

.auth-card__footer a {
    color: var(--primary);
    font-weight: 600;
}

/* Header */
.topbar {
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
}

.topbar--auth {
    background: #000000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary);
    text-shadow: 0 2px 10px rgba(245, 158, 11, 0.3);
}

ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(139, 92, 246, 0.1) 0%, transparent 40%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    z-index: -1;
}

.hero h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem auto;
    text-align: center;
}

.cta-button {
    background: linear-gradient(135deg, var(--primary) 0%, #d97706 100%);
    color: #0f172a;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(245, 158, 11, 0.4);
}

/* Features */
.features {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    font-size: 3rem;
    margin-bottom: 4rem;
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    max-width: 700px;
    margin: 0 auto;
}

.feature {
    background: var(--glass);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    padding: 2rem 2.5rem;
    border-radius: 20px;
    transition: transform 0.3s, border-color 0.3s, background 0.3s;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.feature:hover {
    transform: translateX(6px);
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(30, 41, 59, 0.9);
}

.feature-btn {
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
    font-size: 1.4rem;
    display: block;
    margin-bottom: 0.4rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
    min-width: 130px;
}

.feature p {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

/* Legal Content */
.legal-content {
    max-width: 800px;
    margin: 8rem auto 4rem;
    padding: 3rem;
    background: var(--glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

/* Auth Pages Adjustments */
.auth-page {
    background: var(--bg-dark);
}

.auth-shell {
    padding-top: 10rem;
}

/* Footer */
footer {
    padding: 4rem 2rem;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    margin-top: 4rem;
}

footer button {
    background: var(--glass);
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    cursor: pointer;
    margin-bottom: 2rem;
    font-weight: 600;
    transition: background 0.2s;
}

footer button:hover {
    background: rgba(255, 255, 255, 0.1);
}

footer p {
    color: var(--text-muted);
}

/* Dialog */
dialog {
    background: #1e293b;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
    color: var(--text-main);
    max-width: 500px;
    width: 90%;
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
}

dialog h2 {
    margin-bottom: 2rem;
}

dialog input, dialog textarea {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1rem;
    color: white;
    margin-bottom: 1rem;
    width: 100%;
}

dialog button[type="submit"] {
    background: var(--primary);
    color: #000;
    font-weight: 700;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .auth-shell {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 8rem;
    }
    
    .auth-brand {
        padding: 2.5rem;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 0 1.5rem;
    }
    
    ul {
        gap: 1.25rem;
    }

    /* Keep nav links but make them smaller or hide if too many */
    ul li a {
        font-size: 0.9rem;
    }

    .hero {
        padding-top: 7rem;
    }

    .features {
        padding: 5rem 1.5rem;
    }

    .features h2 {
        font-size: 2.25rem;
        margin-bottom: 2.5rem;
    }

    .feature {
        padding: 2.5rem 1.5rem;
    }

    .legal-content {
        padding: 1.5rem;
        margin-top: 5rem;
        border-radius: 16px;
    }

    .logo img {
        height: 32px !important;
    }
}

@media (max-width: 480px) {
    .topbar {
        padding: 0.5rem 0;
    }

    ul {
        display: none; /* Hide on very small screens, could add mobile menu later */
    }

    .auth-card {
        padding: 2rem 1.5rem;
    }

    .auth-brand {
        padding: 2rem 1.5rem;
    }

    .cta-button {
        width: 100%;
        display: block;
        text-align: center;
    }

    .field__row {
        flex-direction: column;
    }

    dialog {
        padding: 2rem 1.5rem;
    }
}
