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

/* CSS变量 - 现代丝滑设计 */
:root {
    /* 主色调 - 渐变紫蓝色系 */
    --primary-color: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #7c3aed;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    /* 辅助色彩 */
    --secondary-color: #48bb78;
    --secondary-gradient: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    --accent-color: #ed8936;
    --accent-gradient: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    
    /* 状态色彩 */
    --success-color: #48bb78;
    --success-gradient: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    --warning-color: #ed8936;
    --warning-gradient: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    --danger-color: #f56565;
    --danger-gradient: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    --info-color: #4299e1;
    --info-gradient: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    
    /* 文字颜色 */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #a0aec0;
    --text-white: #ffffff;
    
    /* 背景色彩 */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    --bg-card: #ffffff;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    --bg-glass: rgba(255, 255, 255, 0.25);
    
    /* 边框色彩 */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-focus: var(--primary-color);
    
    /* 阴影效果 - 更柔和的阴影 */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.4);
    
    /* 圆角 - 更圆润的设计 */
    --radius-xs: 0.25rem;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* 过渡动画 - 更丝滑的动画 */
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* 间距系统 */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    
    /* 字体大小 */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
}

/* 基础样式 - 现代丝滑设计 */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    overflow-x: hidden;
    font-size: var(--text-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* 工具类 */
.hidden {
    display: none !important;
}

.active {
    display: block !important;
}

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

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* 导航栏 - 毛玻璃效果 */
/* 导航栏样式 - 两行布局 */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-glass);
    z-index: -1;
}

/* 第一行：品牌和语言切换 */
.nav-top {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

/* 第二行：导航链接和用户功能 */
.nav-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.nav-brand:hover {
    transform: translateY(-1px);
}

.nav-logo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

.nav-logo:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.nav-title {
    font-size: var(--text-xl);
    font-weight: 700;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 1px;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-user {
    position: relative;
}

.user-dropdown {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.user-btn:hover {
    background: var(--bg-secondary);
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    min-width: 200px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.user-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.user-menu a:hover {
    background: var(--bg-secondary);
}

.user-menu hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 0.5rem 0;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* 语言切换按钮样式 */
.nav-language {
    margin: 0 var(--space-md);
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    font-size: var(--text-sm);
    box-shadow: var(--shadow-sm);
}

.language-toggle:hover {
    border-color: var(--primary-color);
    background: var(--primary-gradient);
    color: var(--text-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.language-toggle i {
    font-size: var(--text-base);
}

#current-language {
    font-weight: 700;
    min-width: 1.2rem;
    text-align: center;
}

/* 按钮样式 - 现代丝滑设计 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--text-sm);
    font-weight: 600;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-bounce);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow);
    transform: translateY(-3px) scale(1.02);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-gradient);
    color: var(--text-white);
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--secondary-gradient);
    color: var(--text-white);
}

.btn-secondary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 20px rgba(72, 187, 120, 0.4);
}

.btn-success {
    background: var(--success-gradient);
    color: var(--text-white);
}

.btn-success:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 20px rgba(72, 187, 120, 0.4);
}

.btn-danger {
    background: var(--danger-gradient);
    color: var(--text-white);
}

.btn-danger:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 20px rgba(245, 101, 101, 0.4);
}

.btn-warning {
    background: var(--warning-gradient);
    color: var(--text-white);
}

.btn-warning:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 20px rgba(237, 137, 54, 0.4);
}

.btn-info {
    background: var(--info-gradient);
    color: var(--text-white);
}

.btn-info:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 20px rgba(66, 153, 225, 0.4);
}

.btn-large {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--text-lg);
    border-radius: var(--radius-xl);
}

.btn-small {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-xs);
    border-radius: var(--radius-md);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: var(--shadow-sm) !important;
}

.btn:disabled:hover {
    transform: none !important;
}

/* 主要内容区域 */
.main-content {
    margin-top: 6rem;
    min-height: calc(100vh - 6rem);
}

.section {
    display: none;
    padding: 2rem 0;
    min-height: calc(100vh - 6rem);
}

.section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* 首页样式 */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 4rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-content {
    max-width: 500px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* 管理员联系方式 - Hero区域 */
.admin-contact-hero {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
}

.admin-contact-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-xl);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    color: white;
    max-width: 400px;
    width: 100%;
}

.admin-contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.admin-contact-icon {
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.admin-contact-content h4 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.admin-contact-content p {
    font-size: var(--text-sm);
    opacity: 0.9;
    margin: 0;
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.features {
    padding: 4rem 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

/* 功能卡片样式 - 现代丝滑设计 */
.feature-card {
    background: var(--bg-card);
    padding: var(--space-2xl);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-lg);
    text-align: center;
    transition: var(--transition-bounce);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: var(--transition);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 5rem;
    height: 5rem;
    background: var(--primary-gradient);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    color: var(--text-white);
    font-size: var(--text-2xl);
    box-shadow: var(--shadow-lg);
    transition: var(--transition-bounce);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--shadow-glow);
}

.feature-card h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: var(--text-base);
}

/* 筛选标签 */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
}

.filter-tab {
    padding: 0.5rem 1rem;
    background: none;
    border: none;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab.active,
.filter-tab:hover {
    background: var(--bg-primary);
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* 公告网格 */
.announcements-grid {
    display: grid;
    gap: 1.5rem;
}

.announcement-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.announcement-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.announcement-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.announcement-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.announcement-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.announcement-category {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.category-学术 {
    background: #EBF8FF;
    color: #2563EB;
}



.category-通知 {
    background: #FFFBEB;
    color: #D97706;
}

.category-紧急 {
    background: #FEF2F2;
    color: #DC2626;
}

.announcement-priority {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.priority-urgent {
    color: var(--danger-color);
}

.priority-high {
    color: var(--warning-color);
}

.announcement-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.announcement-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* 论坛样式 */
.forum-categories {
    display: grid;
    gap: 1rem;
}

.category-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.category-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.category-icon {
    font-size: 1.5rem;
}

.category-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.category-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.category-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.posts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.posts-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sort-options select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.875rem;
}

.posts-list {
    display: grid;
    gap: 1rem;
}

.post-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.post-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.post-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-badges {
    display: flex;
    gap: 0.5rem;
}

.post-badge {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-pinned {
    background: #FEF3C7;
    color: #92400E;
}

.badge-locked {
    background: #FEE2E2;
    color: #991B1B;
}

.post-content {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
}



/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
}

.pagination button:hover:not(:disabled) {
    background: var(--bg-secondary);
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 模态框样式 - 现代丝滑设计 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-slow);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-2xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    overflow-x: hidden;
    transform: scale(0.8) translateY(50px);
    transition: var(--transition-bounce);
    border: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
}

.modal-content.modal-large {
    max-width: 700px;
    max-height: 95vh;
    overflow-y: auto;
    overflow-x: hidden;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl);
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-primary);
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: var(--bg-tertiary);
    border: none;
    font-size: var(--text-lg);
    color: var(--text-muted);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-full);
    transition: var(--transition);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger-color);
    color: var(--text-white);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.modal-body {
    padding: var(--space-xl);
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
    max-height: calc(90vh - 200px);
}

.modal-footer {
    padding: var(--space-xl);
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-light);
    text-align: center;
    flex-shrink: 0;
}

.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.modal-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* 表单样式 - 现代丝滑设计 */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: var(--transition);
    font-family: inherit;
    box-shadow: var(--shadow-xs);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
    background: var(--bg-primary);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
}

.form-actions {
    margin-top: var(--space-xl);
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
}

.char-count {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-xs);
    text-align: right;
}

/* 复选框和单选框样式 */
.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-weight: 500;
    color: var(--text-primary);
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: auto;
    margin: 0;
    transform: scale(1.2);
    accent-color: var(--primary-color);
}

/* 加载状态 */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 3rem;
    color: var(--text-muted);
}

.loading i {
    font-size: 1.25rem;
}

/* 通知 */
.notifications {
    position: fixed;
    top: 5rem;
    right: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transform: translateX(100%);
    transition: var(--transition);
}

.notification.show {
    transform: translateX(0);
}

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

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

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

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

.notification-icon {
    font-size: 1.25rem;
}

.notification.success .notification-icon {
    color: var(--success-color);
}

.notification.error .notification-icon {
    color: var(--danger-color);
}

.notification.warning .notification-icon {
    color: var(--warning-color);
}

.notification.info .notification-icon {
    color: var(--primary-color);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.notification-message {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: block;
    }
    
    /* 确保登录注册按钮在移动端也能显示 */
    .nav-auth {
        display: flex;
        gap: 0.5rem;
    }
    
    /* 调整按钮大小以适应移动端 */
    .nav-auth .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: auto;
    }
    
    /* 调整导航栏右侧布局 */
    .nav-right {
        gap: var(--space-sm);
        flex-wrap: wrap;
        align-items: center;
    }
    
    /* 调整导航栏标题在移动端的显示 */
    .nav-title {
        font-size: 0.9rem;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    /* 确保导航栏底部有足够的空间 */
    .nav-bottom {
        flex-wrap: wrap;
        gap: 0.5rem;
        min-height: 3rem;
        align-items: center;
    }
    
    /* 调整导航链接在移动端的显示 */
    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        margin-top: 0.5rem;
        gap: 1rem;
    }
    
    .hero {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .admin-contact-card {
        padding: 1rem 1.5rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }
    
    .admin-contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
    
    .admin-contact-content h4 {
        font-size: var(--text-base);
    }
    
    .admin-contact-content p {
        font-size: var(--text-xs);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-tabs {
        flex-wrap: wrap;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .posts-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .event-header {
        padding: 1rem;
    }
    
    .event-title {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    .event-body {
        padding: 1rem;
    }
    
    .event-description {
        font-size: 0.875rem;
        line-height: 1.5;
    }
    
    .event-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    /* 公告卡片移动端优化 */
    .announcements-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .announcement-card {
        padding: 1rem;
    }
    
    .announcement-title {
        font-size: 1.125rem;
        line-height: 1.4;
    }
    
    .announcement-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .announcement-content {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-large {
        width: 100%;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    .feature-card,
    .announcement-card,
    .category-card,
    .post-card,
    .event-card {
        padding: 1rem;
    }
}


/* 大型模态框样式 */
.modal-large .modal-content {
    max-width: 800px;
    width: 90%;
}

/* 富文本编辑器样式 */
.char-count {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* 复选框样式 */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: 3px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked + .checkmark:after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 帖子详情样式 */
.post-detail-content {
    padding: 1.5rem 0;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-weight: 600;
    color: var(--text-color);
}

.post-time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.post-content-body {
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.post-content-body p {
    margin-bottom: 1rem;
}

.post-content-body p:last-child {
    margin-bottom: 0;
}

.post-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

/* 回复区域样式 */
.replies-section {
    margin-top: 2rem;
}

.replies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.replies-header h4 {
    margin: 0;
    color: var(--text-color);
}

.reply-form {
    background: var(--surface-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.reply-item {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    background: white;
}

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

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.reply-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.reply-author-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.reply-author-name {
    font-weight: 500;
    color: var(--text-color);
}

.reply-time {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.reply-content {
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.reply-actions {
    display: flex;
    gap: 0.5rem;
}

.reply-actions .btn {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

/* 子回复样式 */
.child-replies {
    margin-left: 2rem;
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.child-reply {
    padding: 0.75rem;
    background: var(--surface-color);
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

.child-reply:last-child {
    margin-bottom: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-large .modal-content {
        width: 95%;
        margin: 1rem auto;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
/* 暗色主题适配 */
@media (prefers-color-scheme: dark) {

/* 搜索功能样式 */
.nav-search {
    flex: 1;
    max-width: 400px;
    margin: 0 2rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    color: white;
    font-size: 0.9rem;
    outline: none;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.search-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.25rem;
    margin-left: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 帖子详情页面样式 */
.post-detail {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
}

.post-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--background-light);
}

.post-detail-content {
    padding: 2rem;
}

.post-detail-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-detail-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.post-detail-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-detail-body {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.post-detail-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.post-detail-actions .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-detail-actions .fa-heart.liked {
    color: #e74c3c;
}

.post-detail-actions .fa-bookmark.favorited {
    color: #f39c12;
}

/* 回复区域样式 */
.replies-section {
    padding: 2rem;
    border-top: 1px solid var(--border-color);
    background: var(--background-light);
}

.replies-section h3 {
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.reply-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.reply-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reply-author strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.reply-time {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.reply-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.btn-icon:hover {
    background: var(--background-light);
    color: var(--primary-color);
}

.btn-icon .fa-heart.liked {
    color: #e74c3c;
}

.reply-content {
    line-height: 1.6;
    color: var(--text-primary);
}

.reply-children {
    margin-left: 2rem;
    margin-top: 1rem;
    border-left: 2px solid var(--border-color);
    padding-left: 1rem;
}

.reply-form {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.no-replies {
    text-align: center;
    color: var(--text-muted);
    padding: 2rem;
    font-style: italic;
}



/* 搜索结果页面样式 */
.search-results {
    padding: 2rem 0;
}

.search-header {
    margin-bottom: 2rem;
    text-align: center;
}

.search-header h2 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.search-header p {
    color: var(--text-muted);
}

.search-list {
    display: grid;
    gap: 1rem;
}

.search-item {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    gap: 1rem;
}

.search-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-item-type {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 8px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.search-item-content {
    flex: 1;
}

.search-item-content h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.search-item-content p {
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

.search-item-meta {
    display: flex;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-item-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    padding: 3rem;
    font-size: 1.1rem;
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .nav-search {
        display: none;
    }
    
    .post-detail-header,
    .event-detail-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .post-detail-meta,
    .post-detail-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .event-detail-meta {
        grid-template-columns: 1fr;
    }
    
    .search-item {
        flex-direction: column;
        text-align: center;
    }
    
    .search-item-type {
        align-self: center;
    }
    
    .reply-children {
        margin-left: 1rem;
    }
}






/* 表单行布局 */
.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* 标签页样式 */
.tabs {
    display: flex;
    border-bottom: 2px solid #eee;
    margin-bottom: 20px;
}

.tab-button {
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 1em;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-button:hover {
    color: #3498db;
}

.tab-button.active {
    color: #3498db;
    border-bottom-color: #3498db;
    font-weight: 500;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}



/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .event-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .event-meta {
        flex-direction: column;
        gap: 8px;
    }
    
    .event-actions {
        justify-content: stretch;
    }
    
    .event-actions .btn {
        flex: 1;
        text-align: center;
    }
    
    .tabs {
        overflow-x: auto;
    }
    
    .tab-button {
        white-space: nowrap;
        min-width: 120px;
    }
}


/* 管理员面板样式 */
.admin-header {
    margin-bottom: 2rem;
}

.admin-nav {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    border-bottom: 1px solid #e5e7eb;
    overflow-x: auto;
    padding-bottom: 0;
}

.admin-nav-btn {
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: #6b7280;
    font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.admin-nav-btn:hover {
    color: #4f46e5;
    background-color: #f8fafc;
}

.admin-nav-btn.active {
    color: #4f46e5;
    border-bottom-color: #4f46e5;
}

.admin-tab {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.admin-tab.active {
    display: block;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.stat-content p {
    color: #6b7280;
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
}

/* 图表容器 */
.admin-charts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.chart-container {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.chart-container h4 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
}

/* 管理员工具栏 */
.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-filters input,
.search-filters select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    min-width: 200px;
}

.search-filters input:focus,
.search-filters select:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* 管理员表格 */
.admin-table-container {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.admin-table th {
    background-color: #f9fafb;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.admin-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
}

.admin-table tr:hover {
    background-color: #f9fafb;
}

.admin-table .actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.admin-table .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
}

/* 状态标签 */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: #d1fae5;
    color: #065f46;
}

.status-badge.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-badge.admin {
    background-color: #ddd6fe;
    color: #5b21b6;
}

.status-badge.teacher {
    background-color: #dbeafe;
    color: #1e40af;
}

.status-badge.student {
    background-color: #f3f4f6;
    color: #374151;
}

.status-badge.normal {
    background-color: #f3f4f6;
    color: #374151;
}

.status-badge.high {
    background-color: #fef3c7;
    color: #92400e;
}

.status-badge.urgent {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-badge.pinned {
    background-color: #fef3c7;
    color: #92400e;
}

/* 设置表单 */
.settings-form {
    background: white;
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    max-width: 600px;
}

.settings-form h4 {
    margin: 0 0 1.5rem 0;
    color: #1f2937;
    font-size: 1.125rem;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.settings-form h4:not(:first-child) {
    margin-top: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: #4f46e5;
}

.form-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-nav {
        flex-direction: column;
        gap: 0;
    }
    
    .admin-nav-btn {
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0;
        justify-content: flex-start;
    }
    
    .admin-nav-btn.active {
        border-bottom-color: #e5e7eb;
        background-color: #f8fafc;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-charts {
        grid-template-columns: 1fr;
    }
    
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-filters {
        flex-direction: column;
    }
    
    .search-filters input,
    .search-filters select {
        min-width: auto;
        width: 100%;
    }
    
    .admin-table-container {
        font-size: 0.75rem;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* 加载状态 */
.admin-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: #6b7280;
}

.admin-loading i {
    margin-right: 0.5rem;
    animation: spin 1s linear infinite;
}

/* 空状态 */
.admin-empty {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.admin-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #d1d5db;
}

/* 最近活动列表 */
.recent-activity {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: white;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 500;
    color: #1f2937;
    margin: 0;
    font-size: 0.875rem;
}

.activity-meta {
    color: #6b7280;
    font-size: 0.75rem;
    margin: 0.25rem 0 0 0;
}


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

/* 移动端导航 */
.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-nav-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: var(--transition);
}

.mobile-nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-nav-menu {
    display: none;
    position: fixed;
    top: 4rem;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.mobile-nav-menu.active {
    display: block;
}

.mobile-nav-links {
    padding: 1rem;
}

.mobile-nav-links a {
    display: block;
    padding: 0.75rem 0;
    color: #374151;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    font-weight: 500;
}

.mobile-nav-links a:hover {
    color: #4f46e5;
    background-color: #f8fafc;
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.mobile-nav-links a:last-child {
    border-bottom: none;
}

/* 触摸友好的按钮 */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        min-height: 36px;
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
    
    /* 显示移动端导航按钮 */
    .mobile-nav-toggle {
        display: flex;
    }
    
    /* 隐藏桌面端导航菜单 */
    .nav-menu {
        display: none;
    }
    
    /* 导航栏调整 */
    .nav-content {
        padding: 0 1rem;
    }
    
    .nav-title {
        font-size: 1.125rem;
    }
    
    .nav-logo {
        width: 2rem;
        height: 2rem;
    }
    
    /* 主要内容区域 */
    .container {
        padding: 0 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* 卡片布局 */
    .card {
        margin-bottom: 1rem;
    }
    
    .card-header {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* 表单优化 */
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-group label {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 1rem;
        padding: 0.75rem;
        min-height: 44px;
    }
    
    /* 模态框优化 */
    .modal-content {
        margin: 1rem;
        max-height: calc(100vh - 2rem);
        overflow-y: auto;
    }
    
    .modal-large {
        margin: 0.5rem;
    }
    
    .modal-header {
        padding: 1rem;
        position: sticky;
        top: 0;
        background: white;
        z-index: 10;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 10;
    }
    
    /* 论坛布局 */
    .forum-categories {
        grid-template-columns: 1fr;
    }
    
    .category-card {
        padding: 1rem;
    }
    
    .posts-list {
        padding: 0;
    }
    
    .post-item {
        padding: 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 0;
    }
    
    .post-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .post-stats {
        order: -1;
    }
    
    /* 活动布局 */
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .event-card {
        padding: 1rem;
    }
    
    .event-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* 公告布局 */
    .announcements-list .announcement-item {
        padding: 1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .announcement-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    /* 管理员面板移动端优化 */
    .admin-nav {
        flex-direction: column;
        gap: 0;
        border-bottom: none;
    }
    
    .admin-nav-btn {
        border-bottom: 1px solid #e5e7eb;
        border-radius: 0;
        justify-content: flex-start;
        padding: 1rem;
    }
    
    .admin-nav-btn.active {
        border-bottom-color: #e5e7eb;
        background-color: #f8fafc;
        border-left: 3px solid #4f46e5;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .admin-charts {
        grid-template-columns: 1fr;
    }
    
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .search-filters {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-filters input,
    .search-filters select {
        min-width: auto;
        width: 100%;
    }
    
    .admin-table-container {
        font-size: 0.75rem;
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 600px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
    
    .admin-table .actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .admin-table .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
        width: 100%;
    }
}

/* 平板端优化 */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .forum-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .events-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .admin-charts {
        grid-template-columns: 1fr;
    }
}

/* 大屏幕优化 */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .forum-categories {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .events-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .card:hover {
        transform: none;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .post-item:hover,
    .announcement-item:hover,
    .event-card:hover {
        transform: none;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    /* 增加触摸目标大小 */
    .nav-links a {
        padding: 1rem;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
    }
    
    .pagination .btn {
        min-width: 44px;
        min-height: 44px;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 2px solid #e5e7eb;
    }
    
    .modal-content {
        border: 2px solid #374151;
    }
}

/* 减少动画模式支持 */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
        --border-color: #4b5563;
    }
    
    body {
        background-color: var(--bg-primary);
        color: var(--text-primary);
    }
    
    .nav {
        background-color: var(--bg-secondary);
        border-bottom-color: var(--border-color);
    }
    
    .card {
        background-color: var(--bg-secondary);
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    
    .modal-content {
        background-color: var(--bg-secondary);
        color: var(--text-primary);
    }
    
    .btn-secondary {
        background-color: var(--bg-secondary);
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        background-color: var(--bg-primary);
        border-color: var(--border-color);
        color: var(--text-primary);
    }
    
    .admin-table {
        background-color: var(--bg-secondary);
    }
    
    .admin-table th {
        background-color: var(--bg-primary);
        color: var(--text-primary);
    }
    
    .admin-table td {
        border-bottom-color: var(--border-color);
        color: var(--text-secondary);
    }
}

/* 打印样式 */
@media print {
    .nav,
    .modal,
    .btn,
    .admin-nav,
    .admin-toolbar {
        display: none !important;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    .card {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}


/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增大点击区域 */
    .btn,
    .nav-link,
    .filter-tab,
    .event-card,
    .announcement-card,
    .post-card {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 移除hover效果，使用active状态 */
    .btn:hover,
    .nav-link:hover,
    .card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    
    .btn:active,
    .nav-link:active,
    .card:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    /* 优化表单输入 */
    input,
    textarea,
    select {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 0.75rem;
    }
    
    /* 优化滚动 */
    .modal-content,
    .announcements-grid,
    .events-grid {
        -webkit-overflow-scrolling: touch;
    }
}

/* 移动端导航优化 */
@media (max-width: 768px) {
    .nav-content {
        padding: 0.5rem 1rem;
    }
    
    .nav-logo {
        font-size: 1.25rem;
    }
    
    .nav-toggle {
        padding: 0.5rem;
        border-radius: var(--radius-md);
        background: transparent;
        border: none;
        color: var(--text-primary);
        font-size: 1.25rem;
    }
    
    .nav-toggle:active {
        background: var(--bg-secondary);
    }
}

/* 小屏幕优化 */
@media (max-width: 480px) {
    /* 进一步优化间距 */
    .section {
        padding: 1.5rem 0;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    /* 优化按钮组 */
    .section-actions {
        width: 100%;
    }
    
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-tab {
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    /* 优化卡片间距 */
    .announcements-grid,
    .events-grid {
        gap: 0.75rem;
    }
    
    /* 优化模态框 */
    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .modal-body {
        padding: 1rem;
        flex: 1;
        overflow-y: auto;
    }
    
    .modal-footer {
        padding: 1rem;
        border-top: 1px solid var(--border-color);
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 1.5rem;
    }
    
    .section {
        padding: 1rem 0;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .nav-logo img,
    .hero-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 无障碍优化 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000000;
        --text-muted: #333333;
        --bg-secondary: #f0f0f0;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 2px solid var(--border-color);
    }
}


/* 移动端导航增强 */
@media (max-width: 768px) {
    .nav {
        position: sticky;
        top: 0;
        z-index: 1000;
        backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-content {
        padding: 0.75rem 1rem;
    }
    
    .nav-logo {
        font-size: 1.25rem;
        font-weight: 700;
    }
    
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: none;
        background: transparent;
        border-radius: 8px;
        color: var(--text-primary);
        font-size: 1.25rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    
    .nav-toggle:hover {
        background: var(--bg-secondary);
    }
    
    .nav-toggle:active {
        transform: scale(0.95);
    }
    
    /* 移动端菜单 */
    .mobile-nav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-nav.active {
        opacity: 1;
        visibility: visible;
    }
    
    .mobile-nav-content {
        position: absolute;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        padding: 2rem 1.5rem;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    
    .mobile-nav.active .mobile-nav-content {
        transform: translateX(0);
    }
    
    .mobile-nav-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
        padding-bottom: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .mobile-nav-close {
        width: 44px;
        height: 44px;
        border: none;
        background: transparent;
        border-radius: 8px;
        color: var(--text-primary);
        font-size: 1.25rem;
        cursor: pointer;
    }
    
    .mobile-nav-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .mobile-nav-links a {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        color: var(--text-primary);
        text-decoration: none;
        border-radius: 8px;
        transition: all 0.2s ease;
        font-weight: 500;
    }
    
    .mobile-nav-links a:hover {
        background: var(--bg-secondary);
        color: var(--primary-color);
    }
    
    .mobile-nav-links a.active {
        background: var(--primary-color);
        color: white;
    }
}

/* 移动端主页优化 */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 3rem 1rem;
        gap: 2rem;
    }
    
    .hero-content {
        order: 2;
    }
    
    .hero-image {
        order: 1;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .hero-image img {
        width: 100%;
        height: auto;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 2rem;
        color: var(--text-secondary);
    }
    
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .btn-large {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1.125rem;
    }
}

/* 移动端功能卡片优化 */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 2rem 1.5rem;
        text-align: center;
        border-radius: 16px;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }
    
    .feature-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
    }
    
    .feature-icon {
        width: 64px;
        height: 64px;
        margin: 0 auto 1.5rem;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        color: white;
    }
    
    .feature-card h3 {
        font-size: 1.25rem;
        font-weight: 600;
        margin-bottom: 0.75rem;
        color: var(--text-primary);
    }
    
    .feature-card p {
        color: var(--text-secondary);
        line-height: 1.6;
    }
}

/* 移动端表单优化 */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-control {
        font-size: 16px; /* 防止iOS缩放 */
        padding: 1rem;
        border-radius: 12px;
        border: 2px solid var(--border-color);
        transition: all 0.2s ease;
    }
    
    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
        outline: none;
    }
    
    .btn {
        min-height: 48px;
        font-size: 1rem;
        font-weight: 600;
        border-radius: 12px;
        transition: all 0.2s ease;
    }
    
    .btn:active {
        transform: scale(0.98);
    }
}

/* 移动端模态框优化 */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        padding: 1.5rem;
        border-bottom: 1px solid var(--border-color);
        flex-shrink: 0;
    }
    
    .modal-body {
        padding: 1.5rem;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        padding: 1.5rem;
        border-top: 1px solid var(--border-color);
        flex-shrink: 0;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    .modal-footer .btn:last-child {
        margin-bottom: 0;
    }
}

/* 移动端卡片网格优化 */
@media (max-width: 768px) {
    .announcements-grid,
    .events-grid,
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .announcement-card,
    .event-card,
    .post-card {
        border-radius: 12px;
        padding: 1.5rem;
        background: var(--bg-secondary);
        border: 1px solid var(--border-color);
        transition: all 0.3s ease;
    }
    
    .announcement-card:active,
    .event-card:active,
    .post-card:active {
        transform: scale(0.98);
    }
}

/* 移动端搜索优化 */
@media (max-width: 768px) {
    .search-container {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .search-input {
        width: 100%;
        font-size: 16px;
        padding: 1rem 1rem 1rem 3rem;
        border-radius: 12px;
        border: 2px solid var(--border-color);
        background: var(--bg-secondary);
    }
    
    .search-icon {
        left: 1rem;
        font-size: 1.125rem;
        color: var(--text-muted);
    }
}

/* 移动端分页优化 */
@media (max-width: 768px) {
    .pagination {
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .pagination .btn {
        min-width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 8px;
    }
    
    .pagination .btn-text {
        display: none;
    }
    
    .pagination .btn-icon {
        display: inline-block;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    /* 增大可点击区域 */
    .btn,
    .nav-link,
    .filter-tab,
    .card,
    .announcement-card,
    .event-card,
    .post-card {
        min-height: 44px;
    }
    
    /* 移除hover效果 */
    .btn:hover,
    .card:hover,
    .nav-link:hover {
        transform: none;
    }
    
    /* 添加active状态反馈 */
    .btn:active,
    .card:active,
    .nav-link:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    /* 优化滚动 */
    .modal-body,
    .announcements-grid,
    .events-grid,
    .posts-grid {
        -webkit-overflow-scrolling: touch;
    }
}

/* 横屏模式优化 */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .section {
        padding: 1.5rem 0;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .main-content {
        padding-bottom: 0;
    }
}

/* 小屏幕设备优化 */
@media (max-width: 360px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .btn-large {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .feature-card,
    .announcement-card,
    .event-card {
        padding: 1.25rem;
    }
    
    .modal-content {
        padding: 0;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1.25rem;
    }
}


/* 个人资料模态框样式 */
.modal-large {
    max-width: 800px;
    width: 90%;
}

.profile-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.profile-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    background: #f9f9f9;
}

.profile-section h4 {
    margin: 0 0 1rem 0;
    color: #333;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #6c5ce7;
    padding-bottom: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}

.form-group input[readonly] {
    background-color: #f5f5f5;
    color: #666;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 移动端响应式 */
@media (max-width: 768px) {
    .modal-large {
        width: 95%;
        max-width: none;
        margin: 1rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .profile-section {
        padding: 1rem;
    }
    
    .profile-sections {
        gap: 1rem;
    }
}

/* 用户菜单样式 */
.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.user-menu-item:hover {
    background-color: #f8f9fa;
}

.user-menu-item:last-child {
    border-bottom: none;
}

.user-menu-item i {
    margin-right: 0.5rem;
    width: 16px;
}


/* 聊天窗口样式 */
.chat-window {
    display: none;
    flex-direction: column;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    margin-top: 1rem;
    overflow: hidden;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #6c5ce7;
    color: white;
    border-bottom: 1px solid #ddd;
}

.chat-header-info h4 {
    margin: 0;
    font-size: 1.1rem;
}

.chat-type {
    font-size: 0.8rem;
    opacity: 0.8;
}

.chat-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

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

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8f9fa;
}

.chat-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #666;
    text-align: center;
}

.chat-welcome i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.chat-loading,
.chat-error {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.message-group {
    margin-bottom: 1rem;
}

.message {
    background: white;
    border-radius: 8px;
    padding: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    max-width: 80%;
}

.message-own {
    background: #6c5ce7;
    color: white;
    margin-left: auto;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
}

.message-author {
    font-weight: 600;
}

.message-time {
    opacity: 0.7;
}

.message-content {
    line-height: 1.4;
    word-wrap: break-word;
}

.chat-input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid #ddd;
}

.chat-input-container {
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

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

#send-btn {
    background: #6c5ce7;
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

#send-btn:hover:not(:disabled) {
    background: #5a4fcf;
}

#send-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 聊天室和私聊列表样式 */
.chat-room-item,
.private-chat-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.chat-room-item:hover,
.private-chat-item:hover {
    background-color: #f8f9fa;
}

.room-info,
.chat-info {
    flex: 1;
}

.room-name,
.chat-username {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.room-description,
.chat-status {
    font-size: 0.8rem;
    color: #666;
}

.online-count {
    font-size: 0.8rem;
    color: #6c5ce7;
    font-weight: 500;
}

/* 移动端聊天窗口适配 */
@media (max-width: 768px) {
    .chat-window {
        height: 500px;
        margin: 0.5rem 0;
    }
    
    .message {
        max-width: 90%;
    }
    
    .chat-header {
        padding: 0.75rem;
    }
    
    .chat-messages {
        padding: 0.75rem;
    }
    
    .chat-input-area {
        padding: 0.75rem;
    }
}


/* 表情选择器样式 */
.emoji-picker {
    position: absolute;
    bottom: 60px;
    right: 10px;
    width: 300px;
    max-height: 200px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 5px;
}

.emoji-btn {
    background: none;
    border: none;
    font-size: 20px;
    padding: 5px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.emoji-btn:hover {
    background-color: #f0f0f0;
}

.emoji-btn:active {
    background-color: #e0e0e0;
}

/* 聊天输入区域样式优化 */
.chat-input-container {
    position: relative;
}

.chat-input-btn {
    background: none;
    border: none;
    color: #666;
    font-size: 18px;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.chat-input-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

.chat-input-btn:active {
    background-color: #e0e0e0;
}

/* 文件预览样式 */
.file-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    margin: 5px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-preview .file-icon {
    color: #6c757d;
    font-size: 16px;
}

.file-preview .file-info {
    flex: 1;
    font-size: 14px;
    color: #495057;
}

.file-preview .file-remove {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 14px;
    padding: 2px 6px;
    border-radius: 3px;
}

.file-preview .file-remove:hover {
    background-color: #f8d7da;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .emoji-picker {
        width: 280px;
        right: 5px;
        bottom: 55px;
        max-height: 150px;
        grid-template-columns: repeat(6, 1fr);
    }
    
    .emoji-btn {
        font-size: 18px;
        padding: 4px;
    }
    
    .chat-input-btn {
        font-size: 16px;
        padding: 6px;
    }
}



/* 全页面聊天界面样式 */
.fullscreen-chat {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #fff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
}

.fullscreen-chat.hidden {
    display: none;
}

.fullscreen-chat-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: #2c3e50;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    margin-right: 15px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

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

.fullscreen-chat-header .chat-info {
    flex: 1;
    display: flex;
    align-items: center;
}

.fullscreen-chat-header .chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.fullscreen-chat-header .chat-details h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.fullscreen-chat-header .chat-status {
    font-size: 12px;
    opacity: 0.8;
}

.fullscreen-chat-header .chat-actions {
    display: flex;
    gap: 10px;
}

.fullscreen-chat-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: #f8f9fa;
}

.fullscreen-chat-input-container {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #e9ecef;
    position: relative;
}

.fullscreen-chat-input-container .emoji-picker {
    position: absolute;
    bottom: 100%;
    left: 20px;
    right: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    max-height: 200px;
    overflow-y: auto;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    z-index: 1000;
}

.fullscreen-chat-input-container .emoji-picker.hidden {
    display: none;
}

.fullscreen-chat-input-container .emoji-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 8px;
    padding: 15px;
}

.fullscreen-chat-input-container .emoji {
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    text-align: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.fullscreen-chat-input-container .emoji:hover {
    background-color: #f0f0f0;
}

.fullscreen-chat-input-container .chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.fullscreen-chat-input-container .chat-input-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    flex-shrink: 0;
}

.fullscreen-chat-input-container .chat-input-btn:hover {
    background-color: #f0f0f0;
    color: #495057;
}

.fullscreen-chat-input-container #fullscreen-chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 12px 16px;
    font-size: 14px;
    resize: none;
    min-height: 40px;
    max-height: 120px;
    outline: none;
    transition: border-color 0.3s;
}

.fullscreen-chat-input-container #fullscreen-chat-input:focus {
    border-color: #007bff;
}

.fullscreen-chat-input-container #fullscreen-send-btn {
    background: #007bff;
    border: none;
    color: white;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s;
    flex-shrink: 0;
}

.fullscreen-chat-input-container #fullscreen-send-btn:hover {
    background: #0056b3;
}

.fullscreen-chat-input-container #fullscreen-send-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* 聊天消息样式 */
.fullscreen-chat-messages .message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
}

.fullscreen-chat-messages .message.own {
    flex-direction: row-reverse;
}

.fullscreen-chat-messages .message .message-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 8px;
    object-fit: cover;
}

.fullscreen-chat-messages .message .message-content {
    max-width: 70%;
    background: white;
    padding: 10px 15px;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.fullscreen-chat-messages .message.own .message-content {
    background: #007bff;
    color: white;
}

.fullscreen-chat-messages .message .message-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.fullscreen-chat-messages .message .message-meta {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fullscreen-chat-messages .system-message {
    text-align: center;
    margin: 20px 0;
}

.fullscreen-chat-messages .system-message span {
    background: #e9ecef;
    color: #6c757d;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .fullscreen-chat-header {
        padding: 12px 15px;
    }
    
    .fullscreen-chat-messages {
        padding: 15px;
    }
    
    .fullscreen-chat-input-container {
        padding: 12px 15px;
    }
    
    .fullscreen-chat-input-container .emoji-picker {
        left: 15px;
        right: 15px;
    }
    
    .fullscreen-chat-input-container .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
        padding: 12px;
    }
    
    .fullscreen-chat-messages .message .message-content {
        max-width: 85%;
    }
}

/* 文件上传预览 */
.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.file-preview-item {
    position: relative;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
}

.file-preview-item .file-icon {
    font-size: 16px;
    color: #6c757d;
}

.file-preview-item .file-info {
    flex: 1;
    min-width: 0;
}

.file-preview-item .file-name {
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-item .file-size {
    font-size: 11px;
    color: #6c757d;
}

.file-preview-item .remove-file {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 2px;
    border-radius: 50%;
    font-size: 12px;
}

.file-preview-item .remove-file:hover {
    background: #f8d7da;
}

/* 加载动画 */
.loading-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #6c757d;
}

.loading-message .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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


/* UI优化和动画效果 */

/* 平滑过渡效果 */
* {
    transition: all 0.3s ease;
}

/* 按钮悬停效果优化 */
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

/* 导航链接悬停效果 */
.nav-link:hover {
    transform: translateY(-1px);
    color: var(--primary-color);
}

/* 卡片悬停效果 */
.announcement-card:hover,
.post-card:hover,
.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* 聊天室悬停效果 */
.chat-room:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateX(5px);
}

/* 加载动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* 渐变背景动画 */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.gradient-bg {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* 改进的移动端响应式设计 */
@media (max-width: 768px) {
    /* 导航栏优化 */
    .nav-container {
        padding: 0.5rem 1rem;
    }
    
    .nav-links {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    /* 主要内容区域优化 */
    .main-content {
        padding: 1rem;
    }
    
    /* 卡片优化 */
    .card {
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    /* 按钮优化 */
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-height: 44px; /* 触摸友好的最小高度 */
    }
    
    /* 输入框优化 */
    input, textarea, select {
        min-height: 44px;
        font-size: 16px; /* 防止iOS缩放 */
    }
    
    /* 模态框优化 */
    .modal-content {
        margin: 1rem;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* 聊天界面优化 */
    .fullscreen-chat {
        padding: 0.5rem;
    }
    
    .chat-input-container {
        padding: 0.75rem;
    }
    
    .chat-input {
        min-height: 44px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #ffffff;
        --text-muted: #cccccc;
        --border-color: #333333;
        --card-bg: #2d2d2d;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .card {
        background-color: var(--card-bg);
        border-color: var(--border-color);
    }
    
    input, textarea, select {
        background-color: var(--card-bg);
        color: var(--text-color);
        border-color: var(--border-color);
    }
}

/* 无障碍优化 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 焦点指示器 */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 高对比度模式支持 */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 2px solid var(--border-color);
    }
}

/* 新增功能：通知徽章动画 */
.notification-badge {
    position: relative;
    overflow: hidden;
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

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

/* 新增功能：打字机效果 */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink-caret {
    from, to {
        border-color: transparent;
    }
    50% {
        border-color: var(--primary-color);
    }
}

/* 新增功能：滚动指示器 */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    z-index: 9999;
    transition: width 0.3s ease;
}


/* 管理员删除按钮样式 */
.admin-delete-btn {
    background-color: #dc3545 !important;
    color: white !important;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.8;
}

.admin-delete-btn:hover {
    background-color: #c82333 !important;
    opacity: 1;
    transform: scale(1.05);
}

.admin-delete-btn i {
    font-size: 10px;
}

/* 活动卡片头部布局调整 */
.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.event-header-content {
    flex: 1;
}

/* 帖子徽章区域布局调整 */
.post-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-icon.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-icon.btn-danger:hover {
    background-color: #c82333;
}


/* 优化功能卡片布局 */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* 优化主页标题样式 */
.hero-title {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    /* 添加备用颜色，确保在不支持背景裁剪的浏览器中正常显示 */
    color: var(--primary-color);
    /* 确保文本不会被截断 */
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 为不支持背景裁剪的浏览器提供备用样式 */
@supports not (-webkit-background-clip: text) {
    .hero-title {
        background: none;
        -webkit-text-fill-color: initial;
        color: var(--primary-color);
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* 优化按钮样式 */
.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}


/* 修复帖子详情模态框在移动端的显示问题 */
@media (max-width: 768px) {
    #post-detail-modal .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    
    #post-detail-modal .modal-header {
        flex-shrink: 0;
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    #post-detail-modal .modal-body {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
    }
    
    #post-detail-modal .reply-form {
        margin-top: 1rem;
        margin-bottom: 1rem;
        background: var(--surface-color);
        padding: 1rem;
        border-radius: 8px;
        border: 1px solid var(--border-color);
    }
    
    #post-detail-modal .reply-form textarea {
        width: 100%;
        min-height: 80px;
        resize: vertical;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        padding: 0.75rem;
        font-family: inherit;
        font-size: 14px;
        line-height: 1.4;
    }
    
    #post-detail-modal .reply-form button {
        margin-top: 0.75rem;
        width: 100%;
        padding: 0.75rem;
        font-size: 14px;
    }
}



/* 注册和登录模态框移动端优化 */
@media (max-width: 768px) {
    /* 注册模态框移动端适配 */
    #register-modal .modal-content,
    #login-modal .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: none;
        max-width: none;
        display: flex;
        flex-direction: column;
        overflow: visible;
        transform: scale(1) translateY(0);
    }
    
    #register-modal .modal-header,
    #login-modal .modal-header {
        flex-shrink: 0;
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-card);
    }
    
    #register-modal .modal-body,
    #login-modal .modal-body {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        padding: 1.5rem;
        background: var(--bg-secondary);
        min-height: 0;
        position: relative;
    }
    
    #register-modal .modal-footer,
    #login-modal .modal-footer {
        flex-shrink: 0;
        padding: 1rem 1.5rem;
        border-top: 1px solid var(--border-color);
        background: var(--bg-card);
    }
    
    /* 表单字段移动端优化 */
    #register-modal .form-group,
    #login-modal .form-group {
        margin-bottom: 1.25rem;
    }
    
    #register-modal .form-control,
    #login-modal .form-control {
        min-height: 48px;
        font-size: 16px; /* 防止iOS缩放 */
        padding: 0.875rem 1rem;
        border-radius: var(--radius-md);
        border: 2px solid var(--border-color);
        transition: var(--transition);
    }
    
    #register-modal .form-control:focus,
    #login-modal .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        outline: none;
    }
    
    #register-modal .form-label,
    #login-modal .form-label {
        font-size: 0.9rem;
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.5rem;
        display: block;
    }
    
    /* 按钮移动端优化 */
    #register-modal .btn,
    #login-modal .btn {
        min-height: 48px;
        font-size: 16px;
        padding: 0.875rem 1.5rem;
        border-radius: var(--radius-md);
        font-weight: 600;
        transition: var(--transition);
        width: 100%;
        margin-top: 0.5rem;
    }
    
    #register-modal .btn-primary,
    #login-modal .btn-primary {
        background: var(--primary-gradient);
        border: none;
        color: white;
        box-shadow: var(--shadow-md);
    }
    
    #register-modal .btn-primary:hover,
    #login-modal .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }
    
    /* 关闭按钮移动端优化 */
    #register-modal .modal-close,
    #login-modal .modal-close {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: var(--bg-tertiary);
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        color: var(--text-secondary);
        transition: var(--transition);
    }
    
    #register-modal .modal-close:hover,
    #login-modal .modal-close:hover {
        background: var(--danger-color);
        color: white;
        transform: scale(1.1);
    }
    
    /* 链接样式移动端优化 */
    #register-modal .modal-footer a,
    #login-modal .modal-footer a {
        color: var(--primary-color);
        text-decoration: none;
        font-weight: 600;
        font-size: 16px;
        padding: 0.5rem;
        border-radius: var(--radius-sm);
        transition: var(--transition);
        display: inline-block;
        text-align: center;
        width: 100%;
        margin-top: 0.5rem;
    }
    
    #register-modal .modal-footer a:hover,
    #login-modal .modal-footer a:hover {
        background: rgba(102, 126, 234, 0.1);
        transform: translateY(-1px);
    }
}

/* 超小屏幕设备优化 */
@media (max-width: 480px) {
    #register-modal .modal-body,
    #login-modal .modal-body {
        padding: 1rem;
    }
    
    #register-modal .modal-header,
    #login-modal .modal-header {
        padding: 0.875rem 1rem;
    }
    
    #register-modal .modal-footer,
    #login-modal .modal-footer {
        padding: 0.875rem 1rem;
    }
    
    #register-modal .form-control,
    #login-modal .form-control {
        min-height: 44px;
        padding: 0.75rem 0.875rem;
    }
    
    #register-modal .btn,
    #login-modal .btn {
        min-height: 44px;
        padding: 0.75rem 1.25rem;
    }
}

/* 横屏模式优化 */
@media (max-width: 768px) and (orientation: landscape) {
    #register-modal .modal-content,
    #login-modal .modal-content {
        height: 100vh;
        overflow-y: auto;
    }
    
    #register-modal .modal-body,
    #login-modal .modal-body {
        padding: 1rem 1.5rem;
    }
    
    #register-modal .form-group,
    #login-modal .form-group {
        margin-bottom: 1rem;
    }
}


/* 移动端滚动优化 - 特别针对iOS */
@media (max-width: 768px) {
    /* 确保模态框可以滚动 */
    #register-modal,
    #login-modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
    }
    
    /* 模态框内容滚动优化 */
    #register-modal .modal-content,
    #login-modal .modal-content {
        position: relative;
        height: 100vh;
        overflow: hidden;
    }
    
    /* 模态框body滚动区域 */
    #register-modal .modal-body,
    #login-modal .modal-body {
        height: calc(100vh - 120px); /* 减去header和footer的高度 */
        overflow-y: scroll;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        overscroll-behavior: contain;
    }
    
    /* iOS Safari 滚动修复 */
    #register-modal .modal-body::-webkit-scrollbar,
    #login-modal .modal-body::-webkit-scrollbar {
        display: none;
    }
    
    /* 表单容器优化 */
    #register-modal .modal-body > *,
    #login-modal .modal-body > * {
        margin-bottom: 1rem;
    }
    
    /* 最后一个元素的底部间距 */
    #register-modal .modal-body > *:last-child,
    #login-modal .modal-body > *:last-child {
        margin-bottom: 2rem;
    }
}

/* 针对小屏幕的额外优化 */
@media (max-width: 480px) {
    #register-modal .modal-body,
    #login-modal .modal-body {
        height: calc(100vh - 100px); /* 小屏幕减少header和footer高度 */
        padding: 1rem;
    }
}

/* 针对超小屏幕的优化 */
@media (max-width: 360px) {
    #register-modal .modal-body,
    #login-modal .modal-body {
        height: calc(100vh - 90px);
        padding: 0.75rem;
    }
    
    #register-modal .form-group,
    #login-modal .form-group {
        margin-bottom: 0.75rem;
    }
}


/* 修复发布帖子和公告模态框按钮显示问题 */
#new-post-modal .modal-content,
#new-announcement-modal .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#new-post-modal form,
#new-announcement-modal form {
    display: flex;
    flex-direction: column;
    flex: 1;
}

#new-post-modal .form-actions,
#new-announcement-modal .form-actions {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    background: white;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* 确保按钮在所有设备上都可见 */

/* 修复发布帖子和公告模态框按钮显示问题 */
.modal-large {
    max-height: 90vh !important;
    overflow-y: auto !important;
}

.modal-large .modal-content {
    padding-bottom: 80px !important;
}

.modal-large .form-actions {
    display: flex !important;
    gap: 1rem !important;
    justify-content: flex-end !important;
    margin-top: 1.5rem !important;
    padding: 1rem 0 !important;
    border-top: 1px solid #e5e7eb !important;
    background: white !important;
    position: relative !important;
    z-index: 1000 !important;
}

.modal-large .form-actions .btn {
    min-width: 100px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    border-radius: 0.5rem !important;
}

/* 确保模态框内容不被遮挡 */
/* 新帖子和公告模态框的特殊样式 */
#new-post-modal .modal-content,
#new-announcement-modal .modal-content {
    display: flex !important;
    flex-direction: column !important;
    min-height: 400px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
}

#new-post-modal form,
#new-announcement-modal form {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 1rem !important;
}

#new-post-modal .form-actions,
#new-announcement-modal .form-actions {
    margin-top: 1.5rem !important;
    padding: 1rem 0 !important;
    border-top: 1px solid #e5e7eb !important;
    background: white !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 1rem !important;
    flex-shrink: 0 !important;
}

/* 移动端特殊处理 */
@media (max-width: 768px) {
    .modal-large {
        max-height: 95vh !important;
    }
    
    .modal-large .form-actions {
        position: sticky !important;
        bottom: 0 !important;
        background: white !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    }
}



/* ========== 发布按钮显示问题修复 - 强化版 ========== */

/* 确保所有模态框的发布按钮都能正确显示 */
.modal .form-actions {
    display: flex !important;
    justify-content: flex-end !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
    padding: 1rem 0 !important;
    border-top: 1px solid #e5e7eb !important;
    background: white !important;
    position: relative !important;
    z-index: 1001 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* 强制显示发布按钮 */
.modal .form-actions .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 120px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 发布按钮特殊样式 */
.modal .form-actions .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.modal .form-actions .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

/* 取消按钮样式 */
.modal .form-actions .btn-outline {
    background: white !important;
    color: #6b7280 !important;
    border: 1px solid #d1d5db !important;
}

.modal .form-actions .btn-outline:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
}

/* 大屏幕特殊处理 */
@media (min-width: 1200px) {
    .modal-large {
        max-width: 800px !important;
        max-height: 85vh !important;
    }
    
    .modal-large .modal-content {
        padding: 2rem !important;
        padding-bottom: 100px !important;
    }
    
    .modal-large .form-actions {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 1.5rem 2rem !important;
        background: white !important;
        border-top: 1px solid #e5e7eb !important;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1) !important;
    }
}

/* 中等屏幕处理 */
@media (min-width: 769px) and (max-width: 1199px) {
    .modal-large {
        max-width: 700px !important;
        max-height: 90vh !important;
    }
    
    .modal-large .form-actions {
        position: sticky !important;
        bottom: 0 !important;
        background: white !important;
        box-shadow: 0 -2px 8px rgba(0,0,0,0.1) !important;
    }
}

/* 小屏幕和移动端处理 */
@media (max-width: 768px) {
    .modal-large {
        width: 95vw !important;
        max-height: 95vh !important;
        margin: 2.5vh auto !important;
    }
    
    .modal-large .modal-content {
        padding: 1rem !important;
        padding-bottom: 80px !important;
    }
    
    .modal-large .form-actions {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        margin: 0 !important;
        padding: 1rem !important;
        background: white !important;
        border-top: 1px solid #e5e7eb !important;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.15) !important;
        z-index: 1002 !important;
    }
    
    .modal-large .form-actions .btn {
        min-width: 100px !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* 确保模态框内容区域正确滚动 */
.modal-large form {
    display: flex !important;
    flex-direction: column !important;
    min-height: 400px !important;
    max-height: calc(85vh - 120px) !important;
    overflow-y: auto !important;
}

.modal-large .form-group:last-of-type {
    margin-bottom: 2rem !important;
}

/* 文本域特殊处理 */
.modal-large textarea {
    min-height: 200px !important;
    max-height: 300px !important;
    resize: vertical !important;
}

/* 强制显示所有表单元素 */
.modal .form-group {
    margin-bottom: 1.5rem !important;
}

.modal .form-group label {
    display: block !important;
    margin-bottom: 0.5rem !important;
    font-weight: 500 !important;
    color: #374151 !important;
}

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
    width: 100% !important;
    padding: 0.75rem !important;
    border: 1px solid #d1d5db !important;
    border-radius: 0.5rem !important;
    font-size: 1rem !important;
    transition: border-color 0.2s ease !important;
}

.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
    outline: none !important;
    border-color: #667eea !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

/* 调试用 - 可以临时启用来检查元素 */
/*
.modal .form-actions {
    background: red !important;
    border: 3px solid blue !important;
}

.modal .form-actions .btn {
    background: yellow !important;
    color: black !important;
    border: 2px solid green !important;
}
*/



/* ========== 强制修复发布按钮显示问题 ========== */
/* 这个样式放在最后，确保优先级最高 */

#new-post-modal .form-actions,
#new-announcement-modal .form-actions {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
    padding: 1.5rem 0 !important;
    border-top: 2px solid #e5e7eb !important;
    background: white !important;
    position: relative !important;
    z-index: 9999 !important;
    width: 100% !important;
    min-height: 60px !important;
    box-sizing: border-box !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#new-post-modal .form-actions button,
#new-announcement-modal .form-actions button,
#new-post-modal .form-actions .btn,
#new-announcement-modal .form-actions .btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 120px !important;
    min-height: 44px !important;
    padding: 0.75rem 1.5rem !important;
    font-size: 1rem !important;
    font-weight: 500 !important;
    border-radius: 0.5rem !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 10000 !important;
    border: none !important;
    outline: none !important;
}

/* 发布按钮特殊样式 */
#new-post-modal .form-actions .btn-primary,
#new-announcement-modal .form-actions .btn-primary,
#new-post-modal .form-actions button[type="submit"],
#new-announcement-modal .form-actions button[type="submit"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

#new-post-modal .form-actions .btn-primary:hover,
#new-announcement-modal .form-actions .btn-primary:hover,
#new-post-modal .form-actions button[type="submit"]:hover,
#new-announcement-modal .form-actions button[type="submit"]:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
}

/* 取消按钮样式 */
#new-post-modal .form-actions .btn-outline,
#new-announcement-modal .form-actions .btn-outline,
#new-post-modal .form-actions button[type="button"],
#new-announcement-modal .form-actions button[type="button"] {
    background: white !important;
    color: #6b7280 !important;
    border: 2px solid #d1d5db !important;
}

#new-post-modal .form-actions .btn-outline:hover,
#new-announcement-modal .form-actions .btn-outline:hover,
#new-post-modal .form-actions button[type="button"]:hover,
#new-announcement-modal .form-actions button[type="button"]:hover {
    background: #f9fafb !important;
    border-color: #9ca3af !important;
    color: #374151 !important;
}

/* 确保模态框有足够的空间显示按钮 */
#new-post-modal .modal-content,
#new-announcement-modal .modal-content {
    padding-bottom: 100px !important;
    min-height: 500px !important;
}

/* 移动端特殊处理 */
@media (max-width: 768px) {
    #new-post-modal .form-actions,
    #new-announcement-modal .form-actions {
        position: sticky !important;
        bottom: 0 !important;
        background: white !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1) !important;
        padding: 1rem !important;
        margin: 0 !important;
        border-top: 2px solid #e5e7eb !important;
    }
    
    #new-post-modal .form-actions button,
    #new-announcement-modal .form-actions button,
    #new-post-modal .form-actions .btn,
    #new-announcement-modal .form-actions .btn {
        min-width: 100px !important;
        padding: 0.75rem 1rem !important;
        font-size: 0.9rem !important;
    }
}

/* 超小屏幕处理 */
@media (max-width: 480px) {
    #new-post-modal .form-actions,
    #new-announcement-modal .form-actions {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    #new-post-modal .form-actions button,
    #new-announcement-modal .form-actions button,
    #new-post-modal .form-actions .btn,
    #new-announcement-modal .form-actions .btn {
        width: 100% !important;
        min-width: auto !important;
    }
}


/* ========== AI助手介绍样式 - 正式醒目版 ========== */

.ai-assistant-hero {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 1rem;
}

.ai-assistant-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 50%, #581c87 100%);
    border-radius: 1.5rem;
    padding: 2.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    max-width: 800px;
    width: 100%;
    box-shadow: 
        0 20px 40px rgba(30, 58, 138, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
}

.ai-assistant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #d97706);
    z-index: 1;
}

.ai-assistant-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.ai-assistant-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 
        0 30px 60px rgba(30, 58, 138, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.25);
}

.ai-assistant-card:hover::after {
    opacity: 1;
}

.ai-assistant-icon {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 10px 20px rgba(251, 191, 36, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
    position: relative;
    z-index: 2;
}

.ai-assistant-icon::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #fbbf24, #f59e0b, #d97706, #fbbf24);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 3s linear infinite;
}

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

.ai-assistant-icon i {
    font-size: 2rem;
    color: #1e3a8a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.ai-assistant-content {
    flex: 1;
    color: white;
    position: relative;
    z-index: 2;
}

.ai-assistant-content h4 {
    margin: 0 0 1rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
    position: relative;
}

.ai-assistant-content h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #fbbf24, #f59e0b);
    border-radius: 2px;
}

.ai-assistant-content p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    font-weight: 400;
}

/* 添加一些装饰性元素 */
.ai-assistant-card .decoration {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0.6;
}

.ai-assistant-card .decoration::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .ai-assistant-hero {
        margin-top: 1.5rem;
        padding: 0 0.5rem;
    }
    
    .ai-assistant-card {
        padding: 2rem;
        gap: 1rem;
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
    
    .ai-assistant-icon {
        width: 70px;
        height: 70px;
    }
    
    .ai-assistant-icon i {
        font-size: 1.75rem;
    }
    
    .ai-assistant-content h4 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .ai-assistant-content h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .ai-assistant-content p {
        font-size: 1rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ai-assistant-card {
        padding: 1.5rem;
        margin: 0 0.25rem;
    }
    
    .ai-assistant-icon {
        width: 60px;
        height: 60px;
    }
    
    .ai-assistant-icon i {
        font-size: 1.5rem;
    }
    
    .ai-assistant-content h4 {
        font-size: 1.25rem;
    }
    
    .ai-assistant-content p {
        font-size: 0.95rem;
        line-height: 1.6;
    }
}


/* 公告详情和帖子详情模态框样式 */
#announcement-detail-modal .modal-content,
#post-detail-modal .modal-content {
    max-height: 90vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

#announcement-detail-modal .announcement-detail-content,
#post-detail-modal .post-detail-content {
    padding: 1rem !important;
    max-height: calc(90vh - 120px) !important;
    overflow-y: auto !important;
}

.announcement-detail-content,
.post-detail-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.announcement-meta,
.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.author-name {
    font-weight: 600;
    color: #1f2937;
}

.announcement-time,
.post-time {
    font-size: 0.875rem;
    color: #6b7280;
}

.announcement-priority {
    display: flex;
    align-items: center;
}

.priority-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    background: #dbeafe;
    color: #1e40af;
}

.priority-badge.high {
    background: #fee2e2;
    color: #dc2626;
}

.priority-badge.urgent {
    background: #fef3c7;
    color: #d97706;
}

.announcement-content-body,
.post-content-body {
    padding: 1.5rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    line-height: 1.6;
    color: #374151;
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.announcement-actions,
.post-actions {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 0;
    border-top: 1px solid #e2e8f0;
}

.post-stats {
    display: flex;
    gap: 1rem;
    align-items: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .announcement-meta,
    .post-meta {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .announcement-actions,
    .post-actions {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .announcement-content-body,
    .post-content-body {
        max-height: 300px;
    }
}


/* 聊天页面开发中提示样式 */
.chat-development-notice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 2rem;
}

.development-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 1rem;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    max-width: 600px;
    width: 100%;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

.development-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: shimmer 3s infinite;
}

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

.development-icon {
    font-size: 4rem;
    color: #667eea;
    margin-bottom: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.development-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1rem;
}

.development-content p {
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.development-animation {
    margin-top: 2rem;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #667eea;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.loading-dots span:nth-child(3) { animation-delay: 0s; }

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
    }
    40% {
        transform: scale(1);
    }
}

.coming-soon-features {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    max-width: 600px;
    width: 100%;
}

.coming-soon-features h4 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    text-align: center;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #f1f5f9;
}

.feature-item i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 0.5rem;
}

.feature-item span {
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    text-align: center;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .chat-development-notice {
        padding: 1rem;
        min-height: 50vh;
    }
    
    .development-card {
        padding: 2rem 1.5rem;
    }
    
    .development-icon {
        font-size: 3rem;
    }
    
    .development-content h3 {
        font-size: 1.5rem;
    }
    
    .development-content p {
        font-size: 1rem;
    }
    
    .coming-soon-features {
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .feature-item {
        padding: 0.75rem;
    }
    
    .feature-item i {
        font-size: 1.5rem;
    }
    
    .feature-item span {
        font-size: 0.8rem;
    }
}


/* 文件上传样式 */
.file-upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    background-color: #fafafa;
    transition: all 0.3s ease;
}

.file-upload-area:hover {
    border-color: #007bff;
    background-color: #f0f8ff;
}

.file-upload-button {
    cursor: pointer;
    padding: 20px;
    border-radius: 6px;
    background-color: #fff;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
}

.file-upload-button:hover {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.file-upload-button i {
    font-size: 24px;
    margin-bottom: 10px;
    display: block;
}

.file-preview {
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.file-preview img {
    max-width: 100px;
    max-height: 100px;
    margin: 5px;
    object-fit: contain;
}

.file-preview video {
    max-width: 100px;
    max-height: 100px;
    margin: 5px;
    object-fit: contain;
}

.file-preview-item .remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 0, 0, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-preview-item .remove-file:hover {
    background: rgba(255, 0, 0, 1);
}

.file-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 5px;
    font-size: 10px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* 媒体显示样式 */
.media-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.media-item {
    max-width: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
}

.media-item img {
    width: 100%;
    height: auto;
    display: block;
}

.media-item video {
    width: 100%;
    height: auto;
    display: block;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .file-preview {
        justify-content: center;
    }
    
    .file-preview-item {
        width: 80px;
        height: 80px;
    }
    
    .media-item {
        max-width: 150px;
    }
}

