/* ============================================================
   authStyles.css — вход/регистрация, кнопка профиля, личный кабинет
   Стиль: ретро-аркада (Press Start 2P), как в style.css
   ============================================================ */

/* ---------- Кнопка профиля (фикс. верхний правый угол) ---------- */
.auth-chip {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 90000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(10, 2, 20, 0.92);
    border: 2px solid #ff00ff;
    box-shadow: 0 0 12px rgba(255, 0, 255, 0.5), inset 0 0 8px rgba(255, 0, 255, 0.15);
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 6px 12px 6px 6px;
    border-radius: 4px;
    transition: all 0.15s;
    max-width: 260px;
    white-space: nowrap;
    overflow: hidden;
}
.auth-chip:hover {
    border-color: #fff;
    box-shadow: 0 0 18px #ff00ff, 0 0 30px #ff00ff;
}
.auth-chip-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #00ff66;
    flex: 0 0 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.auth-chip-avatar-letter {
    background: #330066;
    color: #00ff66;
    font-size: 12px;
    text-shadow: 0 0 6px #00ff66;
}
.auth-chip-name {
    text-overflow: ellipsis;
    overflow: hidden;
    color: #00ff66;
    text-shadow: 0 0 6px #00ff66;
}

/* ---------- Модалка входа ---------- */
.auth-modal {
    position: fixed;
    inset: 0;
    z-index: 95000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Press Start 2P', monospace;
}
.auth-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 0, 12, 0.9);
    backdrop-filter: blur(3px);
}
.auth-modal-box {
    position: relative;
    width: min(420px, 92vw);
    max-height: 88vh;
    overflow-y: auto;
    background: #120224;
    border: 4px double #ff00ff;
    box-shadow: 0 0 30px rgba(255, 0, 255, 0.6), inset 0 0 20px rgba(255, 0, 255, 0.15);
    padding: 26px 24px;
    color: #fff;
    box-sizing: border-box;
}
.auth-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: none;
    color: #ff0055;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Press Start 2P', monospace;
    text-shadow: 0 0 8px #ff0055;
}
.auth-modal-title {
    text-align: center;
    color: #ffcc00;
    font-size: 14px;
    text-shadow: 0 0 10px #ffcc00;
    margin-bottom: 18px;
}
.auth-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}
.auth-tab {
    flex: 1;
    background: #1a0330;
    border: 2px solid #553388;
    color: #9977cc;
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 8px 4px;
    cursor: pointer;
    transition: all 0.12s;
}
.auth-tab.active {
    border-color: #ff00ff;
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.5);
}
.auth-form label {
    display: block;
    color: #ff00ff;
    font-size: 7px;
    margin: 10px 0 4px;
    letter-spacing: 1px;
}
.auth-form input {
    width: 100%;
    box-sizing: border-box;
    background: #05000c;
    border: 2px solid #663399;
    color: #fff;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    padding: 10px 10px;
    outline: none;
}
.auth-form input:focus {
    border-color: #00ff66;
    box-shadow: 0 0 8px rgba(0, 255, 102, 0.4);
}
.auth-submit {
    width: 100%;
    margin-top: 16px;
    background: #00ff66;
    border: none;
    color: #000;
    font-family: 'Press Start 2P', monospace;
    font-size: 9px;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 0 12px #00ff66;
    transition: all 0.12s;
}
.auth-submit:hover { background: #fff; box-shadow: 0 0 20px #fff; }
.auth-submit:disabled { opacity: 0.6; cursor: wait; }
.auth-error {
    margin-top: 12px;
    background: #2a0008;
    border: 1px solid #ff0055;
    color: #ff8888;
    font-size: 7px;
    padding: 8px;
    line-height: 1.6;
}
.auth-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 10px;
    color: #664488;
    font-size: 7px;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #332255;
}
.auth-social {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.auth-social-btn {
    font-family: 'Press Start 2P', monospace;
    font-size: 8px;
    padding: 10px;
    cursor: pointer;
    border: 2px solid;
    color: #fff;
    transition: all 0.12s;
}
.auth-google-btn {
    background: #0b1a2a;
    border-color: #4285F4;
}
.auth-google-btn:hover { box-shadow: 0 0 12px #4285F4; background: #0f2438; }
.auth-tg-btn {
    background: #0b1a2a;
    border-color: #229ED9;
}
.auth-tg-btn:hover { box-shadow: 0 0 12px #229ED9; background: #0f2438; }
.auth-discord-btn {
    background: #0b1a2a;
    border-color: #5865F2;
}
.auth-discord-btn:hover { box-shadow: 0 0 12px #5865F2; background: #091228; }

/* Telegram box внутри модалки */
.auth-tg-box {
    margin-top: 12px;
    background: #0a0520;
    border: 2px solid #229ED9;
    padding: 14px;
    text-align: center;
}
.auth-tg-title { color: #229ED9; font-size: 8px; margin-bottom: 10px; }
.auth-tg-code {
    font-size: 24px;
    color: #00ff66;
    text-shadow: 0 0 12px #00ff66;
    letter-spacing: 6px;
    margin: 8px 0;
}
.auth-tg-hint { color: #9988bb; font-size: 7px; line-height: 1.7; margin-bottom: 8px; }
.auth-tg-link {
    display: inline-block;
    color: #229ED9;
    font-size: 8px;
    text-decoration: none;
    border: 1px solid #229ED9;
    padding: 6px 10px;
    margin: 4px 0 8px;
}
.auth-tg-link:hover { background: #229ED9; color: #000; }
.auth-tg-status { color: #ffcc00; font-size: 7px; margin-top: 6px; }

/* ---------- Виджет: Личный кабинет (account) ---------- */
/* Стили носятся на .widget-content и читают CSS-переменные темы (--widget-*). */
.account-w-tabs { position:sticky; top:0; z-index:2; display:flex; flex-wrap:wrap; gap:5px; margin:0 0 8px 0; background:var(--widget-panel-bg,#130324); padding:4px 0; }
.account-w-tab { font:inherit; font-size:calc(var(--widget-font-size,8px) * .875); color:inherit; padding:5px 8px; border:2px solid var(--widget-border-color,#ff00ff); background:rgba(255,255,255,.08); color:var(--widget-font-color,#fff); cursor:pointer; border-radius:4px; white-space:nowrap; }
.account-w-tab:hover { background:rgba(255,255,255,.14); }
.account-w-tab.active { border-color:var(--widget-success,#00ff66); color:var(--widget-accent,#aa44ff); box-shadow:0 0 8px rgba(170,68,255,.6); }
.account-w-panel { display:none; padding:2px 0; }
.account-w-panel[data-panel] { display:none; }
.account-w-card { background:rgba(0,0,0,.45); border:2px solid rgba(255,255,255,.1); padding:10px; margin-bottom:8px; border-radius:4px; box-sizing:border-box; }
.account-w-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.account-w-col { flex:1; min-width:180px; display:flex; flex-direction:column; gap:4px; }
.account-w-form { flex-direction:column; gap:8px; }
.account-w-field { display:flex; flex-direction:column; gap:3px; }
.account-w-label { color:var(--widget-info,#9977cc); font-size:calc(var(--widget-font-size,8px) * .8); }
.account-w-value { flex:1; word-break:break-word; color:rgba(255,255,255,.9); }
.account-w-input { background:rgba(0,0,0,.6); border:2px solid rgba(255,255,255,.2); color:inherit; font:inherit; padding:5px; width:100%; box-sizing:border-box; border-radius:3px; }
.account-w-input::placeholder { color:#776699; }
.account-w-btn { font:inherit; font-size:calc(var(--widget-font-size,8px)*.875); padding:5px 10px; border:none; border-radius:3px; cursor:pointer; white-space:nowrap; }
.account-w-btn-ok { background:var(--widget-success,#00ff66); color:#000; box-shadow:0 0 6px var(--widget-success,#00ff66); }
.account-w-btn-ok:hover { filter:brightness(1.15); }
.account-w-btn-purple { background:var(--widget-warning,#ff00ff); color:#fff; box-shadow:0 0 6px var(--widget-warning,#ff00ff); }
.account-w-btn-purple:hover { filter:brightness(1.15); }
.account-w-btn-danger { background:var(--widget-danger,#ff6666); color:#fff; box-shadow:0 0 6px var(--widget-danger,#ff6666); }
.account-w-btn-sm { font-size:calc(var(--widget-font-size,8px)*.75); padding:3px 6px; }
.account-w-avatar { width:56px; height:56px; border-radius:50%; border:2px solid var(--widget-warning,#ff00ff); object-fit:cover; flex-shrink:0; }
.account-w-muted { color:rgba(153,119,204,.5); }
.account-w-empty { color:var(--widget-info,#888); font-size:calc(var(--widget-font-size,8px)*.85); padding:16px; text-align:center; line-height:1.4; }
.account-w-msg { font-size:calc(var(--widget-font-size,8px)*.8); margin-top:6px; color:var(--widget-success,#00ff66); }
.account-w-msg.error { color:var(--widget-danger,#ff8888); }
.account-w-sub { color:var(--widget-warning,#ff00ff); font-size:calc(var(--widget-font-size,8px)*.8); margin:12px 0 6px; text-shadow:0 0 4px var(--widget-warning,#ff00ff); }
.account-w-table { width:100%; border-collapse:collapse; font-size:calc(var(--widget-font-size,8px)*.8); }
.account-w-table th { color:var(--widget-warning,#ff66ff); text-align:left; padding:6px 4px; border-bottom:2px solid var(--widget-warning,#ff66ff); }
.account-w-table td { padding:6px 4px; border-bottom:1px solid rgba(255,255,255,.1); color:rgba(255,255,255,.8); word-break:break-word; }
.account-w-table tr:hover td { background:rgba(255,255,255,.06); }
.account-w-link { color:var(--widget-success,#00ff66); text-decoration:none; }
.account-w-link:hover { color:#fff; text-decoration:underline; }
.account-w-stats-grid { display:flex; flex-wrap:wrap; gap:8px; }
.account-w-stat { background:rgba(0,0,0,.4); border:2px solid var(--widget-success,#00ff66); padding:10px; border-radius:4px; text-align:center; min-width:100px; flex:1; }
.account-w-num { color:var(--widget-accent,#ffcc00); font-size:calc(var(--widget-font-size,8px)*2); text-shadow:0 0 6px var(--widget-accent,#ffcc00); }
.account-w-lbl { color:var(--widget-info,#9977cc); font-size:calc(var(--widget-font-size,8px)*.8); margin-top:4px; }

/* ---------- Кнопка Войти/Профиль как виджет дашборда ---------- */
/* Внутренняя кнопка прозрачная и наследует внешность от рамки виджета,
   чтобы настройки виджета (фон, рамка, шрифт, цвет) реально работали. */
.auth-widget-btn {
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    user-select: none;
    background: transparent;
    border: 0;
    box-shadow: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    padding: 4px;
    border-radius: 0;
    transition: filter 0.15s, transform 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    overflow: hidden;
    cursor: pointer;
}
.auth-widget-btn:hover {
    filter: brightness(1.35);
    transform: scale(1.03);
}

/* Запасной плавающий чип на дашборде (когда в лейауте нет виджета auth) — слева сверху */
.auth-chip--fallback {
    top: 12px;
    left: 12px;
    right: auto;
}

/* ---------- Экраны: verify / forgot / reset ---------- */
.auth-form-links { margin-top: 8px; text-align: center; }
.auth-form-links a, .auth-forgot-link, .auth-link { color: #ffcc00; font-size: 7px; text-decoration: underline; cursor: pointer; }
.auth-form-links a:hover, .auth-forgot-link:hover, .auth-link:hover { color: #fff; }
.auth-link { color: #ffcc00; font-size: 7px; cursor: pointer; }
.auth-verify-screen .auth-verify-text { margin-bottom: 12px; color: #ccbbee; font-size: 7px; line-height: 1.5; }
.auth-verify-screen .auth-verify-text code { background: rgba(255,255,255,0.1); padding: 1px 4px; border-radius: 3px; color: #ffcc00; }
.auth-verify-screen .auth-submit, .auth-reset-screen .auth-submit, .auth-forgot-screen .auth-submit { margin-top: 10px; }
.auth-reset-inputs { display: flex; flex-direction: column; gap: 8px; }
#bratva-toast { font-family: 'Press Start 2P', monospace; }

