.auth-modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
    opacity: 0; visibility: hidden;
    transition: all 0.3s ease;
}
.auth-modal-overlay.active { opacity: 1; visibility: visible; }

.auth-modal-content {
    background: rgba(30, 30, 30, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border-radius: 24px;
    width: 90%; max-width: 420px;
    padding: 35px 30px;
    position: relative;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--auth-text, #fff);
}
.auth-modal-overlay.active .auth-modal-content {
    transform: translateY(0) scale(1);
}

/* Light theme override for ws.html */
body.light-theme .auth-modal-content {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(141, 45, 43, 0.15);
}

/* Close button */
.auth-close {
    position: absolute; top: 15px; right: 20px;
    font-size: 28px; cursor: pointer; color: inherit;
    opacity: 0.6; transition: 0.2s; line-height: 1;
}
.auth-close:hover { opacity: 1; transform: scale(1.1); }

/* Tabs */
.auth-tabs { display: flex; gap: 20px; margin-bottom: 25px; border-bottom: 1px solid rgba(128,128,128,0.2); padding-bottom: 10px; }
.auth-tab {
    background: none; border: none; font-size: 24px; font-weight: 400;
    color: inherit; opacity: 0.4; cursor: pointer; padding: 0 0 5px 0;
    font-family: 'League Gothic', sans-serif; letter-spacing: 1px;
    transition: 0.3s; position: relative;
}
.auth-tab.active { opacity: 1; color: var(--auth-accent, #d14828); }
.auth-tab.active::after {
    content: ''; position: absolute; left: 0; bottom: -11px;
    width: 100%; height: 2px; background: var(--auth-accent, #d14828);
    border-radius: 2px; box-shadow: 0 0 8px var(--auth-accent, #d14828);
}

/* Forms */
.auth-form { display: none; flex-direction: column; gap: 16px; }
.auth-form.active { display: flex; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.auth-input-group { display: flex; flex-direction: column; gap: 6px; }
.auth-input-group label { font-size: 13px; font-weight: 600; opacity: 0.8; letter-spacing: 0.5px; }
.auth-input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; padding: 14px 16px;
    color: inherit; font-size: 15px; outline: none; transition: 0.3s;
}
body.light-theme .auth-input {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(0, 0, 0, 0.1);
}
.auth-input:focus { border-color: var(--auth-accent, #d14828); background: rgba(255, 255, 255, 0.15); box-shadow: 0 0 0 3px rgba(209, 72, 40, 0.2); }
body.light-theme .auth-input:focus { background: #fff; box-shadow: 0 0 0 3px rgba(141, 45, 43, 0.15); }
.auth-input::placeholder { color: inherit; opacity: 0.4; }

/* Buttons */
.auth-submit {
    background: var(--auth-accent, #d14828);
    color: #fff; border: none; border-radius: 12px;
    padding: 15px; font-size: 22px; font-weight: 400;
    cursor: pointer; transition: 0.3s; margin-top: 10px;
    font-family: 'League Gothic', sans-serif; letter-spacing: 1px;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(209, 72, 40, 0.4); }
body.light-theme .auth-submit { color: #fff; }
body.light-theme .auth-submit:hover { box-shadow: 0 6px 20px rgba(141, 45, 43, 0.3); }

.auth-divider { text-align: center; margin: 10px 0; font-size: 12px; opacity: 0.5; position: relative; text-transform: uppercase; font-weight: 600; letter-spacing: 1px; }
.auth-divider::before, .auth-divider::after {
    content: ''; position: absolute; top: 50%; width: 35%; height: 1px; background: currentColor; opacity: 0.3;
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }

.auth-google {
    background: #ffffff; color: #3b3b3b; border: none;
    border-radius: 12px; padding: 12px; font-size: 15px; font-weight: 600;
    cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 12px;
    transition: 0.3s; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.auth-google:hover { transform: translateY(-2px); box-shadow: 0 6px 15px rgba(255,255,255,0.2); }
body.light-theme .auth-google:hover { box-shadow: 0 6px 15px rgba(0,0,0,0.1); }
.auth-google img { width: 22px; height: 22px; }
