/* 统一身份认证系统样式 */
/* 符合工具箱深色科技主题 */

/* 登录模态框遮罩层 */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* 登录模态框 */
.auth-modal {
    background: var(--bg-card, #1a1a25);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5),
                0 0 60px rgba(0, 245, 255, 0.1);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
    position: relative;
}

.auth-modal-overlay.active .auth-modal {
    transform: scale(1) translateY(0);
}

/* 模态框头部 */
.auth-modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-modal-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.auth-modal-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, var(--neon-cyan, #00f5ff), var(--neon-blue, #0080ff));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary, #a0a0b0);
    margin: 0;
}

/* 关闭按钮 */
.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: var(--text-secondary, #a0a0b0);
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary, #ffffff);
}

/* 表单组 */
.auth-form-group {
    margin-bottom: 20px;
}

.auth-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary, #ffffff);
    margin-bottom: 8px;
}

.auth-form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary, #12121a);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 10px;
    color: var(--text-primary, #ffffff);
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.auth-form-input:focus {
    outline: none;
    border-color: var(--neon-cyan, #00f5ff);
    box-shadow: 0 0 0 3px rgba(0, 245, 255, 0.1);
}

.auth-form-input::placeholder {
    color: var(--text-muted, #6a6a7a);
}

/* 错误提示 */
.auth-error-message {
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid rgba(255, 0, 110, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: var(--neon-pink, #ff006e);
    font-size: 14px;
    display: none;
    align-items: center;
    gap: 8px;
}

.auth-error-message.show {
    display: flex;
}

.auth-error-message::before {
    content: '⚠️';
}

/* 登录按钮 */
.auth-submit-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--neon-cyan, #00f5ff), var(--neon-blue, #0080ff));
    border: none;
    border-radius: 10px;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

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

/* 加载动画 */
.auth-submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid transparent;
    border-top-color: #000;
    border-radius: 50%;
    animation: auth-spin 0.8s linear infinite;
}

@keyframes auth-spin {
    to {
        transform: rotate(360deg);
    }
}

/* 页脚信息 */
.auth-modal-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.auth-modal-footer p {
    font-size: 12px;
    color: var(--text-muted, #6a6a7a);
    margin: 0;
}

/* 页面内容遮罩（未登录时） */
.auth-page-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary, #0a0a0f);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.auth-page-overlay-content {
    text-align: center;
    padding: 40px;
}

.auth-page-overlay-icon {
    font-size: 64px;
    margin-bottom: 24px;
}

.auth-page-overlay-title {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
    margin-bottom: 12px;
}

.auth-page-overlay-text {
    font-size: 16px;
    color: var(--text-secondary, #a0a0b0);
    margin-bottom: 32px;
}

.auth-page-overlay-btn {
    padding: 14px 32px;
    background: linear-gradient(135deg, var(--neon-cyan, #00f5ff), var(--neon-blue, #0080ff));
    border: none;
    border-radius: 10px;
    color: #000;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.auth-page-overlay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 245, 255, 0.3);
}

/* 导航栏认证按钮 */
.auth-nav-btn {
    padding: 8px 16px;
    background: transparent;
    border: 1px solid var(--neon-cyan, #00f5ff);
    border-radius: 8px;
    color: var(--neon-cyan, #00f5ff);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-nav-btn:hover {
    background: rgba(0, 245, 255, 0.1);
}

.auth-nav-btn.primary {
    background: linear-gradient(135deg, var(--neon-cyan, #00f5ff), var(--neon-blue, #0080ff));
    border: none;
    color: #000;
}

.auth-nav-btn.primary:hover {
    box-shadow: 0 4px 15px rgba(0, 245, 255, 0.3);
}

/* 用户信息显示 */
.auth-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.auth-username {
    color: var(--text-primary, #ffffff);
    font-size: 14px;
    font-weight: 500;
}

/* 管理入口按钮 */
.auth-admin-btn {
    padding: 8px 16px;
    background: rgba(184, 41, 221, 0.1);
    border: 1px solid var(--neon-purple, #b829dd);
    border-radius: 8px;
    color: var(--neon-purple, #b829dd);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-admin-btn:hover {
    background: rgba(184, 41, 221, 0.2);
}

/* 响应式适配 */
@media (max-width: 480px) {
    .auth-modal {
        padding: 24px;
        margin: 16px;
    }

    .auth-modal-title {
        font-size: 20px;
    }

    .auth-form-input {
        padding: 10px 14px;
    }

    .auth-submit-btn {
        padding: 12px 20px;
    }
}

/* 动画效果 */
@keyframes auth-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-modal-content {
    animation: auth-fade-in 0.3s ease;
}

/* 霓虹光效装饰 */
.auth-modal::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: linear-gradient(135deg, var(--neon-cyan, #00f5ff), var(--neon-purple, #b829dd));
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.auth-modal-overlay.active .auth-modal::before {
    opacity: 0.3;
}