/* ===== 设计令牌 ===== */
:root {
    --primary: #1E5BB8;
    --primary-dark: #0D3A8A;
    --primary-light: #4A9FE0;
    --accent: #14B8A6;
    --accent-light: #2DD4BF;
    --bg: #eef2f7;
    --card-bg: #ffffff;
    --text: #2c3e50;
    --text-muted: #7f8c9b;
    --border: #e4e9f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12), 0 4px 8px rgba(0,0,0,0.06);
    --radius: 14px;
    --radius-sm: 10px;
}

* { box-sizing: border-box; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container-fluid { flex: 1; }

/* ===== 导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%) !important;
    box-shadow: 0 2px 12px rgba(13,58,138,0.35);
    padding: 0.6rem 1rem;
}
.navbar-brand { font-weight: 700; letter-spacing: 0.5px; font-size: 1.1rem; }
.navbar-brand img { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.nav-link {
    border-radius: 8px;
    padding: 0.4rem 0.8rem !important;
    margin: 0 2px;
    transition: all 0.2s ease;
}
.nav-link:hover { background: rgba(255,255,255,0.12); }
.dropdown-menu {
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.4rem;
}
.dropdown-item { border-radius: 8px; padding: 0.5rem 0.8rem; }
.dropdown-item:hover { background: #f0f4fa; }

/* ===== 登录页动态背景 ===== */
.login-body {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(-45deg, #0A2E6E, #0D3A8A, #1E5BB8, #14B8A6, #0D3A8A);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* 浮动气泡 */
.login-body::before,
.login-body::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    pointer-events: none;
}
.login-body::before {
    width: 400px; height: 400px;
    top: -120px; left: -100px;
    animation: float1 12s ease-in-out infinite;
}
.login-body::after {
    width: 300px; height: 300px;
    bottom: -80px; right: -60px;
    animation: float2 15s ease-in-out infinite;
}
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-50px, -30px) scale(1.15); }
}
/* 额外浮动小圆点 */
.login-bubbles {
    position: absolute;
    width: 100%; height: 100%;
    top: 0; left: 0;
    pointer-events: none;
    overflow: hidden;
}
.login-bubbles span {
    position: absolute;
    bottom: -50px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    animation: bubbleRise linear infinite;
}
@keyframes bubbleRise {
    0% { transform: translateY(0) scale(1); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-110vh) scale(0.5); opacity: 0; }
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 10;
}
.login-card {
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 24px 32px 36px;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.1);
    animation: cardIn 0.6s ease-out;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card img {
    box-shadow: 0 8px 24px rgba(30,91,184,0.25);
}

/* ===== 卡片微立体 ===== */
.card {
    border: none;
    border-radius: var(--radius);
    background: var(--card-bg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.card:hover { box-shadow: var(--shadow-md); }
.card-elevated {
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
}
.card-elevated:hover { box-shadow: var(--shadow-lg); }
.card-header {
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    background: linear-gradient(180deg, #fafbfd, #f5f7fa);
    border-radius: var(--radius) var(--radius) 0 0 !important;
    padding: 0.85rem 1.2rem;
}

/* ===== 统计卡片 ===== */
.stat-card {
    border-radius: var(--radius);
    padding: 20px;
    color: #fff;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 100px; height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.stat-card .stat-num { font-size: 30px; font-weight: 700; line-height: 1.2; }
.stat-card .stat-label { font-size: 13px; opacity: 0.92; margin-top: 4px; }
.bg-c1 { background: linear-gradient(135deg, #1E5BB8, #4A9FE0); }
.bg-c2 { background: linear-gradient(135deg, #14B8A6, #2DD4BF); }
.bg-c3 { background: linear-gradient(135deg, #E08E5A, #F0A878); }
.bg-c4 { background: linear-gradient(135deg, #8B6FB0, #A88FD0); }

/* ===== 表格 ===== */
.table { --bs-table-bg: transparent; }
.table th {
    background: #f0f3f8;
    font-weight: 600;
    font-size: 13px;
    color: var(--text);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.table td { font-size: 13px; vertical-align: middle; }
.table-hover > tbody > tr:hover { background: #f5f8fc; }
.table-responsive { border-radius: 0 0 var(--radius) var(--radius); }

/* ===== 徽章 ===== */
.badge-level { font-size: 11px; padding: 0.35em 0.6em; }
.badge { font-weight: 500; }

/* ===== 按钮微立体 ===== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #0A2E6E); }
.btn-sm { border-radius: 6px; }

/* ===== 表单控件 ===== */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid var(--border);
    padding: 0.5rem 0.75rem;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(74,111,165,0.15);
    outline: none;
}
.form-label { font-weight: 500; color: var(--text); }
.input-group-text {
    background: #f5f7fa;
    border: 1px solid var(--border);
    border-radius: 8px 0 0 8px;
}

/* ===== 图表容器 ===== */
.chart-box { width: 100%; height: 300px; }

/* ===== 签到状态 ===== */
.ci-ok { color: #28a745; font-weight: 600; }
.ci-no { color: #dc3545; }

/* ===== 页脚 ===== */
footer {
    color: var(--text-muted);
    font-size: 12px;
    padding: 1rem;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
    margin-top: auto;
}

/* ===== 警报 ===== */
.alert { border-radius: var(--radius-sm); border: none; box-shadow: var(--shadow-sm); }

/* ===== 导航标签 ===== */
.nav-pills .nav-link {
    color: var(--text-muted);
    font-weight: 500;
    padding: 0.4rem 1rem;
}
.nav-pills .nav-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 2px 8px rgba(74,111,165,0.3);
}

/* ===== 响应式：平板 ===== */
@media (max-width: 992px) {
    .stat-card .stat-num { font-size: 24px; }
    .chart-box { height: 260px; }
}

/* ===== 响应式：手机 ===== */
@media (max-width: 576px) {
    .container-fluid { padding: 0.75rem; }
    .navbar { padding: 0.5rem 0.75rem; }
    .navbar-brand span { font-size: 0.95rem; }
    .login-card { padding: 28px 20px; border-radius: 16px; }
    .login-wrapper { padding: 12px; }
    .card-header { padding: 0.7rem 1rem; }
    .card-body { padding: 1rem; }
    .stat-card { padding: 14px; min-height: 80px; }
    .stat-card .stat-num { font-size: 22px; }
    .stat-card .stat-label { font-size: 12px; }
    .chart-box { height: 220px; }
    .table th, .table td { font-size: 12px; padding: 0.5rem; }
    h4 { font-size: 1.1rem; }
    .btn-group-sm .btn { padding: 0.2rem 0.4rem; }
    .d-flex.justify-content-between { flex-direction: column; align-items: flex-start !important; gap: 8px; }
}

/* ===== 文献分享卡片 ===== */
.paper-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.paper-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}
.paper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.paper-level {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    color: #fff;
    letter-spacing: 0.5px;
}
.level-ssci { background: linear-gradient(135deg, #8B6FB0, #A88FD0); }
.level-sci { background: linear-gradient(135deg, #1E5BB8, #4A9FE0); }
.level-c { background: linear-gradient(135deg, #14B8A6, #2DD4BF); }
.level-other { background: linear-gradient(135deg, #999, #bbb); }
.paper-year { font-size: 12px; color: var(--text-muted); }
.paper-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    line-height: 1.5;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.paper-title:hover { color: var(--primary); }
.paper-meta {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.8;
}
.paper-meta i { margin-right: 5px; width: 14px; }
.paper-actions {
    margin-top: auto;
    padding-top: 14px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== 成员名录卡片 ===== */
.roster-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}
.roster-card:hover {
    background: #fff;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}
.roster-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 20px; font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.roster-info { min-width: 0; flex: 1; }
.roster-name { font-weight: 600; font-size: 15px; color: var(--text); margin-bottom: 2px; }
.roster-meta { font-size: 12px; color: var(--text-muted); line-height: 1.6; }
.roster-meta i { margin-right: 4px; }

/* ===== 滚动条美化 ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c5cdd8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8b3c2; }
