/* ==================== 账户分区样式 ==================== */
.account-section {
    margin-bottom: 16px;
}

.account-card {
    background: #16162a;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: background 0.2s ease;
}

.account-card:active {
    background: #1e1e3a;
}

.account-card.logged-in {
    cursor: default;
}

.account-card.logged-in:active {
    background: #16162a;
}

.account-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #fff;
}

.account-avatar.logged-in {
    background: linear-gradient(135deg, #00cec9, #81ecec);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
}

.account-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.account-name {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
}

.account-hint {
    font-size: 13px;
    color: #888;
}

.account-action {
    color: #888;
    font-size: 20px;
    transition: color 0.2s ease;
}

.account-card:not(.logged-in) .account-action {
    color: #6c5ce7;
}

/* 退出登录按钮 */
.logout-btn {
    background: transparent;
    border: 1px solid #ff6b6b;
    color: #ff6b6b;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.logout-btn:active {
    background: #ff6b6b;
    color: #fff;
}

/* ==================== 登录弹窗样式 ==================== */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-modal.active {
    display: flex;
}

.login-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.login-modal-content {
    position: relative;
    background: #16162a;
    border-radius: 16px;
    width: 100%;
    max-width: 360px;
    padding: 24px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.login-modal.active .login-modal-content {
    transform: translateY(0);
    opacity: 1;
}

.login-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.login-modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.login-modal-close {
    background: transparent;
    border: none;
    color: #888;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.login-modal-close:active {
    color: #fff;
}

/* 登录表单 */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.login-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-input-label {
    font-size: 14px;
    color: #888;
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-wrapper i {
    position: absolute;
    left: 14px;
    color: #666;
    font-size: 18px;
    pointer-events: none;
}

.login-input {
    width: 100%;
    background: #1a1a2e;
    border: 1px solid #2a2a4a;
    border-radius: 10px;
    padding: 14px 14px 14px 44px;
    font-size: 16px;
    color: #fff;
    outline: none;
    transition: border-color 0.2s ease;
}

.login-input:focus {
    border-color: #6c5ce7;
}

.login-input::placeholder {
    color: #555;
}

/* 密码显示切换 */
.login-password-toggle {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 18px;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-password-toggle:active {
    color: #888;
}

/* 错误提示 */
.login-error {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    padding: 12px;
    display: none;
    align-items: center;
    gap: 8px;
    color: #ff6b6b;
    font-size: 14px;
}

.login-error.active {
    display: flex;
}

.login-error i {
    font-size: 18px;
}

/* 登录按钮 */
.login-submit-btn {
    background: linear-gradient(135deg, #6c5ce7, #a29bfe);
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.login-submit-btn:active {
    transform: scale(0.98);
    opacity: 0.9;
}

.login-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.login-submit-btn:disabled:active {
    transform: none;
}

/* 加载动画 */
.login-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: loginSpin 0.8s linear infinite;
}

@keyframes loginSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== 响应式适配 ==================== */
@media screen and (max-width: 360px) {
    .login-modal-content {
        padding: 20px;
    }

    .login-modal-title {
        font-size: 18px;
    }

    .login-input {
        padding: 12px 12px 12px 40px;
        font-size: 15px;
    }

    .login-input-wrapper i {
        left: 12px;
        font-size: 16px;
    }

    .login-submit-btn {
        padding: 12px;
        font-size: 15px;
    }
}

/* 安全区域适配 */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .login-modal {
        padding-bottom: env(safe-area-inset-bottom);
    }
}