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

/* ── Variables ── */
:root {
    --accent: #ff4500;
    --accent-hover: #e03d00;
    --accent-light: #fff1ec;
    --bg: #f8f9fb;
    --surface: #ffffff;
    --border: #e5e7eb;
    --text: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --success: #059669;
    --success-bg: #ecfdf5;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --radius: 12px;
    --radius-sm: 8px;
}

/* ── Base ── */
body {
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}
a { color: #ff5722; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Split Layout ── */
.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
}

/* ── Left Panel ── */
.auth-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 96px 80px;
    position: relative;
}
.auth-left-inner {
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}

/* ── Logo ── */
a.auth-logo { text-decoration: none; width: fit-content; }
a.auth-logo:hover { text-decoration: none; }
.auth-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 48px;
}
.auth-logo-icon {
    width: 32px;
    height: 32px;
    background: #ff5722;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(255,87,34,0.2), 0 4px 6px -4px rgba(255,87,34,0.2);
}
.auth-logo-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.025em;
    color: #1a1a1a;
}
.auth-logo-text .preface { color: #1a1a1a; padding-right: 2px; }
.auth-logo-text .suffix { color: #ff5722; }
.auth-logo-text .cloud-icon { margin-left: 6px; vertical-align: -3px; }

/* ── Headings ── */
.auth-heading { margin-bottom: 32px; }
.auth-heading h1,
.auth-heading h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-style: italic;
    color: #1a1a1a;
    letter-spacing: -1.2px;
    margin-bottom: 12px;
    line-height: 1.1;
}
.auth-heading h1 { font-size: 48px; }
.auth-heading h2 { font-size: 42px; }
.auth-heading p {
    font-size: 15px;
    color: #6b7280;
    line-height: 1.5;
}

/* ── Forms ── */
.auth-form {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 24px;
}
.auth-field { flex: 1; }
.auth-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ff5722;
    margin-bottom: 0;
}
.auth-input {
    width: 100%;
    padding: 12px 0 12px 13px;
    font-size: 16px;
    font-family: inherit;
    color: #1a1a1a;
    background: transparent;
    border: none;
    border-bottom: 1.6px solid #e5e7eb;
    outline: none;
    transition: border-color 0.2s;
}
.auth-input:focus { border-bottom-color: #ff5722; }
.auth-input::placeholder { color: #9ca3af; }
.auth-submit {
    padding: 14px 28px;
    background: #1a1a1a;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}
.auth-submit:hover { background: #ff5722; }

/* ── Alerts ── */
.auth-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}
.auth-alert-error { background: #fef2f2; color: #dc2626; }
.auth-alert-success { background: #ecfdf5; color: #059669; }

/* ── Right Panel ── */
.auth-right {
    display: flex;
    background: #1a1a1a;
    position: relative;
    overflow: hidden;
    align-items: center;
    justify-content: center;
    padding: 96px;
}
.auth-right-glow { position: absolute; inset: 0; opacity: 0.2; }
.auth-right-glow-1 {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(242,125,38,0.2), transparent 70%);
}
.auth-right-glow-2 {
    position: absolute; bottom: 0; right: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 80% 80%, rgba(242,68,68,0.1), transparent 50%);
}
.auth-right-content { position: relative; z-index: 10; text-align: center; }
.auth-right-icon { margin-bottom: 48px; }
.auth-right-icon-box {
    width: 128px;
    height: 128px;
    background: rgba(255,255,255,0.05);
    border-radius: 3rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(64px);
    -webkit-backdrop-filter: blur(64px);
    border: 1px solid rgba(255,255,255,0.1);
    transform: rotate(12deg);
}
.auth-right-heading {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-weight: 300;
    font-size: 72px;
    color: #fff;
    margin-bottom: 32px;
    line-height: 1.1;
}
.auth-brand-orange { color: #ff5722; }
.auth-right-divider {
    width: 64px;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 0 auto 24px;
}

/* ── Code Block (right panel) ── */
.code-block {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 20px 24px;
    text-align: left;
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    max-width: 420px;
    margin: 0 auto;
}
.code-block .kw { color: #ff5722; }
.code-block .str { color: #34d399; }
.code-block .cmt { color: rgba(255,255,255,0.25); }

/* ── Code Preview (left panel demos) ── */
.code-preview {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
    overflow-x: auto;
}
.code-preview code {
    font-family: 'SF Mono', SFMono-Regular, Consolas, monospace;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    line-height: 1.7;
    white-space: pre;
    background: none;
    padding: 0;
}
.code-preview .kw { color: #ff5722; }
.code-preview .str { color: #34d399; }
.code-preview .cmt { color: rgba(255,255,255,0.3); }
.code-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ff5722;
    margin-bottom: 8px;
}

/* ── Inline code ── */
.code-inline {
    background: #fff1ec;
    color: #ff4500;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* ── Decorative Dots ── */
.auth-dot-orange {
    position: absolute;
    top: 25%;
    left: 25%;
    width: 18px;
    height: 18px;
    background: #ff5722;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
.auth-dot-white {
    position: absolute;
    bottom: 25%;
    right: 25%;
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ── Built-with callout ── */
.built-with {
    margin-top: 32px;
    padding: 12px 16px;
    background: #fff1ec;
    border-left: 3px solid #ff5722;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: #374151;
}
.built-with a { color: #ff5722; font-weight: 600; }

/* ── Post cards (feed/search) ── */
.post-card {
    background: #f8f9fb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 10px;
    transition: box-shadow 0.2s;
}
.post-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.post-title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
    line-height: 1.4;
}
.post-body {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.5;
}
.post-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #9ca3af;
    flex-wrap: wrap;
}
.post-score { font-weight: 700; color: #ff4500; }
.results-count { font-size: 13px; color: #6b7280; margin-bottom: 12px; }

/* ── Buttons ── */
.rl-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid #e5e7eb;
}
.rl-btn-accent {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
    box-shadow: 0 15px 30px -10px rgba(26,26,26,0.2);
}
.rl-btn-accent:hover {
    background: #ff5722;
    border-color: #ff5722;
    box-shadow: 0 15px 30px -10px rgba(255,87,34,0.3);
    text-decoration: none;
}
.rl-btn-ghost {
    background: transparent;
    color: #6b7280;
    border-color: transparent;
}
.rl-btn-ghost:hover { color: #ff5722; text-decoration: none; }

/* ── Footer ── */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 50%;
    padding: 24px 24px 32px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #fff;
    z-index: 100;
}
.site-footer a {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #4b5563;
    text-decoration: none;
}
.site-footer a:hover { color: #ff5722; }
.site-footer .dot { color: #9ca3af; font-size: 14px; }

/* ── Responsive ── */
@media (max-width: 1023px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-right { display: none; }
    .auth-left { padding: 48px 24px 80px; }
    .site-footer { width: 100%; padding: 24px 24px 32px; }
}
