/* Material Design 3.0 主题变量 */
:root {
    /* 基础颜色 */
    --md-sys-color-primary: #6750A4;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #EADDFF;
    --md-sys-color-on-primary-container: #21005D;
    
    --md-sys-color-secondary: #625B71;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #E8DEF8;
    --md-sys-color-on-secondary-container: #1D192B;
    
    --md-sys-color-tertiary: #7D5260;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #FFD8E4;
    --md-sys-color-on-tertiary-container: #31111D;
    
    --md-sys-color-error: #BA1A1A;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFDAD6;
    --md-sys-color-on-error-container: #410002;
    
    /* 表面颜色 */
    --md-sys-color-surface: #FFFBFE;
    --md-sys-color-on-surface: #1C1B1F;
    --md-sys-color-surface-variant: #E7E0EC;
    --md-sys-color-on-surface-variant: #49454F;
    
    --md-sys-color-outline: #79747E;
    --md-sys-color-outline-variant: #CAC4D0;
    
    /* 背景颜色 */
    --md-sys-color-background: #FFFBFE;
    --md-sys-color-on-background: #1C1B1F;
    
    /* 阴影 */
    --md-sys-color-shadow: #000000;
    --md-sys-color-scrim: #000000;
    
    /* 毛玻璃效果变量 */
    --overlay-bg: rgba(0, 0, 0, 0.1);
    --overlay-blur: 1px;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-hover-bg: rgba(255, 255, 255, 0.12);
    --glass-blur: 12px;
    --glass-border: rgba(255, 255, 255, 0.18);
    --btn-bg: rgba(255, 255, 255, 0.1);
    --btn-hover-bg: rgba(255, 255, 255, 0.16);
    --btn-border: rgba(255, 255, 255, 0.22);
    
    /* 字体 */
    font-family: 'Noto Sans SC', sans-serif;
    
    /* 确保 Material Icons 正确显示 */
    --material-icons-font: 'Material Icons', 'MaterialIcons-Regular', sans-serif;
}

/* 亮色主题 */
.theme-light {
    --md-sys-color-primary: #6750A4;
    --md-sys-color-on-primary: #FFFFFF;
    --md-sys-color-primary-container: #EADDFF;
    --md-sys-color-on-primary-container: #21005D;
    
    --md-sys-color-secondary: #625B71;
    --md-sys-color-on-secondary: #FFFFFF;
    --md-sys-color-secondary-container: #E8DEF8;
    --md-sys-color-on-secondary-container: #1D192B;
    
    --md-sys-color-tertiary: #7D5260;
    --md-sys-color-on-tertiary: #FFFFFF;
    --md-sys-color-tertiary-container: #FFD8E4;
    --md-sys-color-on-tertiary-container: #31111D;
    
    --md-sys-color-error: #BA1A1A;
    --md-sys-color-on-error: #FFFFFF;
    --md-sys-color-error-container: #FFDAD6;
    --md-sys-color-on-error-container: #410002;
    
    --md-sys-color-surface: #FFFBFE;
    --md-sys-color-on-surface: #1C1B1F;
    --md-sys-color-surface-variant: #E7E0EC;
    --md-sys-color-on-surface-variant: #49454F;
    
    --md-sys-color-outline: #79747E;
    --md-sys-color-outline-variant: #CAC4D0;
    
    --md-sys-color-background: #FFFBFE;
    --md-sys-color-on-background: #1C1B1F;
    
    --md-sys-color-shadow: #000000;
    --md-sys-color-scrim: #000000;
}

/* 亮色主题下的导航栏磨砂效果 */
.theme-light .app-header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

/* 暗色主题 */
.theme-dark {
    --md-sys-color-primary: #D0BCFF;
    --md-sys-color-on-primary: #381E72;
    --md-sys-color-primary-container: #4F378B;
    --md-sys-color-on-primary-container: #EADDFF;
    
    --md-sys-color-secondary: #CCC2DC;
    --md-sys-color-on-secondary: #332D41;
    --md-sys-color-secondary-container: #4A4458;
    --md-sys-color-on-secondary-container: #E8DEF8;
    
    --md-sys-color-tertiary: #EFB8C8;
    --md-sys-color-on-tertiary: #492532;
    --md-sys-color-tertiary-container: #633B48;
    --md-sys-color-on-tertiary-container: #FFD8E4;
    
    --md-sys-color-error: #FFB4AB;
    --md-sys-color-on-error: #690005;
    --md-sys-color-error-container: #93000A;
    --md-sys-color-on-error-container: #FFDAD6;
    
    --md-sys-color-surface: #141218;
    --md-sys-color-on-surface: #E6E1E5;
    --md-sys-color-surface-variant: #49454F;
    --md-sys-color-on-surface-variant: #CAC4D0;
    
    --md-sys-color-outline: #938F99;
    --md-sys-color-outline-variant: #49454F;
    
    --md-sys-color-background: #141218;
    --md-sys-color-on-background: #E6E1E5;
    
    --md-sys-color-shadow: #000000;
    --md-sys-color-scrim: #000000;
}

/* 暗色主题下的导航栏磨砂效果 */
.theme-dark .app-header {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Material Design 3.0 基础样式 */

/* 按钮组件 */
.material-button {
    display: inline-flex;
    align-items: center;
    border: none;
    border-radius: 20px;
    font-family: 'Noto Sans SC', sans-serif;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.1px;
    position: relative;
    overflow: hidden;
    /* 强制中文字符水平显示 */
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    white-space: nowrap;
}

/* 水平排列（默认） */
.material-button--horizontal {
    flex-direction: row;
    gap: 8px;
    padding: 10px 24px;
    font-size: 14px;
}

/* 垂直排列 */
.material-button--vertical {
    flex-direction: column;
    gap: 4px;
    padding: 8px 12px;
    font-size: 12px;
    min-width: 60px;
}

.material-button:disabled {
    opacity: 0.38;
    cursor: not-allowed;
}

.material-button__icon {
    font-size: 20px;
    line-height: 1;
}

/* Filled Button */
.material-button--filled {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.15);
}

.material-button--filled:hover:not(:disabled) {
    background-color: var(--md-sys-color-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.12);
}

.material-button--filled:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* Outlined Button */
.material-button--outlined {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    border: 1px solid var(--md-sys-color-outline);
}

.material-button--outlined:hover:not(:disabled) {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.material-button--outlined:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* Text Button */
.material-button--text {
    background-color: transparent;
    color: var(--md-sys-color-primary);
    box-shadow: none;
}

.material-button--text:hover:not(:disabled) {
    background-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.material-button--text:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* Elevated Button */
.material-button--elevated {
    background-color: var(--md-sys-color-surface-container-low);
    color: var(--md-sys-color-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.15);
}

.material-button--elevated:hover:not(:disabled) {
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.12);
}

.material-button--elevated:focus {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* Tonal Button */
.material-button--tonal {
    background-color: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.material-button--tonal:hover:not(:disabled) {
    background-color: var(--md-sys-color-secondary-container);
    box-shadow: 0 1px 2px rgba(0,0,0,0.2), 0 1px 3px rgba(0,0,0,0.12);
}

.material-button--tonal:focus {
    outline: 2px solid var(--md-sys-color-secondary);
    outline-offset: 2px;
}

/* 卡片组件 */
.material-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.material-card--filled {
    background-color: var(--md-sys-color-surface-container-highest);
}

.material-card--outlined {
    background-color: var(--md-sys-color-surface);
    border: 1px solid var(--md-sys-color-outline-variant);
}

.material-card--elevated {
    background-color: var(--md-sys-color-surface-container-low);
    box-shadow: 0 1px 2px rgba(0,0,0,0.3), 0 1px 3px rgba(0,0,0,0.15);
}

.material-card-header {
    padding: 16px;
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

/* 文本字段组件 */
.material-text-field {
    position: relative;
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.material-text-field__input {
    padding: 16px;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 4px;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 16px;
    transition: all 0.2s ease;
}

.material-text-field__input:focus {
    outline: none;
    border-color: var(--md-sys-color-primary);
    border-width: 2px;
}

.material-text-field__label {
    position: absolute;
    top: 16px;
    left: 16px;
    color: var(--md-sys-color-on-surface-variant);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 16px;
    transition: all 0.2s ease;
    pointer-events: none;
}

.material-text-field--has-value .material-text-field__label,
.material-text-field__input:focus + .material-text-field__label {
    top: 8px;
    font-size: 12px;
    color: var(--md-sys-color-primary);
}

.material-text-field--outlined .material-text-field__input {
    border-radius: 4px;
}

.material-text-field--filled .material-text-field__input {
    border: none;
    border-bottom: 1px solid var(--md-sys-color-outline);
    border-radius: 4px 4px 0 0;
    background-color: var(--md-sys-color-surface-container-highest);
}

/* 加载组件 */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--md-sys-color-outline-variant);
    border-top: 4px solid var(--md-sys-color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: 16px;
    color: var(--md-sys-color-on-surface-variant);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    font-weight: 400;
}

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

/* 错误组件 */
.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    text-align: center;
}

.error-icon-container {
    width: 64px;
    height: 64px;
    background-color: var(--md-sys-color-error-container);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.error-icon {
    font-size: 32px;
    color: var(--md-sys-color-on-error-container);
}

.error-title {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface);
    font-family: 'Noto Sans SC', sans-serif;
}

.error-message {
    margin: 0;
    color: var(--md-sys-color-on-surface-variant);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

/* 应用头部 */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    /* 磨砂玻璃效果 */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: all 0.3s ease;
}


.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

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

.logo-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--md-sys-color-on-surface);
    font-size: 20px;
    font-weight: 500;
    font-family: 'Noto Sans SC', sans-serif;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background-color: var(--md-sys-color-primary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon .material-icons {
    color: var(--md-sys-color-on-primary);
    font-size: 20px;
}

.main-nav {
    display: flex;
    gap: 24px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    background-color: var(--md-sys-color-surface-container-highest);
    color: var(--md-sys-color-primary);
}

.nav-link .material-icons {
    font-size: 18px;
}

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

.user-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--md-sys-color-on-surface);
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
}

.user-info .material-icons {
    font-size: 20px;
}

.auth-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 主内容区域 */
main {
    padding-top: 64px; /* 为固定导航栏留出空间 */
    min-height: calc(100vh - 64px); /* 确保内容区域占满剩余空间 */
}

/* 应用底部 */
.app-footer {
    background-color: var(--md-sys-color-surface-container);
    border-top: 1px solid var(--md-sys-color-outline-variant);
    margin-top: 80px;
    padding: 48px 0;
    color: var(--md-sys-color-on-surface-variant);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--md-sys-color-on-surface);
    font-family: 'Noto Sans SC', sans-serif;
}

.footer-subtitle {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--md-sys-color-on-surface);
    font-family: 'Noto Sans SC', sans-serif;
}

.footer-description {
    line-height: 1.75;
    color: var(--md-sys-color-on-surface-variant);
    font-family: 'Noto Sans SC', sans-serif;
}

.tech-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tech-item {
    display: flex;
    align-items: center;
    font-family: 'Noto Sans SC', sans-serif;
}

.tech-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 12px;
}

.tech-dot--primary {
    background-color: var(--md-sys-color-primary);
}

.tech-dot--secondary {
    background-color: var(--md-sys-color-secondary);
}

.tech-dot--tertiary {
    background-color: var(--md-sys-color-tertiary);
}

.tech-dot--error {
    background-color: var(--md-sys-color-error);
}

.link-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-item {
    display: flex;
}

.footer-link {
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-family: 'Noto Sans SC', sans-serif;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--md-sys-color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--md-sys-color-outline-variant);
    margin-top: 48px;
    padding-top: 32px;
    text-align: center;
}

.copyright {
    color: var(--md-sys-color-on-surface-variant);
    font-family: 'Noto Sans SC', sans-serif;
}

/* 基础样式重置 */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    /* 移除背景色，让公共背景系统接管 */
    color: var(--md-sys-color-on-background);
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.5;
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* 布局样式 */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-4 {
    gap: 16px;
}

.gap-8 {
    gap: 32px;
}

/* 间距 */
.p-4 {
    padding: 16px;
}

.p-8 {
    padding: 32px;
}

.m-4 {
    margin: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-8 {
    margin-bottom: 32px;
}

/* 文本样式 */
.text-center {
    text-align: center;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

.text-2xl {
    font-size: 24px;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

/* 毛玻璃效果 */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
}

.glass-dark {
    background: rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* 主题背景容器 */
.particle-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2; /* 确保在最底层 */
    pointer-events: none; /* 不阻挡用户交互 */
    min-height: 100vh;
    min-width: 100vw;
}

/* 亮主题背景 */
.particle-bg.light-theme {
    background-image: url("/static/images/background_image.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    /* 确保覆盖默认背景 */
    background: url("/static/images/background_image.png") center/cover no-repeat fixed;
}

/* 暗主题背景 - 保持紫色渐变，3D粒子会叠加在上面 */
.particle-bg.dark-theme {
    background: linear-gradient(135deg, #160016 0%, #2d1b69 50%, #160016 100%);
}

.particle-bg canvas {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1; /* 确保canvas在容器内最上层 */
    pointer-events: none; /* 不阻挡用户交互 */
}

/* 壁纸遮罩层 - 调整为半透明以显示3D背景 */
.wallpaper-overlay {
    background: rgba(0, 0, 0, 0.1); /* 更透明的遮罩，让3D背景更明显 */
    backdrop-filter: blur(0.2px); /* 减少模糊 */
    min-height: 100vh;
    position: relative;
    z-index: 1; /* 确保内容在背景之上 */
}

/* 暗主题时遮罩层更透明，让3D粒子更明显 */
.theme-dark .wallpaper-overlay {
    background: rgba(0, 0, 0, 0.05); /* 几乎透明 */
    backdrop-filter: blur(0.1px); /* 几乎不模糊 */
}

/* 确保 header 组件正确定位 */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

/* 高度和最小高度工具类 */
.min-h-screen {
    min-height: 100vh;
}

.h-screen {
    height: 100vh;
}

/* 其他常用的工具类 */
.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.inline {
    display: inline;
}

.grid {
    display: grid;
}

.inline-flex {
    display: inline-flex;
}

/* 圆角 */
.rounded {
    border-radius: 0.25rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* 阴影 */
.shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 透明度 */
.opacity-50 {
    opacity: 0.5;
}

.opacity-75 {
    opacity: 0.75;
}

.opacity-100 {
    opacity: 1;
}

/* 过渡效果 */
.transition {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* 悬停效果 */
.hover\:opacity-80:hover {
    opacity: 0.8;
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 点击动画效果 */
.click-animation-container {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;
}

.click-animation-container:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* 涟漪效果 */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: rgba(103, 80, 164, 0.3);
    pointer-events: none;
    z-index: 1000;
    transform: translate(-50%, -50%);
    animation: ripple-animation 0.6s ease-out;
}

@keyframes ripple-animation {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
    }
}

/* 粒子效果 */
.click-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: linear-gradient(45deg, #6750A4, #D0BCFF);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1001;
    transform: translate(-50%, -50%);
    animation: particle-animation 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes particle-animation {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
}

/* 暗色主题下的点击动画 */
.theme-dark .ripple-effect {
    background: rgba(208, 188, 255, 0.3);
}

.theme-dark .click-particle {
    background: linear-gradient(45deg, #D0BCFF, #EADDFF);
}

/* 为不同元素添加点击动画效果 */
.material-button {
    position: relative;
    overflow: hidden;
}

/* 数据分析页面样式 */
.analytics-page {
    padding: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.analytics-header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.analytics-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin: 0;
}

.analytics-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 24px;
}

.chart-container {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.chart-container h3 {
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 16px;
    color: var(--text-primary);
    text-align: center;
}

/* 暗主题下的图表容器 */
.theme-dark .chart-container {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-dark .chart-container h3 {
    color: #ffffff;
}

.material-card {
    position: relative;
    overflow: hidden;
}

.nav-link {
    position: relative;
    overflow: hidden;
}

/* 点击反馈效果 */
.click-feedback {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.click-feedback:active {
    transform: scale(0.95);
    background-color: rgba(103, 80, 164, 0.1);
}

/* 文字飘散效果样式 - 简化版 */

/* 全局点击动画样式 */
* {
    -webkit-tap-highlight-color: transparent;
}

/* 为所有元素添加点击动画支持 */
* {
    position: relative;
}

/* 只为需要点击动画的元素设置 overflow: hidden */
*[onclick],
*[role="button"],
*[tabindex]:not([tabindex="-1"]),
a:not([href=""]):not([href="#"]),
button:not(:disabled),
input[type="button"]:not(:disabled),
input[type="submit"]:not(:disabled),
input[type="reset"]:not(:disabled),
[data-clickable],
[data-interactive],
.material-button,
.material-card,
.clickable {
    overflow: hidden;
}

/* 为所有可点击元素添加基础样式 */
*:hover {
    cursor: pointer;
}

/* 确保页面容器可以正常滚动 */
html, body {
    overflow: auto !important;
    position: static !important;
}

/* 确保滚动容器正常工作 */
.scrollable,
[data-scrollable],
.scroll-container {
    overflow: auto !important;
    position: static !important;
}

/* 确保所有可点击元素都支持点击动画 */
*[onclick],
*[role="button"],
*[tabindex]:not([tabindex="-1"]),
a:not([href=""]):not([href="#"]),
button:not(:disabled),
input[type="button"]:not(:disabled),
input[type="submit"]:not(:disabled),
input[type="reset"]:not(:disabled),
[data-clickable],
[data-interactive] {
    cursor: pointer;
}

/* 为可点击元素添加点击动画 */
button, 
.material-button, 
.material-card, 
.nav-link, 
a[href], 
.clickable,
[role="button"],
[onclick],
.home-post-card,
.home-demo-card,
.home-demo-mini-card,
.home-feature-card,
.blog-article,
.blog-content-full,
.material-text-field,
.loading-container,
.error-container,
.home-hero-button,
.home-more-button,
.home-post-link,
.footer-link,
.tech-item,
.link-item {
    position: relative;
    overflow: hidden;
}

/* 为所有具有指针样式的元素添加点击动画支持 */
*[style*="cursor: pointer"],
*[style*="cursor: grab"],
*[style*="cursor: zoom-in"] {
    position: relative;
    overflow: hidden;
}

/* 点击动画进行中的样式 */
.click-animating {
    pointer-events: none;
}

.click-animating * {
    pointer-events: none;
}

/* 涟漪效果变体 */
.ripple-primary {
    background: rgba(103, 80, 164, 0.3);
}

.ripple-secondary {
    background: rgba(98, 91, 113, 0.3);
}

.ripple-tertiary {
    background: rgba(125, 82, 96, 0.3);
}

/* 粒子效果变体 */
.particle-primary {
    background: linear-gradient(45deg, #6750A4, #D0BCFF);
}

.particle-secondary {
    background: linear-gradient(45deg, #625B71, #CCC2DC);
}

.particle-tertiary {
    background: linear-gradient(45deg, #7D5260, #EFB8C8);
}

/* 聊天助手样式 */
.chat-assistant-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chat-assistant-toggle:hover {
    transform: scale(1.1);
}

.chat-bot-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #6750A4, #D0BCFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 20px rgba(103, 80, 164, 0.3);
    transition: all 0.3s ease;
}

.chat-bot-icon:hover {
    box-shadow: 0 6px 25px rgba(103, 80, 164, 0.4);
    transform: translateY(-2px);
}

.chat-bot-icon svg {
    width: 28px;
    height: 28px;
}

.chat-assistant-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 700px;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--md-sys-color-surface);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--md-sys-color-outline-variant);
    display: flex;
    flex-direction: column;
    z-index: 10000;
    overflow: hidden;
}

.chat-header {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 16px 16px 0 0;
}

.chat-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.close-btn {
    background: none;
    border: none;
    color: var(--md-sys-color-on-primary);
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.chat-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 80%;
    word-wrap: break-word;
}

.message.user {
    align-self: flex-end;
}

.message.assistant {
    align-self: flex-start;
}

.message.system {
    align-self: center;
    max-width: 100%;
}

.message-content {
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    line-height: 1.4;
}

.message.user .message-content {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border-radius: 18px 18px 4px 18px;
}

.message.assistant .message-content {
    background: var(--md-sys-color-surface-variant);
    color: var(--md-sys-color-on-surface-variant);
    border-radius: 18px 18px 18px 4px;
}

.message.system .message-content {
    background: var(--md-sys-color-error-container);
    color: var(--md-sys-color-on-error-container);
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
}

.message-time {
    font-size: 11px;
    color: var(--md-sys-color-outline);
    margin-top: 4px;
    text-align: right;
}

.message.assistant .message-time {
    text-align: left;
}

.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    background: var(--md-sys-color-outline);
    border-radius: 50%;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.4;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.chat-input {
    padding: 16px;
    border-top: 1px solid var(--md-sys-color-outline-variant);
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-input input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: 24px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.chat-input input:focus {
    border-color: var(--md-sys-color-primary);
}

.chat-input input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.chat-input button {
    padding: 12px 20px;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    border: none;
    border-radius: 24px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.chat-input button:hover:not(:disabled) {
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
}

.chat-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 分页组件样式 */
.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 2rem;
}

@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .pagination-total {
        text-align: center;
    }
    
    .pagination-page-controls {
        justify-content: center;
    }
}

.pagination-total {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    background: var(--surface-variant);
    border-radius: 6px;
    flex-shrink: 0;
}

.pagination-page-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    flex-shrink: 0;
}

.pagination-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--surface-color);
    color: var(--text-primary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    background: var(--surface-variant);
    color: var(--text-disabled);
}

.pagination-btn-nav {
    font-weight: 600;
    font-size: 1rem;
    min-width: 2.5rem;
}

.pagination-btn-page {
    font-weight: 500;
}

.pagination-btn-active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.pagination-ellipsis {
    padding: 0.5rem;
    color: var(--text-secondary);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
}

/* 桌面端样式 */
.mobile-menu-toggle {
    display: none;
}

.mobile-nav {
    display: none;
}

.mobile-menu-overlay {
    display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-header {
        height: 64px;
    }
    
    .header-container {
        padding: 0 12px;
    }
    
    .header-content {
        height: 64px;
    }
    
    .header-left {
        gap: 8px;
    }
    
    .logo-link {
        font-size: 16px;
    }
    
    .logo-icon {
        width: 28px;
        height: 28px;
    }
    
    .logo-icon .material-icons {
        font-size: 18px;
    }
    
    .logo-text {
        display: none;
    }
    
    /* 隐藏桌面端导航 */
    .main-nav {
        display: none;
    }
    
    /* 显示汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        color: var(--md-sys-color-on-surface);
        cursor: pointer;
        padding: 8px;
        border-radius: 4px;
        transition: all 0.2s ease;
        margin-left: auto;
    }
    
    .mobile-menu-toggle:hover {
        background-color: var(--md-sys-color-surface-container-high);
    }
    
    .mobile-menu-toggle .material-icons {
        font-size: 24px;
    }
    
    .header-right {
        gap: 8px;
    }
    
    .user-section {
        gap: 8px;
    }
    
    .user-info {
        display: none;
    }
    
    .auth-buttons {
        gap: 4px;
    }
    
    main {
        padding-top: 64px;
    }
    
    /* 显示移动端菜单 */
    .mobile-nav {
        display: flex;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    /* 移动端菜单遮罩层 */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1500;
        backdrop-filter: blur(2px);
    }
    
    /* 移动端菜单 */
    .mobile-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, 
            rgba(255, 255, 255, 0.12) 0%, 
            rgba(255, 255, 255, 0.08) 100%);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        border-left: 1px solid rgba(255, 255, 255, 0.15);
        box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
        z-index: 2000;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        padding: 80px 0 0 0;
    }
    
    .mobile-nav--open {
        right: 0;
    }
    
    .mobile-nav-link {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 16px 24px;
        color: var(--md-sys-color-on-surface);
        text-decoration: none;
        transition: all 0.2s ease;
        border-radius: 0 24px 24px 0;
        margin-right: 16px;
        font-family: 'Roboto', sans-serif;
    }
    
    .mobile-nav-link:hover {
        background-color: var(--md-sys-color-surface-container-high);
        color: var(--md-sys-color-primary);
        transform: translateX(4px);
    }
    
    .mobile-nav-link .material-icons {
        font-size: 24px;
        min-width: 24px;
    }
    
    .mobile-nav-link span:not(.material-icons) {
        font-size: 16px;
        font-weight: 500;
    }
    
    .chat-assistant-dialog {
        width: 95vw;
        height: 80vh;
        max-width: 95vw;
        max-height: 80vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        right: auto;
    }
    
    .chat-assistant-toggle {
        bottom: 15px;
        left: 15px;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 8px;
    }
    
    .logo-icon {
        width: 24px;
        height: 24px;
    }
    
    .logo-icon .material-icons {
        font-size: 16px;
    }
    
    .nav-link {
        padding: 4px 8px;
    }
    
    .nav-link .material-icons {
        font-size: 18px;
    }
}