/* 实验社科社服务平台 - 大厂开放平台风格 */

/* CSS变量 */
:root {
    /* 品牌色 */
    --color-primary: #8B2252;
    --color-primary-hover: #721D44;
    --color-primary-active: #5E1838;
    --color-primary-bg: rgba(139, 34, 82, 0.08);
    --color-primary-border: rgba(139, 34, 82, 0.2);
    
    /* 中性色 */
    --color-text-primary: #1D2129;
    --color-text-secondary: #4E5969;
    --color-text-tertiary: #86909C;
    --color-text-disabled: #C9CDD4;
    --color-text-link: #8B2252;
    
    /* 背景色 */
    --color-bg-page: #F7F8FA;
    --color-bg-container: #FFFFFF;
    --color-bg-hover: #F2F3F5;
    --color-bg-active: #E5E6EB;
    
    /* 边框色 */
    --color-border: #E5E6EB;
    --color-border-light: #F2F3F5;
    
    /* 功能色 */
    --color-success: #00B42A;
    --color-success-bg: rgba(0, 180, 42, 0.1);
    --color-warning: #FF7D00;
    --color-warning-bg: rgba(255, 125, 0, 0.1);
    --color-error: #F53F3F;
    --color-error-bg: rgba(245, 63, 63, 0.1);
    --color-info: #165DFF;
    --color-info-bg: rgba(22, 93, 255, 0.1);
    
    /* 间距 */
    --space-2: 2px;
    --space-4: 4px;
    --space-8: 8px;
    --space-12: 12px;
    --space-16: 16px;
    --space-20: 20px;
    --space-24: 24px;
    --space-32: 32px;
    --space-40: 40px;
    --space-48: 48px;
    
    /* 圆角 */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* 字体 */
    --font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', sans-serif;
    --font-size-12: 12px;
    --font-size-13: 13px;
    --font-size-14: 14px;
    --font-size-16: 16px;
    --font-size-18: 18px;
    --font-size-20: 20px;
    --font-size-24: 24px;
    --font-size-28: 28px;
    --font-size-32: 32px;
    
    /* 行高 */
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    
    /* 过渡 */
    --transition-fast: 0.1s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* 重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-14);
    line-height: var(--line-height-normal);
    color: var(--color-text-primary);
    background-color: var(--color-bg-page);
    min-height: 100vh;
}

a {
    color: var(--color-text-link);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-hover);
}

/* 布局 */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-24);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-16);
    }
}

/* 导航栏 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--color-bg-container);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-24);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    font-size: var(--font-size-16);
    font-weight: 600;
    color: var(--color-text-primary);
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--color-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: var(--font-size-14);
    font-weight: 700;
}

.nav {
    display: none;
    list-style: none;
    gap: var(--space-8);
}

@media (min-width: 768px) {
    .nav {
        display: flex;
    }
}

.nav-item a {
    display: block;
    padding: var(--space-8) var(--space-16);
    color: var(--color-text-secondary);
    font-size: var(--font-size-14);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-item a:hover {
    color: var(--color-text-primary);
    background: var(--color-bg-hover);
}

.nav-item a.active {
    color: var(--color-primary);
    background: var(--color-primary-bg);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-12);
}

.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
}

.mobile-menu-btn:hover {
    background: var(--color-bg-hover);
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-container);
    z-index: 999;
    padding: var(--space-16);
}

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

.mobile-nav {
    list-style: none;
}

.mobile-nav-item {
    border-bottom: 1px solid var(--color-border-light);
}

.mobile-nav-item a {
    display: block;
    padding: var(--space-16) 0;
    color: var(--color-text-primary);
    font-size: var(--font-size-16);
}

.mobile-nav-item a:hover {
    color: var(--color-primary);
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    height: 36px;
    padding: 0 var(--space-16);
    font-size: var(--font-size-14);
    font-weight: 500;
    line-height: 1;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

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

.btn-secondary {
    background: var(--color-bg-container);
    border-color: var(--color-border);
    color: var(--color-text-primary);
}

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

.btn-text {
    background: transparent;
    border-color: transparent;
    color: var(--color-primary);
}

.btn-text:hover {
    background: var(--color-primary-bg);
}

.btn-sm {
    height: 28px;
    padding: 0 var(--space-8);
    font-size: var(--font-size-12);
}

.btn-lg {
    height: 40px;
    padding: 0 var(--space-24);
    font-size: var(--font-size-16);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 36px;
    padding: 0;
}

/* 表单 */
.form-item {
    margin-bottom: var(--space-20);
}

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

.form-label-required::after {
    content: '*';
    color: var(--color-error);
    margin-left: var(--space-4);
}

.form-input {
    width: 100%;
    height: 40px;
    padding: 0 var(--space-12);
    font-size: var(--font-size-14);
    color: var(--color-text-primary);
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--transition-fast);
}

.form-input:hover {
    border-color: var(--color-text-tertiary);
}

.form-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-bg);
}

.form-input::placeholder {
    color: var(--color-text-disabled);
}

.form-textarea {
    width: 100%;
    min-height: 100px;
    padding: var(--space-12);
    font-size: var(--font-size-14);
    font-family: inherit;
    color: var(--color-text-primary);
    background: var(--color-bg-container);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    resize: vertical;
    transition: all var(--transition-fast);
}

.form-textarea:hover {
    border-color: var(--color-text-tertiary);
}

.form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-bg);
}

.form-select {
    width: 100%;
    height: 40px;
    padding: 0 var(--space-32) 0 var(--space-12);
    font-size: var(--font-size-14);
    color: var(--color-text-primary);
    background: var(--color-bg-container) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2386909C' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    outline: none;
    appearance: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-select:hover {
    border-color: var(--color-text-tertiary);
}

.form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px var(--color-primary-bg);
}

.form-hint {
    margin-top: var(--space-4);
    font-size: var(--font-size-12);
    color: var(--color-text-tertiary);
}

.form-error {
    margin-top: var(--space-4);
    font-size: var(--font-size-12);
    color: var(--color-error);
}

.form-row {
    display: flex;
    gap: var(--space-16);
}

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

/* 卡片 */
.card {
    background: var(--color-bg-container);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: var(--space-20) var(--space-24);
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: var(--font-size-16);
    font-weight: 600;
    color: var(--color-text-primary);
}

.card-body {
    padding: var(--space-24);
}

.card-footer {
    padding: var(--space-16) var(--space-24);
    border-top: 1px solid var(--color-border-light);
    background: var(--color-bg-page);
}

/* 标签 */
.tag {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 var(--space-8);
    font-size: var(--font-size-12);
    border-radius: var(--radius-sm);
}

.tag-default {
    background: var(--color-bg-hover);
    color: var(--color-text-secondary);
}

.tag-primary {
    background: var(--color-primary-bg);
    color: var(--color-primary);
}

.tag-success {
    background: var(--color-success-bg);
    color: var(--color-success);
}

.tag-warning {
    background: var(--color-warning-bg);
    color: var(--color-warning);
}

.tag-error {
    background: var(--color-error-bg);
    color: var(--color-error);
}

.tag-info {
    background: var(--color-info-bg);
    color: var(--color-info);
}

/* 进度条 */
.progress {
    width: 100%;
    height: 6px;
    background: var(--color-bg-hover);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
}

/* 步骤条 */
.steps {
    display: flex;
    padding: var(--space-24) 0;
}

.step {
    flex: 1;
    position: relative;
    text-align: center;
}

.step::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 50%;
    width: 100%;
    height: 1px;
    background: var(--color-border);
}

.step:last-child::before {
    display: none;
}

.step-icon {
    position: relative;
    width: 28px;
    height: 28px;
    margin: 0 auto var(--space-8);
    background: var(--color-bg-hover);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-12);
    font-weight: 600;
    color: var(--color-text-tertiary);
    z-index: 1;
}

.step.active .step-icon {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.step.completed .step-icon {
    background: var(--color-success);
    border-color: var(--color-success);
    color: white;
}

.step-title {
    font-size: var(--font-size-13);
    color: var(--color-text-tertiary);
}

.step.active .step-title {
    color: var(--color-text-primary);
    font-weight: 500;
}

.step.completed .step-title {
    color: var(--color-success);
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    padding: var(--space-12) var(--space-16);
    font-size: var(--font-size-13);
    font-weight: 600;
    color: var(--color-text-secondary);
    background: var(--color-bg-page);
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.table td {
    padding: var(--space-12) var(--space-16);
    font-size: var(--font-size-14);
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-light);
}

.table tbody tr:hover {
    background: var(--color-bg-hover);
}

/* 列表 */
.list-item {
    display: flex;
    align-items: center;
    padding: var(--space-16);
    border-bottom: 1px solid var(--color-border-light);
    transition: background var(--transition-fast);
}

.list-item:hover {
    background: var(--color-bg-hover);
}

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

.list-item-content {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-size: var(--font-size-14);
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.list-item-desc {
    font-size: var(--font-size-12);
    color: var(--color-text-tertiary);
}

/* 图标 */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.icon svg {
    width: 100%;
    height: 100%;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

.icon-lg {
    width: 24px;
    height: 24px;
}

/* 页面容器 */
.page-container {
    padding-top: 84px;
    padding-bottom: var(--space-48);
    min-height: 100vh;
}

.page-header {
    margin-bottom: var(--space-24);
}

.page-title {
    font-size: var(--font-size-24);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-8);
}

.page-desc {
    font-size: var(--font-size-14);
    color: var(--color-text-tertiary);
}

/* 内容区 */
.content-card {
    background: var(--color-bg-container);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.content-header {
    padding: var(--space-20) var(--space-24);
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-12);
}

.content-title {
    font-size: var(--font-size-16);
    font-weight: 600;
    color: var(--color-text-primary);
}

.content-body {
    padding: var(--space-24);
}

/* 空状态 */
.empty-state {
    padding: var(--space-48) var(--space-24);
    text-align: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-16);
    background: var(--color-bg-hover);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-disabled);
}

.empty-title {
    font-size: var(--font-size-16);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-8);
}

.empty-desc {
    font-size: var(--font-size-14);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-20);
}

/* 分割线 */
.divider {
    height: 1px;
    background: var(--color-border-light);
    margin: var(--space-24) 0;
}

/* 网格 */
.grid {
    display: grid;
    gap: var(--space-16);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* 功能卡片 */
.feature-card {
    background: var(--color-bg-container);
    border-radius: var(--radius-lg);
    padding: var(--space-24);
    border: 1px solid var(--color-border-light);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.feature-card:hover {
    border-color: var(--color-primary-border);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--color-primary-bg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-16);
    color: var(--color-primary);
}

.feature-title {
    font-size: var(--font-size-16);
    font-weight: 600;
    color: var(--color-text-primary);
    margin-bottom: var(--space-8);
}

.feature-desc {
    font-size: var(--font-size-13);
    color: var(--color-text-tertiary);
    line-height: var(--line-height-relaxed);
}

/* 统计卡片 */
.stat-card {
    background: var(--color-bg-container);
    border-radius: var(--radius-lg);
    padding: var(--space-20);
    border: 1px solid var(--color-border-light);
}

.stat-label {
    font-size: var(--font-size-13);
    color: var(--color-text-tertiary);
    margin-bottom: var(--space-8);
}

.stat-value {
    font-size: var(--font-size-28);
    font-weight: 600;
    color: var(--color-text-primary);
}

/* 信息项 */
.info-item {
    display: flex;
    padding: var(--space-12) 0;
    border-bottom: 1px solid var(--color-border-light);
}

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

.info-label {
    width: 120px;
    flex-shrink: 0;
    font-size: var(--font-size-14);
    color: var(--color-text-tertiary);
}

.info-value {
    flex: 1;
    font-size: var(--font-size-14);
    color: var(--color-text-primary);
}

/* 模态框 */
.modal-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-24);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

.modal {
    width: 100%;
    max-width: 520px;
    max-height: 80vh;
    background: var(--color-bg-container);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    overflow: hidden;
}

.modal-mask.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: var(--space-20) var(--space-24);
    border-bottom: 1px solid var(--color-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--font-size-16);
    font-weight: 600;
    color: var(--color-text-primary);
}

.modal-close {
    width: 28px;
    height: 28px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.modal-body {
    padding: var(--space-24);
    overflow-y: auto;
    max-height: calc(80vh - 140px);
}

.modal-footer {
    padding: var(--space-16) var(--space-24);
    border-top: 1px solid var(--color-border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-12);
}

/* 消息提示 */
.message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px);
    padding: var(--space-12) var(--space-24);
    background: var(--color-text-primary);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 3000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.message.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.message-success {
    background: var(--color-success);
}

.message-error {
    background: var(--color-error);
}

.message-warning {
    background: var(--color-warning);
}

.message-info {
    background: var(--color-info);
}

/* 页脚 */
.footer {
    background: var(--color-bg-container);
    border-top: 1px solid var(--color-border);
    padding: var(--space-32) 0;
}

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

.footer-text {
    font-size: var(--font-size-13);
    color: var(--color-text-tertiary);
    line-height: var(--line-height-relaxed);
}

/* 工具类 */
.text-center {
    text-align: center;
}

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

.text-primary {
    color: var(--color-primary);
}

.text-success {
    color: var(--color-success);
}

.text-warning {
    color: var(--color-warning);
}

.text-error {
    color: var(--color-error);
}

.text-secondary {
    color: var(--color-text-secondary);
}

.text-tertiary {
    color: var(--color-text-tertiary);
}

.mt-0 { margin-top: 0; }
.mt-8 { margin-top: var(--space-8); }
.mt-16 { margin-top: var(--space-16); }
.mt-24 { margin-top: var(--space-24); }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: var(--space-8); }
.mb-16 { margin-bottom: var(--space-16); }
.mb-24 { margin-bottom: var(--space-24); }

.flex {
    display: flex;
}

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

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-8 {
    gap: var(--space-8);
}

.gap-16 {
    gap: var(--space-16);
}

.hidden {
    display: none !important;
}

/* 页面切换 */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* ==================== 动画系统 ==================== */

/* 页面进入动画 */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

/* 基础动画类 */
.animate-fadeIn {
    animation: fadeIn 0.3s ease forwards;
}

.animate-fadeInUp {
    animation: fadeInUp 0.4s ease forwards;
}

.animate-fadeInDown {
    animation: fadeInDown 0.4s ease forwards;
}

.animate-fadeInLeft {
    animation: fadeInLeft 0.4s ease forwards;
}

.animate-fadeInRight {
    animation: fadeInRight 0.4s ease forwards;
}

.animate-scaleIn {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.animate-bounceIn {
    animation: bounceIn 0.5s ease forwards;
}

.animate-pulse {
    animation: pulse 2s infinite;
}

.animate-shake {
    animation: shake 0.5s ease;
}

/* 延迟动画 */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }

/* 页面容器动画 */
.page-container {
    animation: fadeInUp 0.4s ease;
}

/* 头部导航动画 */
.header {
    animation: slideInDown 0.3s ease;
}

/* 卡片动画 */
.content-card,
.stat-card,
.feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.content-card:hover,
.stat-card:hover,
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* 按钮动画增强 */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 34, 82, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* 表单输入动画 */
.form-input,
.form-select,
.form-textarea {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 0 0 3px var(--color-primary-bg);
}

/* 移动端菜单动画 */
.mobile-menu {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu.active {
    animation: slideInRight 0.3s ease;
}

.mobile-nav-item {
    opacity: 0;
    animation: fadeInRight 0.3s ease forwards;
}

.mobile-nav-item:nth-child(1) { animation-delay: 50ms; }
.mobile-nav-item:nth-child(2) { animation-delay: 100ms; }
.mobile-nav-item:nth-child(3) { animation-delay: 150ms; }
.mobile-nav-item:nth-child(4) { animation-delay: 200ms; }
.mobile-nav-item:nth-child(5) { animation-delay: 250ms; }
.mobile-nav-item:nth-child(6) { animation-delay: 300ms; }

/* 模态框动画增强 */
.modal-mask {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-mask.active {
    animation: fadeIn 0.2s ease;
}

.modal {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-mask.active .modal {
    animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 消息提示动画增强 */
.message {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.message.show {
    animation: bounceIn 0.4s ease;
}

/* 进度条动画 */
.progress-bar {
    animation: fadeIn 0.5s ease;
}

.progress-bar-fill {
    animation: slideInRight 0.8s ease;
}

/* 步骤条动画 */
.step {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.step:nth-child(1) { animation-delay: 100ms; }
.step:nth-child(2) { animation-delay: 200ms; }
.step:nth-child(3) { animation-delay: 300ms; }

.step-icon {
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step.active .step-icon,
.step.completed .step-icon {
    animation: bounceIn 0.4s ease;
}

/* 表格行动画 */
.table tbody tr {
    opacity: 0;
    animation: fadeInUp 0.3s ease forwards;
}

.table tbody tr:nth-child(1) { animation-delay: 50ms; }
.table tbody tr:nth-child(2) { animation-delay: 100ms; }
.table tbody tr:nth-child(3) { animation-delay: 150ms; }
.table tbody tr:nth-child(4) { animation-delay: 200ms; }
.table tbody tr:nth-child(5) { animation-delay: 250ms; }

.table tbody tr {
    transition: background 0.2s ease;
}

.table tbody tr:hover {
    transform: scale(1.01);
}

/* 列表项动画 */
.list-item {
    opacity: 0;
    animation: fadeInUp 0.3s ease forwards;
    transition: all 0.2s ease;
}

.list-item:nth-child(1) { animation-delay: 50ms; }
.list-item:nth-child(2) { animation-delay: 100ms; }
.list-item:nth-child(3) { animation-delay: 150ms; }
.list-item:nth-child(4) { animation-delay: 200ms; }

.list-item:hover {
    transform: translateX(4px);
}

/* 标签动画 */
.tag {
    transition: all 0.2s ease;
}

.tag:hover {
    transform: scale(1.05);
}

/* 征稿项目卡片动画 */
.call-for-paper {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.call-for-paper:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.call-for-paper.selected {
    animation: scaleIn 0.3s ease;
}

/* 活动卡片动画 */
.activity-item {
    opacity: 0;
    animation: fadeInUp 0.4s ease forwards;
}

.activity-item:nth-child(1) { animation-delay: 100ms; }
.activity-item:nth-child(2) { animation-delay: 200ms; }
.activity-item:nth-child(3) { animation-delay: 300ms; }

/* 稿件卡片动画 */
.submission-item {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.submission-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* 查询结果动画 */
.result-card {
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* 信息项动画 */
.info-item {
    opacity: 0;
    animation: fadeInLeft 0.3s ease forwards;
    transition: all 0.2s ease;
}

.info-item:nth-child(1) { animation-delay: 50ms; }
.info-item:nth-child(2) { animation-delay: 100ms; }
.info-item:nth-child(3) { animation-delay: 150ms; }
.info-item:nth-child(4) { animation-delay: 200ms; }
.info-item:nth-child(5) { animation-delay: 250ms; }

.info-item:hover {
    background: var(--color-bg-hover);
}

/* 部门卡片动画 */
.dept-card {
    opacity: 0;
    animation: fadeInUp 0.3s ease forwards;
    transition: all 0.2s ease;
}

.dept-card:nth-child(1) { animation-delay: 100ms; }
.dept-card:nth-child(2) { animation-delay: 200ms; }
.dept-card:nth-child(3) { animation-delay: 300ms; }

.dept-card:hover {
    transform: translateX(4px);
}

/* QQ区域动画 */
.qq-section {
    animation: fadeInUp 0.5s ease;
}

.qq-number {
    transition: all 0.3s ease;
}

.qq-number:hover {
    transform: scale(1.05);
    color: var(--color-primary-hover);
}

/* 统计数字动画 */
.stat-value {
    animation: bounceIn 0.6s ease;
}

/* 筛选标签动画 */
.filter-tab {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-tab.active {
    animation: scaleIn 0.2s ease;
}

/* 认证页面动画 */
.auth-card {
    animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-tab {
    transition: all 0.2s ease;
}

.auth-tab.active {
    animation: scaleIn 0.2s ease;
}

/* 管理后台侧边栏动画 */
.sidebar-nav-item a {
    transition: all 0.2s ease;
}

.sidebar-nav-item a:hover {
    transform: translateX(4px);
}

.sidebar-nav-item a.active {
    animation: slideInRight 0.2s ease;
}

/* 文件上传区域动画 */
.file-upload {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.file-upload:hover {
    transform: scale(1.02);
    border-color: var(--color-primary);
}

.file-upload:hover .file-upload-icon {
    transform: translateY(-4px);
    color: var(--color-primary);
}

.file-upload-icon {
    transition: all 0.3s ease;
}

/* 导航链接动画 */
.nav-item a {
    position: relative;
    transition: all 0.2s ease;
}

.nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item a:hover::after,
.nav-item a.active::after {
    width: 60%;
}

/* Logo动画 */
.logo {
    transition: all 0.2s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon {
    transition: all 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(-5deg);
}

/* 公告栏动画 */
.announcement {
    animation: fadeInDown 0.4s ease;
}

/* 页脚动画 */
.footer {
    animation: fadeIn 0.5s ease;
}

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

/* 滚动条动画 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-page);
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-tertiary);
}

/* 页面过渡效果 */
.page-transition-enter {
    animation: fadeInUp 0.3s ease;
}

.page-transition-leave {
    animation: fadeOutDown 0.3s ease forwards;
}

@keyframes fadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

/* 涟漪效果 */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

/* 加载动画 */
.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border-light);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* 骨架屏动画 */
.skeleton {
    background: linear-gradient(90deg, var(--color-bg-hover) 25%, var(--color-bg-page) 50%, var(--color-bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 数字滚动动画 */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.count-up {
    animation: countUp 0.5s ease forwards;
}
