/**
 * 登录 / 注册 — 与商城活动页统一的深色风格
 */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    padding-top: calc(24px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
}

.auth-wrap {
    width: 100%;
    max-width: 400px;
}

.auth-card {
    background: rgba(12, 18, 32, 0.88);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(126, 231, 135, 0.25);
    border-radius: 20px;
    padding: 32px 24px 28px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo-icon {
    font-size: 56px;
    line-height: 1;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 12px rgba(126, 231, 135, 0.3));
}

.auth-logo h1 {
    margin: 0 0 8px;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(90deg, #7ee787, #00d9ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-logo p {
    margin: 0;
    font-size: 14px;
    color: var(--act-muted, #8b9cb3);
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form .form-group:last-of-type {
    margin-bottom: 0;
}

.auth-input,
.auth-form input,
.auth-form select {
    width: 100%;
    min-height: 48px;
    padding: 0 16px;
    box-sizing: border-box;
    border: 1px solid var(--act-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.35);
    color: var(--act-text, #f0f4f8);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form select {
    appearance: none;
    background-color: rgba(0, 0, 0, 0.35);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b9cb3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.auth-form select option {
    background: #1a2332;
    color: #f0f4f8;
}

.auth-form input::placeholder {
    color: rgba(139, 156, 179, 0.75);
}

.auth-form input:focus,
.auth-form select:focus {
    border-color: rgba(126, 231, 135, 0.55);
    box-shadow: 0 0 0 3px rgba(126, 231, 135, 0.15);
}

.auth-btn-submit {
    width: 100%;
    min-height: 48px;
    margin-top: 8px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(90deg, #2ecc71, #7ee787);
    color: #0f1419;
    box-shadow: 0 4px 20px rgba(126, 231, 135, 0.35);
    transition: transform 0.15s, opacity 0.15s;
}

.auth-btn-submit:active {
    transform: scale(0.98);
}

.auth-btn-submit:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer .link {
    color: #7ee787;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.auth-footer .link:active {
    opacity: 0.8;
}

/* 角色选择弹窗 */
.auth-role-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.65);
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.auth-role-modal.show {
    display: flex;
}

.auth-role-sheet {
    width: 100%;
    max-width: 480px;
    max-height: min(88vh, 640px);
    background: linear-gradient(180deg, #1e2a3a 0%, #151c28 100%);
    border-radius: 18px 18px 0 0;
    border: 1px solid var(--act-border, rgba(255, 255, 255, 0.08));
    border-bottom: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: authSheetUp 0.28s ease-out;
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

@keyframes authSheetUp {
    from { transform: translateY(100%); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
}

.auth-role-drag {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 4px;
    margin: 10px auto 4px;
    flex-shrink: 0;
}

.auth-role-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px 14px;
    border-bottom: 1px solid var(--act-border, rgba(255, 255, 255, 0.08));
    flex-shrink: 0;
}

.auth-role-head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--act-text, #f0f4f8);
}

.auth-role-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.auth-role-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 12px 16px 16px;
}

.auth-role-list {
    max-height: none;
}

.auth-role-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--act-border, rgba(255, 255, 255, 0.1));
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s, background 0.2s;
}

.auth-role-item:last-child {
    margin-bottom: 0;
}

.auth-role-item:active {
    transform: scale(0.99);
    border-color: rgba(126, 231, 135, 0.45);
    background: rgba(126, 231, 135, 0.08);
}

.auth-role-main {
    flex: 1;
    min-width: 0;
}

.auth-role-server {
    font-size: 12px;
    color: #7ee787;
    margin-bottom: 4px;
    font-weight: 600;
}

.auth-role-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--act-text, #f0f4f8);
    margin-bottom: 6px;
}

.auth-role-vip {
    display: inline-block;
    font-size: 11px;
    color: #fbbf24;
    background: rgba(251, 191, 36, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.auth-role-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.auth-role-normal-tag {
    display: inline-block;
    font-size: 11px;
    color: #7ee787;
    background: rgba(126, 231, 135, 0.15);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.auth-role-banned-tag {
    display: inline-block;
    font-size: 11px;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.auth-role-item.banned {
    cursor: not-allowed;
    opacity: 0.72;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.auth-role-item.banned:active {
    transform: none;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(239, 68, 68, 0.08);
}

.auth-role-balance {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: right;
    flex-shrink: 0;
}

.auth-role-balance .balance-item {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 12px;
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
}

.auth-role-balance .num {
    font-weight: 700;
    color: #ffd700;
}

.auth-role-balance .label {
    color: var(--act-muted, #8b9cb3);
    font-size: 10px;
}

.auth-role-arrow {
    font-size: 22px;
    color: var(--act-muted, #8b9cb3);
    flex-shrink: 0;
}

.auth-role-list::-webkit-scrollbar {
    width: 6px;
}

.auth-role-list::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.auth-role-list::-webkit-scrollbar-thumb {
    background: rgba(126, 231, 135, 0.35);
    border-radius: 3px;
}

@media (min-width: 769px) {
    .auth-role-modal {
        align-items: center;
        padding: 20px;
    }

    .auth-role-sheet {
        border-radius: 18px;
        max-height: 85vh;
        animation: none;
    }
}
