

body {
    font-family: 'Manrope', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.bg-particles { position: fixed; inset: 0; pointer-events: none; z-index: 0; }

.bg-particles span {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,90,235,0.18), transparent 70%);
    animation: drift 14s ease-in-out infinite;
}

.bg-particles span:nth-child(1) { width: 700px; height: 700px; top: -250px; left: -200px; animation-delay: 0s; }
.bg-particles span:nth-child(2) { width: 450px; height: 450px; bottom: -100px; right: -100px; animation-delay: -5s; background: radial-gradient(circle, rgba(59,130,246,0.12), transparent 70%); }
.bg-particles span:nth-child(3) { width: 300px; height: 300px; top: 45%; left: 55%; animation-delay: -8s; }
.bg-particles span:nth-child(4) { width: 200px; height: 200px; top: 20%; right: 15%; animation-delay: -2s; }
.bg-particles span:nth-child(5) { width: 500px; height: 500px; bottom: 15%; left: 15%; animation-delay: -11s; }

@keyframes drift {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(25px,-18px) scale(1.04); }
    66%      { transform: translate(-18px,25px) scale(0.96); }
}

.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text);
    text-decoration: none;
}

.auth-brand svg { filter: drop-shadow(0 0 12px rgba(34,90,235,0.7)); }

.auth-card {
    width: 100%;
    background: var(--surface);
    border: 1px solid var(--border2);
    border-radius: 16px;
    padding: 32px;
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.03);
}

.tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    position: relative;
    background: var(--surface2);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid var(--border);
}

.tab-indicator {
    position: absolute;
    top: 4px; left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--primary);
    border-radius: 7px;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
    z-index: 0;
    box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 40%, transparent);
}
.tab-indicator--register { transform: translateX(100%); }

.tab {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 10px;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: var(--muted);
    transition: color 0.3s;
}

.tab.active { color: #fff; }

.alert { padding: 12px 16px; border-radius: 8px; font-size: 13px; margin-bottom: 20px; font-weight: 600; }
.alert.error  { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #fca5a5; }
.alert.success{ background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #86efac; }

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

.field { display: flex; flex-direction: column; gap: 6px; }

.field label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--muted);
}

.field input {
    background: var(--surface2);
    border: 1px solid var(--border2);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.field input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.field input::placeholder { color: var(--muted); }

.btn-primary {
    width: 100%;
    padding: 13px;
    background: var(--primary);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
    margin-top: 4px;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 35%, transparent);
}

.btn-primary:hover { opacity: 0.88; transform: translateY(-1px); box-shadow: 0 6px 20px color-mix(in srgb, var(--primary) 40%, transparent); }
.btn-primary:active { transform: translateY(0); }

#toastContainer {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
    pointer-events: none;
}
.auth-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Manrope', sans-serif;
    box-shadow: 0 8px 32px rgba(0,0,0,.6);
    border: 1px solid transparent;
    pointer-events: auto;
    animation: authToastIn .3s cubic-bezier(.34,1.56,.64,1) forwards;
    max-width: 360px;
    line-height: 1.4;
}
.auth-toast--out { animation: authToastOut .25s ease forwards; }
.auth-toast--error   { background: rgba(239,68,68,.14);  border-color: rgba(239,68,68,.35);  color: #fca5a5; }
.auth-toast--success { background: rgba(34,197,94,.12);  border-color: rgba(34,197,94,.3);   color: #86efac; }
.auth-toast--info    { background: rgba(34,90,235,.14);  border-color: rgba(34,90,235,.35);  color: #a5b4fc; }
.toast-icon { flex-shrink: 0; width: 18px; height: 18px; }
.auth-toast-close {
    margin-left: auto;
    flex-shrink: 0;
    opacity: .5;
    cursor: pointer;
    background: none;
    border: none;
    color: inherit;
    padding: 0;
    font-size: 18px;
    line-height: 1;
    transition: opacity .15s;
}
.auth-toast-close:hover { opacity: 1; }
@keyframes authToastIn  { from { opacity:0; transform:translateY(12px) scale(.95); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes authToastOut { from { opacity:1; transform:translateY(0) scale(1); } to { opacity:0; transform:translateY(8px) scale(.95); } }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0;
    color: var(--muted, #64748b);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border, rgba(255,255,255,.08));
}
.btn-steam {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 11px 18px;
    border-radius: 10px;
    background: #1b2838;
    border: 1px solid rgba(255,255,255,.1);
    color: #c6d4df;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
    letter-spacing: .01em;
}
.btn-steam:hover {
    background: #2a475e;
    border-color: #66c0f4;
    color: #fff;
}

[data-theme="light"] .auth-card {
    box-shadow: var(--shadow-lg);
    border-color: var(--border2);
}
[data-theme="light"] .bg-particles span {
    background: radial-gradient(circle, rgba(41,120,160,.12), transparent 70%);
}
[data-theme="light"] .field input {
    background: var(--surface2);
    border-color: var(--border2);
    color: var(--text);
}
[data-theme="light"] .btn-steam {
    background: var(--surface2);
    border-color: var(--border2);
    color: var(--text2);
}
[data-theme="light"] .btn-steam:hover {
    background: var(--surface3);
    border-color: var(--primary);
    color: var(--text);
}
[data-theme="light"] .alert.error  { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.25); color: #dc2626; }
[data-theme="light"] .alert.success { background: rgba(22,163,74,.08); border-color: rgba(22,163,74,.25); color: #16a34a; }
[data-theme="light"] .auth-toast--error   { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.25); color: #dc2626; }
[data-theme="light"] .auth-toast--success { background: rgba(22,163,74,.08); border-color: rgba(22,163,74,.25); color: #16a34a; }
[data-theme="light"] .auth-toast--info    { background: rgba(41,120,160,.08); border-color: rgba(41,120,160,.25); color: var(--primary); }

