@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
    --bg: #f7f3ea;
    --panel: #ffffff;
    --panel-glass: rgba(255, 255, 255, 0.9);
    --accent: #2d6cdf;
    --accent-strong: #1f4fbf;
    --accent-soft: rgba(45, 108, 223, 0.14);
    --text: #16191f;
    --muted: #5b6472;
    --error: #e25555;
    --success: #1f9d68;
    --shadow: 0 30px 60px rgba(20, 30, 50, 0.18);
}

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

body {
    margin: 0;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #f3efe6 0%, #f7f3ea 40%, #f8f7f2 100%);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 56px 24px 32px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(45, 108, 223, 0.12), transparent 45%),
        radial-gradient(circle at 80% 10%, rgba(249, 115, 22, 0.12), transparent 40%),
        radial-gradient(circle at 70% 80%, rgba(16, 185, 129, 0.12), transparent 40%);
    pointer-events: none;
    z-index: 0;
}

.page {
    width: min(1100px, 100%);
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(320px, 1fr);
    gap: 32px;
    position: relative;
    z-index: 1;
}

.hero {
    background: linear-gradient(135deg, #111827, #1f2937 60%, #0f172a);
    color: #f9fafb;
    border-radius: 28px;
    padding: 28px;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    animation: floatIn 0.7s ease both;
}

.hero::after {
    content: "";
    position: absolute;
    inset: -40% 40% auto auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.35), transparent 70%);
}

.hero-logo {
    font-family: "Fraunces", "Space Grotesk", serif;
    font-size: 28px;
    letter-spacing: 0.12em;
}

.hero-text {
    font-size: 28px;
    font-weight: 600;
    margin-top: 12px;
}

.home-link {
    align-self: flex-start;
    text-decoration: none;
    color: #f9fafb;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 12px;
    border-radius: 12px;
    transition: transform 0.2s ease, background 0.2s ease;
}

.home-link:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}

/* Home hero sizing overrides. */
.hero:has(.hero-right) {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 6px 16px;
    min-height: 0;
    border-radius: 0;
    overflow: visible;
}

.hero:has(.hero-right) .hero-logo {
    font-size: 18px;
    letter-spacing: -0.02em;
}

.hero:has(.hero-right) .hero-mark {
    width: 36px;
    height: 36px;
}

.hero:has(.hero-right) .icon-btn {
    width: 34px;
    height: 34px;
}

.hero:has(.hero-right) .hero-right {
    gap: 10px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
}

.hero:has(.hero-right) .hero-search {
    width: 200px;
    padding: 6px 10px;
    font-size: 13px;
}

.hero:has(.hero-right) .hero-links {
    gap: 10px;
    font-size: 13px;
    white-space: nowrap;
}

.card {
    width: 100%;
    background: var(--panel-glass);
    border: 1px solid rgba(31, 41, 55, 0.08);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
    animation: floatIn 0.9s ease both;
}

.heading {
    margin: 0 0 6px;
    font-size: 30px;
    letter-spacing: -0.02em;
}

.subtitle {
    margin: 0 0 18px;
    color: var(--muted);
}

form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
}

.choice-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(31, 41, 55, 0.12);
    background: #f8fafc;
}

.choice-group legend {
    font-weight: 600;
    font-size: 14px;
    padding: 0 6px;
    color: var(--text);
}

.choice-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.choice-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid rgba(31, 41, 55, 0.12);
    background: #ffffff;
    cursor: pointer;
    transition: border 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.choice-card:hover {
    border-color: rgba(31, 41, 55, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(31, 41, 55, 0.1);
}

.choice-card input {
    margin-top: 3px;
    accent-color: var(--accent);
}

.choice-card span {
    font-weight: 600;
}

.choice-card small {
    display: block;
    margin-top: 4px;
    color: var(--muted);
}

input {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(31, 41, 55, 0.15);
    background: #f8fafc;
    color: var(--text);
    transition: border 0.15s ease, box-shadow 0.15s ease;
}

input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.password-row {
    display: flex;
    gap: 8px;
}

.password-row input {
    flex: 1;
}

.toggle-btn {
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(31, 41, 55, 0.12);
    background: #eef2ff;
    color: #1f2937;
    cursor: pointer;
    transition: background 0.15s ease, border 0.15s ease;
}

.toggle-btn:hover {
    background: #e0e7ff;
    border-color: var(--accent);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.primary-btn {
    border: none;
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #f8fafc;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.link:hover {
    color: var(--accent-strong);
}

.status {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgba(31, 41, 55, 0.1);
    background: #f8fafc;
    font-size: 14px;
}

.status.error {
    border-color: rgba(248, 113, 113, 0.4);
    color: var(--error);
}

.status.success {
    border-color: rgba(52, 211, 153, 0.4);
    color: var(--success);
}

.token {
    word-break: break-all;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    background: #eef2ff;
    padding: 10px;
    border-radius: 8px;
    margin-top: 8px;
}

.top-link {
    margin-bottom: 16px;
    color: var(--muted);
}

.footer {
    margin-top: 24px;
    background: #0f172a;
    color: #e5e7eb;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px 20px 16px;
    border-radius: 24px;
    grid-column: 1 / -1;
}

.footer-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.footer h4 {
    margin: 0 0 10px;
    font-size: 18px;
}

.footer p, .footer a, .footer li, .footer span {
    color: #cbd5e1;
    text-decoration: none;
    margin: 0;
}

.footer a:hover {
    color: var(--accent);
}

.footer .pill-input {
    display: flex;
    align-items: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 8px;
    gap: 8px;
    margin-top: 8px;
}

.footer .pill-input input {
    border: none;
    background: transparent;
    color: #e5e7eb;
    width: 100%;
    outline: none;
}

.footer .pill-input button {
    border: none;
    background: rgba(255,255,255,0.1);
    color: #e5e7eb;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.footer .socials {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    align-items: center;
}

.footer .links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 6px;
}

.footer-bottom {
    margin-top: 18px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 920px) {
    .page {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    body {
        padding: 40px 16px 24px;
    }

    .card {
        padding: 20px;
    }

    .heading {
        font-size: 24px;
    }
}
