/*
 * Base theme for ObsessionSL. Establishes the dark/purple/cyan color
 * system and shared form/card styling used by auth pages. The full
 * marketing layout (hero, glassmorphism, animations) is built out in
 * the Public Website stage on top of these same variables.
 */

:root {
    --osl-bg: #0b0b12;
    --osl-bg-elevated: #14141f;
    --osl-surface: #1a1a28;
    --osl-border: #2a2a3d;
    --osl-text: #e8e8f0;
    --osl-text-muted: #9797ab;
    --osl-purple: #8b5cf6;
    --osl-purple-dark: #6d28d9;
    --osl-cyan: #22d3ee;
    --osl-danger: #f87171;
    --osl-success: #4ade80;
    --osl-radius: 14px;
    --osl-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #16162a 0%, var(--osl-bg) 60%);
    color: var(--osl-text);
    font-family: var(--osl-font);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--osl-cyan);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

header.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--osl-border);
}

.brand {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.02em;
    background: linear-gradient(90deg, var(--osl-purple), var(--osl-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

nav.site-nav a {
    margin-left: 1.5rem;
    color: var(--osl-text-muted);
    font-size: 0.95rem;
}

.site-header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.notification-menu {
    position: relative;
}

.notification-bell-trigger {
    position: relative;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: var(--osl-surface);
    border: 1px solid var(--osl-border);
    color: var(--osl-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-bell-trigger:hover {
    color: var(--osl-text);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--osl-danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    width: 320px;
    max-width: 90vw;
    background: var(--osl-surface);
    border: 1px solid var(--osl-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 50;
}

.notification-dropdown.open {
    display: block;
}

.notification-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--osl-border);
}

.notification-dropdown-header button {
    background: none;
    border: none;
    color: var(--osl-cyan);
    font-size: 0.78rem;
    cursor: pointer;
    padding: 0;
}

.notification-list {
    max-height: 340px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--osl-border);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: rgba(139, 92, 246, 0.08);
}

.notification-item-title {
    font-size: 0.85rem;
    font-weight: 600;
}

.notification-item-message {
    font-size: 0.82rem;
    color: var(--osl-text-muted);
    margin-top: 0.15rem;
}

.notification-item-time {
    font-size: 0.72rem;
    color: var(--osl-text-muted);
    margin-top: 0.3rem;
}

.notification-empty {
    padding: 1.25rem 1rem;
    text-align: center;
    color: var(--osl-text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.profile-menu {
    position: relative;
}

.profile-menu-trigger {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: linear-gradient(135deg, var(--osl-purple-dark), var(--osl-cyan));
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.profile-menu-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.6rem);
    right: 0;
    min-width: 220px;
    background: var(--osl-surface);
    border: 1px solid var(--osl-border);
    border-radius: 10px;
    padding: 0.5rem 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    z-index: 50;
}

.profile-dropdown.open {
    display: block;
}

.profile-dropdown-header {
    padding: 0.5rem 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.profile-dropdown-header span {
    color: var(--osl-text-muted);
    font-size: 0.8rem;
}

.profile-dropdown a {
    display: block;
    padding: 0.55rem 1rem;
    color: var(--osl-text);
    font-size: 0.88rem;
}

.profile-dropdown a:hover {
    background: rgba(255, 255, 255, 0.04);
    text-decoration: none;
}

.profile-dropdown hr {
    border: none;
    border-top: 1px solid var(--osl-border);
    margin: 0.4rem 0;
}

nav.site-nav a:hover {
    color: var(--osl-text);
    text-decoration: none;
}

main.site-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--osl-surface);
    border: 1px solid var(--osl-border);
    border-radius: var(--osl-radius);
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-card h1 {
    font-size: 1.4rem;
    margin: 0 0 0.35rem;
}

.subtitle {
    color: var(--osl-text-muted);
    margin: 0 0 1rem;
    font-size: 0.9rem;
}

.auth-card p.subtitle {
    color: var(--osl-text-muted);
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
}

.field {
    margin-bottom: 1.1rem;
}

.field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    color: var(--osl-text-muted);
}

.field input {
    width: 100%;
    padding: 0.65rem 0.8rem;
    background: var(--osl-bg-elevated);
    border: 1px solid var(--osl-border);
    border-radius: 8px;
    color: var(--osl-text);
    font-size: 0.95rem;
}

.field input:focus {
    outline: none;
    border-color: var(--osl-purple);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.25);
}

.field.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.field.checkbox input {
    width: auto;
}

button.btn-primary {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(90deg, var(--osl-purple-dark), var(--osl-purple));
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

button.btn-primary:hover {
    opacity: 0.9;
}

button.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-message {
    margin-top: 1rem;
    padding: 0.65rem 0.8rem;
    border-radius: 8px;
    font-size: 0.85rem;
    display: none;
}

.form-message.error {
    display: block;
    background: rgba(248, 113, 113, 0.12);
    color: var(--osl-danger);
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.form-message.success {
    display: block;
    background: rgba(74, 222, 128, 0.12);
    color: var(--osl-success);
    border: 1px solid rgba(74, 222, 128, 0.3);
}

.auth-links {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--osl-text-muted);
}

.step {
    display: none;
}

.step.active {
    display: block;
}

.announcement-banner {
    background: rgba(139, 92, 246, 0.12);
    border-bottom: 1px solid rgba(139, 92, 246, 0.3);
    color: var(--osl-text);
    padding: 0.65rem 0;
    font-size: 0.85rem;
    overflow: hidden;
    white-space: nowrap;
}

.announcement-banner-track {
    display: inline-block;
    padding-left: 100%;
    animation: announcement-scroll 18s linear infinite;
}

.announcement-banner:hover .announcement-banner-track {
    animation-play-state: paused;
}

@keyframes announcement-scroll {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

footer.site-footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--osl-text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--osl-border);
}

footer.site-footer .footer-links {
    margin-bottom: 0.5rem;
}

footer.site-footer .footer-links a {
    color: var(--osl-text-muted);
    margin: 0 0.75rem;
    font-size: 0.8rem;
}

footer.site-footer .footer-links a:hover {
    color: var(--osl-text);
    text-decoration: none;
}
