/* main.css - 主样式文件
 * 功能: 主要布局、侧边栏、内容区域、卡片网格、模态框、表单、通知系统
 * 导入: variables.css, base.css
 */

/* 导入基础文件 */
@import url('./variables.css');
@import url('./base.css');

/* 导入组件样式 */
@import url('./components/buttons.css');
@import url('./components/privacy-consent.css');

/* ===== 布局样式 ===== */

/* 页面整体布局 */
body {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--background-color);
}

/* 头部样式 */
header {
    background: linear-gradient(135deg, var(--surface-color) 0%, rgba(30, 30, 30, 0.95) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-color);
    font-size: 20px;
    font-weight: 600;
}

.logo i {
    font-size: 24px;
    color: var(--primary-color);
}

/* 主内容容器 */
.main-container {
    display: flex;
    flex: 1;
    height: calc(100vh - 80px); /* 减去header高度 */
    background-color: transparent;
}

/* 侧边栏样式 */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--surface-color) 0%, rgba(30, 30, 30, 0.95) 100%);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
}

/* 侧边栏分类样式 */
.category {
    margin-bottom: 8px;
}

.category-header {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 12px;
}

.category-header:hover {
    background-color: rgba(187, 134, 252, 0.1);
}

/* 分类选中状态 */
.category.active .category-header {
    background-color: rgba(187, 134, 252, 0.2);
    border: 1px solid rgba(187, 134, 252, 0.3);
}

.category.active .category-title {
    color: var(--primary-color);
    font-weight: 600;
}

.category.active .category-title i {
    color: var(--primary-color);
    text-shadow: 0 0 8px rgba(187, 134, 252, 0.5);
}

.category-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 14px;
}

.category-title i {
    font-size: 20px;
    color: var(--primary-color);
}

.category-arrow {
    font-size: 18px;
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.category.expanded .category-arrow {
    transform: rotate(90deg);
}

.category-items {
    display: none;
    padding-left: 20px;
    margin-top: 8px;
}

.category.expanded .category-items {
    display: block;
}

.category-item {
    padding: 10px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 13px;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin: 2px 12px;
}

.category-item:hover {
    background-color: rgba(187, 134, 252, 0.1);
    color: var(--primary-color);
}

.category-item.active {
    background-color: rgba(187, 134, 252, 0.2);
    color: var(--primary-color);
    font-weight: 500;
}

.category-item i {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

/* 内容区域 */
.content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
    background-color: var(--background-color);
}

.content-header {
    margin-bottom: 32px;
    text-align: center;
}

.content-title {
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 12px;
    color: var(--text-color);
    letter-spacing: 1px;
}

.content-subtitle {
    color: var(--text-secondary);
    font-size: 18px;
    line-height: 1.6;
}

/* 卡片网格布局 - 固定尺寸 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 280px);
    gap: 12px;
    padding: 0;
    justify-content: center;
}

/* 模块卡片样式 - 固定正方形 */
.module-card {
    background: linear-gradient(145deg, var(--surface-color) 0%, rgba(30, 30, 30, 0.95) 100%);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    width: 280px;
    height: 280px;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), #A876E8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.module-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.module-card:hover::before {
    opacity: 1;
}

.module-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(187, 134, 252, 0.2), rgba(187, 134, 252, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.module-card:hover .module-icon {
    background: linear-gradient(135deg, rgba(187, 134, 252, 0.3), rgba(187, 134, 252, 0.2));
    transform: scale(1.1);
}

.module-icon i {
    font-size: 28px;
    color: var(--primary-color);
}

.module-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-color);
    line-height: 1.3;
}

.module-description {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.module-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.module-category {
    background: rgba(187, 134, 252, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid rgba(187, 134, 252, 0.3);
}

.module-link {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.module-link:hover {
    gap: 10px;
    color: #A876E8;
}

.module-link i {
    font-size: 16px;
    transition: transform 0.3s ease;
}

.module-link:hover i {
    transform: translateX(2px);
}

/* 页脚样式 */
footer {
    background: var(--surface-color);
    border-top: 1px solid var(--border-color);
    padding: 20px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-top: auto;
}

/* ===== 头部样式 ===== */

.header {
    background: linear-gradient(135deg, var(--surface-color) 0%, rgba(30, 30, 30, 0.95) 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-color);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color), #A876E8);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #121212;
    font-weight: bold;
    font-size: 16px;
}

.logo-text {
    font-size: 20px;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 认证按钮组样式 */
.auth-buttons {
    position: relative;
    display: inline-flex;
    background: rgba(30, 30, 40, 0.6);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    gap: 4px;
}

/* ===== 认证按钮样式已移至 src/css/components/buttons.css ===== */

/* 认证按钮组遮罩样式 */
.auth-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 8px;
}

.auth-warning {
    display: flex;
    align-items: center;
    color: #FFC107;
    font-weight: bold;
    flex-direction: row;
    gap: 8px;
}

.warning-icon {
    font-size: 20px;
}

/* ===== 模态框样式 ===== */

/* 
 * 登录弹窗背景遮罩 - 必须与注册弹窗保持一致
 * 注意：这是弹窗背后的模糊背景，不是弹窗本身
 * 弹窗本身的样式在 .modal-content 中定义
 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);  /* 与注册弹窗保持一致的黑色背景 */
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(145deg, var(--surface-color) 0%, rgba(30, 30, 30, 0.95) 100%);
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal h2 {
    margin-bottom: 24px;
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    background: none;
    border: none;
    padding: 4px;
    line-height: 1;
}

.close:hover {
    color: var(--text-color);
}

/* 
 * 注册弹窗背景遮罩 - 标准的黑色模糊背景
 * 注意：这是弹窗背后的模糊背景，不是弹窗本身
 * 弹窗本身的样式在 .register-overlay-content 中定义
 */
.register-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);  /* 标准的黑色背景遮罩 */
    backdrop-filter: blur(5px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.register-overlay.active {
    display: flex;
}

.register-overlay-content {
    background: linear-gradient(145deg, var(--surface-color) 0%, rgba(30, 30, 30, 0.95) 100%);
    border-radius: 12px;
    padding: 32px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

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

.register-overlay h2 {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.register-overlay-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 4px;
    line-height: 1;
}

.register-overlay-close:hover {
    color: var(--text-color);
}

/* 邮箱验证弹窗样式 */
.email-verification-content {
    text-align: center;
    padding: 20px 0;
}

.email-verification-icon {
    position: relative;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-verification-icon .success-icon {
    font-size: 64px;
    color: var(--success-color);
    animation: successPulse 2s infinite;
    position: relative;
    z-index: 2;
}

.email-verification-icon .email-icon {
    font-size: 24px;
    color: var(--primary-color);
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--surface-color);
    border-radius: 50%;
    padding: 6px;
    border: 2px solid var(--success-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.email-verification-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--success-color);
    margin-bottom: 16px;
}

.email-verification-message {
    font-size: 16px;
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.5;
}

.email-verification-email {
    background: rgba(187, 134, 252, 0.1);
    border: 1px solid rgba(187, 134, 252, 0.3);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-family: monospace;
    font-size: 14px;
    color: var(--primary-color);
    word-break: break-all;
}

.email-verification-tips {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: left;
}

.tips-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 14px;
}

.tips-title i {
    color: var(--primary-color);
    font-size: 18px;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.tips-list li:last-child {
    margin-bottom: 0;
}

.tips-list li i {
    color: var(--success-color);
    font-size: 16px;
    margin-top: 1px;
    flex-shrink: 0;
}

.email-verification-close {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

/* 成功脉冲动画 */
@keyframes successPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ===== 通知系统样式 ===== */

/* 通知容器 */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    pointer-events: none;
}

/* 通知框基础样式 */
.notification-box {
    background: linear-gradient(135deg, rgba(45, 45, 55, 0.95) 0%, rgba(35, 35, 45, 0.98) 100%);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(15px);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
    overflow: hidden;
}

/* 通知框内部光晕效果 */
.notification-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    pointer-events: none;
}

/* 通知框移除动画 */
.notification-box.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* 通知内容 */
.notification-content {
    flex: 1;
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
}

/* 错误代码样式 - 醒目的红色 */
.notification-content .error-code {
    color: #ff4444;
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 68, 68, 0.3);
    background: rgba(255, 68, 68, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid rgba(255, 68, 68, 0.2);
    display: inline-block;
    margin-right: 8px;
}

/* 复制按钮 */
.notification-copy {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    padding: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.notification-copy:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    transform: scale(1.05);
}

.notification-copy i {
    font-size: 16px;
}

/* 不同类型的通知样式 */
.notification-box.success {
    border-left: 4px solid var(--success-color);
}

.notification-box.success::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--success-color);
    box-shadow: 0 0 12px rgba(76, 175, 80, 0.5);
}

.notification-box.error {
    border-left: 4px solid var(--error-color);
}

.notification-box.error::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--error-color);
    box-shadow: 0 0 12px rgba(244, 67, 54, 0.5);
}

.notification-box.warning {
    border-left: 4px solid #ff9800;
}

.notification-box.warning::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #ff9800;
    box-shadow: 0 0 12px rgba(255, 152, 0, 0.5);
}

.notification-box.info {
    border-left: 4px solid var(--primary-color);
}

.notification-box.info::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    box-shadow: 0 0 12px rgba(187, 134, 252, 0.5);
}

/* 通知动画 */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 固定位置复制提示样式 */
.copy-toast-fixed {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 10001;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    backdrop-filter: blur(12px);
}

.copy-toast-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.copy-toast-text {
    font-weight: 500;
}

/* 旧版通知样式兼容 */
.notification {
    display: none;
}

/* ===== 表单样式 ===== */

.form-group {
    position: relative;
    margin-bottom: 24px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
    overflow: hidden;
}

.form-group[style*="display: none"] {
    opacity: 0;
    transform: translateY(-20px);
    max-height: 0;
    margin: 0;
    padding: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* 输入框焦点和验证状态 */
.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(187, 134, 252, 0.2);
}

/* 验证成功状态 */
.form-group input.valid {
    border-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

/* 验证失败状态 */
.form-group input.invalid {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

/* 只有在用户交互后才显示invalid状态 */
.form-group input:invalid:not(:placeholder-shown) {
    border-color: var(--error-color);
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

/* 输入框包装器样式 */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    flex: 1;
    padding-right: 45px;
}

/* 密码输入框包装器 */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 50px;
}

/* 密码显示/隐藏按钮 */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(187, 134, 252, 0.1);
    border: 1px solid rgba(187, 134, 252, 0.3);
    color: var(--primary-color);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    z-index: 10;
}

.password-toggle:hover {
    background: rgba(187, 134, 252, 0.2);
    border-color: rgba(187, 134, 252, 0.5);
    color: #BB86FC;
    transform: translateY(-50%) scale(1.05);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
    background: rgba(187, 134, 252, 0.3);
}

.password-toggle i {
    font-size: 18px;
    font-weight: 500;
}

.password-input-wrapper input:focus + .password-toggle {
    border-color: var(--primary-color);
    background: rgba(187, 134, 252, 0.15);
}

.password-toggle.active {
    background: rgba(187, 134, 252, 0.4);
    border-color: var(--primary-color);
    color: #ffffff;
    box-shadow: 0 0 12px rgba(187, 134, 252, 0.6);
    transform: translateY(-50%) scale(0.95);
}

.password-toggle.active i {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* 清空输入框按钮 */
.clear-input-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    z-index: 10;
    opacity: 0.6;
}

.clear-input-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
}

.clear-input-btn:active {
    transform: translateY(-50%) scale(0.95);
    background: rgba(255, 255, 255, 0.15);
}

.clear-input-btn i {
    font-size: 16px;
}

/* 注册表单样式 */
.register-overlay-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.register-overlay-form .form-group {
    margin-bottom: 0;
}

.register-overlay-form .form-group label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.register-overlay-form .form-group input {
    padding: 12px;
    font-size: 16px;
}

.register-overlay-form button {
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.register-overlay-form button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== 弹窗内按钮样式已移至 src/css/components/buttons.css ===== */

/* 密码强度指示器样式 */
.password-strength {
    margin-top: 8px;
    margin-bottom: 4px;
}

.password-strength-bar {
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.password-strength-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    border-radius: 2px;
    transition: all 0.3s ease;
    width: 0%;
}

/* 弱密码 */
.password-strength-bar.weak::before {
    width: 33%;
    background-color: #f44336;
    box-shadow: 0 0 8px rgba(244, 67, 54, 0.5);
}

/* 中等密码 */
.password-strength-bar.medium::before {
    width: 66%;
    background-color: #ff9800;
    box-shadow: 0 0 8px rgba(255, 152, 0, 0.5);
}

/* 强密码 */
.password-strength-bar.strong::before {
    width: 100%;
    background-color: #4caf50;
    box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.password-strength-text {
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: right;
}

/* 表单错误提示样式 */
.form-error {
    color: var(--error-color);
    font-size: 13px;
    margin-top: 6px;
    display: none;
    line-height: 1.4;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.form-error.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 表单成功提示样式 */
.form-success {
    color: var(--success-color);
    font-size: 13px;
    margin-top: 6px;
    display: none;
    line-height: 1.4;
    font-weight: 500;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

.form-success.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ===== 加载界面样式 ===== */

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, #2a2a3a 0%, #1a1a2e 50%, #16213e 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    overflow: hidden;
}

/* 背景动态粒子效果 */
.loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(187, 134, 252, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(168, 118, 232, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(187, 134, 252, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(168, 118, 232, 0.3), transparent),
        radial-gradient(2px 2px at 160px 30px, rgba(187, 134, 252, 0.2), transparent);
    background-repeat: repeat;
    background-size: 200px 100px;
    animation: particleFloat 20s linear infinite;
    opacity: 0.6;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

/* 加载容器 */
.loading-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
}

/* Logo容器 */
.loading-logo {
    position: relative;
    margin-bottom: 40px;
    animation: logoFloat 3s ease-in-out infinite;
}

.loading-logo-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #A876E8 50%, #8B5CF6 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #121212;
    font-weight: bold;
    font-size: 32px;
    box-shadow: 
        0 0 30px rgba(187, 134, 252, 0.4),
        0 0 60px rgba(187, 134, 252, 0.2),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.loading-logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: logoShimmer 2s linear infinite;
}

/* 多层旋转器 */
.loading-spinner-container {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 40px;
}

.loading-spinner {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    animation-timing-function: cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.loading-spinner-outer {
    width: 120px;
    height: 120px;
    border: 3px solid transparent;
    border-top: 3px solid var(--primary-color);
    border-right: 3px solid rgba(187, 134, 252, 0.3);
    animation: spinOuter 2s linear infinite;
    box-shadow: 0 0 20px rgba(187, 134, 252, 0.3);
}

.loading-spinner-middle {
    width: 90px;
    height: 90px;
    top: 15px;
    left: 15px;
    border: 2px solid transparent;
    border-top: 2px solid #A876E8;
    border-left: 2px solid rgba(168, 118, 232, 0.4);
    animation: spinMiddle 1.5s linear infinite reverse;
}

.loading-spinner-inner {
    width: 60px;
    height: 60px;
    top: 30px;
    left: 30px;
    border: 2px solid transparent;
    border-top: 2px solid #8B5CF6;
    border-bottom: 2px solid rgba(139, 92, 246, 0.5);
    animation: spinInner 1s linear infinite;
}

/* 中心脉冲点 */
.loading-spinner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background: radial-gradient(circle, var(--primary-color) 0%, #A876E8 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: centerPulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(187, 134, 252, 0.6);
}

/* 加载文字 */
.loading-text {
    font-size: 28px;
    font-weight: 300;
    color: var(--text-color);
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-align: center;
    background: linear-gradient(45deg, var(--text-color), var(--primary-color), var(--text-color));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: textShimmer 3s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(187, 134, 252, 0.3);
}

/* 加载状态 */
.loading-status {
    font-size: 16px;
    color: var(--text-secondary);
    margin-top: 20px;
    min-height: 24px;
    transition: all 0.4s ease;
    text-align: center;
    font-weight: 500;
    letter-spacing: 0.5px;
    position: relative;
}

.loading-status::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    transition: width 0.4s ease;
    transform: translateX(-50%);
}

.loading-status:not(:empty)::after {
    width: 100%;
}

.loading-status.success {
    color: var(--success-color);
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

.loading-status.error {
    color: var(--error-color);
    text-shadow: 0 0 10px rgba(244, 67, 54, 0.3);
}

.loading-status.warning {
    color: #FFC107;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.3);
}

/* 进度条 */
.loading-progress {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-top: 30px;
    overflow: hidden;
    position: relative;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #A876E8, #8B5CF6);
    border-radius: 2px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    box-shadow: 0 0 10px rgba(187, 134, 252, 0.5);
}

.loading-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShimmer 2s linear infinite;
}

/* 动画定义 */
@keyframes particleFloat {
    0% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-800px) translateX(100px); }
    66% { transform: translateY(-1600px) translateX(-100px); }
    100% { transform: translateY(-2400px) translateX(0px); }
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}

@keyframes logoShimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

@keyframes spinOuter {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spinMiddle {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(-360deg); }
}

@keyframes spinInner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes centerPulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0.7;
    }
}

@keyframes textShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 兼容旧版本的loading-overlay样式 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ===== 错误面板样式 ===== */

.register-error-panel,
.login-error-panel {
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.1) 0%, rgba(244, 67, 54, 0.05) 100%);
    border: 1px solid rgba(244, 67, 54, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    display: none;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.register-error-panel.show,
.login-error-panel.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.register-error-content,
.login-error-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.register-error-icon,
.login-error-icon {
    color: var(--error-color);
    font-size: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.register-error-text,
.login-error-text {
    flex: 1;
}

.register-error-title,
.login-error-title {
    font-weight: 600;
    color: var(--error-color);
    margin-bottom: 4px;
    font-size: 14px;
}

.register-error-message,
.login-error-message {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

/* ===== 进度指示器样式 ===== */

.register-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 8px;
}

.register-progress-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

.register-progress-item.completed {
    color: var(--success-color);
}

.register-progress-item.error {
    color: #f44336;
}

.register-progress-item i {
    font-size: 24px;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.register-progress-item.completed i {
    color: var(--success-color);
}

.register-progress-item.error i {
    color: #f44336;
}

.register-progress-item span {
    font-size: 12px;
    text-align: center;
    font-weight: 500;
}

.register-progress-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 60%;
    width: 80%;
    height: 2px;
    background-color: var(--border-color);
    transition: background-color 0.3s ease;
}

.register-progress-item.completed:not(:last-child)::after {
    background-color: var(--success-color);
}

/* ===== 动画定义 ===== */

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

@keyframes pulse {
    0%, 100% { 
        box-shadow: 0 4px 12px rgba(187, 134, 252, 0.3);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 4px 20px rgba(187, 134, 252, 0.5);
        transform: scale(1.02);
    }
}

@keyframes loadingPulse {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes progressShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* 呼吸灯动画 - 按钮专用 */
@keyframes breathingGlow {
    0%, 100% {
        box-shadow: 
            0 4px 12px rgba(187, 134, 252, 0.3),
            0 2px 4px rgba(0, 0, 0, 0.1),
            inset 0 1px 0 rgba(255, 255, 255, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(187, 134, 252, 0.5),
            0 4px 8px rgba(0, 0, 0, 0.15),
            inset 0 1px 0 rgba(255, 255, 255, 0.3),
            0 0 25px rgba(187, 134, 252, 0.4);
        transform: scale(1.02);
    }
}

/* 按钮光晕脉冲动画 */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 
            0 4px 12px rgba(187, 134, 252, 0.3),
            0 0 20px rgba(187, 134, 252, 0.2);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(187, 134, 252, 0.5),
            0 0 35px rgba(187, 134, 252, 0.4);
    }
}

/* ===== 响应式设计 - 移动端优化 ===== */

/* 平板设备适配 (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
    .main-container {
        height: auto;
    }
    
    .sidebar {
        width: 240px;
    }
    
    .content {
        padding: 24px;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .module-card {
        width: 100%;
        height: auto;
        min-height: 240px;
    }
    
    .modal-content,
    .register-overlay-content {
        width: 90%;
        max-width: 500px;
        padding: 28px;
    }
}

/* 移动设备适配 (< 768px) */
@media (max-width: 767px) {
    /* 头部适配 */
    header {
        padding: 12px 16px;
        height: 60px;
        min-height: 60px;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .logo i {
        font-size: 22px;
    }
    
    /* 主容器适配 */
    .main-container {
        flex-direction: column;
        height: auto;
        /* 为固定定位的header和导航留出空间 */
        margin-top: 120px;
        padding-top: 0;
    }
    
    /* 隐藏PC端侧边栏 */
    .sidebar {
        display: none !important;
    }
    
    /* 内容区域适配 */
    .content {
        width: 100%;
        margin-left: 0;
        padding: 20px 16px;
        order: 1;
    }
    
    .content-header {
        margin-bottom: 24px;
        text-align: center;
    }
    
    .content-title {
        font-size: 28px;
        margin-bottom: 12px;
        line-height: 1.2;
    }
    
    .content-subtitle {
        font-size: 16px;
        line-height: 1.5;
    }
    
    /* 卡片网格适配 */
    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 0;
        justify-content: center;
    }
    
    .module-card {
        width: 100%;
        max-width: 400px;
        height: auto;
        min-height: 200px;
        margin: 0 auto;
    }
    
    /* 弹窗适配 */
    .modal-content,
    .register-overlay-content {
        width: 95%;
        max-width: 95%;
        padding: 24px 20px;
        margin: 0 10px;
    }
    
    /* 表单适配 */
    .form-group input {
        padding: 14px 16px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    .form-submit-btn {
        padding: 14px 24px;
        min-height: 50px;
        font-size: 16px;
    }
    
    /* 通知适配 */
    .notification-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
    }
    
    .notification-box {
        min-width: auto;
        max-width: none;
        width: 100%;
    }
}

/* 小屏移动设备适配 (< 480px) */
@media (max-width: 479px) {
    /* 头部进一步优化 */
    header {
        padding: 10px 12px;
        height: 56px;
        min-height: 56px;
    }
    
    .logo {
        font-size: 16px;
    }
    
    .logo i {
        font-size: 20px;
    }
    
    /* 主容器调整 */
    .main-container {
        margin-top: 116px; /* 调整为更小的header高度 */
    }
    
    /* 内容区域优化 */
    .content {
        padding: 16px 12px;
    }
    
    .content-title {
        font-size: 24px;
    }
    
    .content-subtitle {
        font-size: 14px;
    }
    
    /* 卡片优化 */
    .module-card {
        max-width: 350px;
        padding: 20px;
    }
    
    .module-title {
        font-size: 18px;
    }
    
    .module-description {
        font-size: 13px;
    }
    
    /* 弹窗优化 */
    .modal-content,
    .register-overlay-content {
        padding: 20px 16px;
        width: 98%;
    }
    
    /* 表单优化 */
    .form-group input {
        padding: 12px 14px;
        font-size: 16px;
    }
    
    .form-submit-btn {
        padding: 12px 20px;
        min-height: 46px;
        font-size: 15px;
    }
    
    /* 加载界面优化 */
    .loading-text {
        font-size: 20px;
    }
    
    .loading-status {
        font-size: 14px;
    }
    
    .loading-progress {
        width: 250px;
    }
}

/* 横屏模式特殊处理 */
@media (max-width: 767px) and (orientation: landscape) {
    .main-container {
        margin-top: 100px; /* 横屏时减少顶部间距 */
    }
    
    .content {
        padding: 16px;
    }
    
    .card-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 12px;
    }
    
    .module-card {
        min-height: 180px;
    }
}
