/* Dark Mode Login / Register */
:root {
    --bg: #0f0f12;
    --card-bg: #18181c;
    --text: #e4e4e7;
    --text-muted: #a1a1aa;
    --border: #27272a;
    --input-bg: #27272a;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --success: #22c55e;
    --err: #ef4444;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.15), transparent);
    pointer-events: none;
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    padding: 4px;
    background: var(--input-bg);
    border-radius: 10px;
}

.tab {
    flex: 1;
    padding: 0.65rem 1rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tab:hover {
    color: var(--text);
}

.tab.active {
    background: var(--bg);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.auth-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.auth-form label span:first-child {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.auth-form input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    font-size: 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.btn {
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s, transform 0.05s;
}

.btn.primary {
    background: var(--accent);
    color: #fff;
    margin-top: 1.5rem;
}

.btn.primary:hover {
    background: var(--accent-hover);
}

.btn.primary:active {
    transform: scale(0.98);
}

.msg {
    margin: 0 0 1rem 0;
    padding: 0.6rem 0.9rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.msg.success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.msg.err {
    background: rgba(239, 68, 68, 0.15);
    color: var(--err);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

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

.link:hover {
    text-decoration: underline;
}

.auth-card h1 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-card h2 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
}
