/* ============================================
   AI政务招商引才智库大脑平台 — 主样式表 v3.0
   深空科技蓝 · 政务标杆级设计 · 酷炫动效版
   ============================================ */

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

:root {
    --bg-primary: #080E1A;
    --bg-secondary: #0D1B2A;
    --bg-card: rgba(255,255,255,0.03);
    --border-light: rgba(255,255,255,0.06);
    --border-medium: rgba(255,255,255,0.1);
    --text-primary: #E8F0FF;
    --text-secondary: #B0C4DE;
    --text-muted: #8899BB;
    --text-dim: #667799;
    --accent-cyan: #00B4D8;
    --accent-blue: #0077B6;
    --accent-gold: #FAAD14;
    --accent-green: #52C41A;
    --accent-red: #FF4D4F;
    --accent-purple: #722ED1;
    --accent-purple-light: #B37FEB;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #020B1A 0%, #061530 25%, #0A1E40 50%, #061530 75%, #020B1A 100%);
    background-attachment: fixed;
    color: var(--text-secondary);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* 动态光晕叠加层 */
body::after {
    content: '';
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -1;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(0,180,216,0.06) 0%, transparent 60%),
        radial-gradient(ellipse at 70% 60%, rgba(0,119,182,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 90%, rgba(114,46,209,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 10% 80%, rgba(0,180,216,0.03) 0%, transparent 40%);
    animation: bgPulse 8s ease-in-out infinite alternate;
}
@keyframes bgPulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ========== Canvas粒子星空背景 ========== */
#particlesCanvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0; pointer-events: none;
}

/* ========== 整体光晕背景 ========== */
body::before {
    content: '';
    position: fixed; top: -50%; left: -50%; width: 200%; height: 200%;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0,180,216,0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(114,46,209,0.03) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 80%, rgba(0,119,182,0.03) 0%, transparent 50%);
    z-index: -1; pointer-events: none;
    animation: bgGlow 20s ease-in-out infinite;
}
@keyframes bgGlow {
    0%, 100% { transform: translate(0,0); }
    33% { transform: translate(2%, -1%); }
    66% { transform: translate(-1%, 2%); }
}

a { color: var(--accent-cyan); text-decoration: none; transition: var(--transition); }
a:hover { text-decoration: none; color: #4DD4F0; text-shadow: 0 0 12px rgba(0,180,216,0.5); }

/* ========== 应用容器 ========== */
.app-wrapper {
    display: flex; flex-direction: column; min-height: 100vh;
    position: relative; z-index: 1;
}

/* ========== 顶部导航栏 ========== */
.top-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 24px; height: 56px;
    background: rgba(13,27,42,0.9);
    border-bottom: 1px solid rgba(0,180,216,0.12);
    position: sticky; top: 0; z-index: 1000;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0,0,0,0.3);
}
.header-left { display: flex; align-items: center; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-primary); }
.logo:hover { text-decoration: none; }
.logo-icon { font-size: 26px; animation: logoFloat 3s ease-in-out infinite; }
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
.logo-text {
    font-size: 17px; font-weight: 700; letter-spacing: 1px;
    background: linear-gradient(135deg, #E8F0FF, #00B4D8);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-center { flex: 1; text-align: center; }
.data-status { font-size: 12px; color: var(--text-dim); display: flex; align-items: center; justify-content: center; gap: 8px; }
.status-dot { width: 7px; height: 7px; background: var(--accent-green); border-radius: 50%; display: inline-block; }
.status-dot.pulse {
    animation: statusPulse 2s infinite;
    box-shadow: 0 0 0 0 rgba(82,196,26,0.6);
}
@keyframes statusPulse {
    0% { box-shadow: 0 0 0 0 rgba(82,196,26,0.6); }
    70% { box-shadow: 0 0 0 8px rgba(82,196,26,0); }
    100% { box-shadow: 0 0 0 0 rgba(82,196,26,0); }
}
.city-badge {
    display: inline-block; padding: 3px 12px;
    background: linear-gradient(135deg, rgba(0,180,216,0.15), rgba(114,46,209,0.1));
    border: 1px solid rgba(0,180,216,0.2);
    border-radius: 12px; color: var(--accent-cyan); font-size: 11px;
    animation: badgeGlow 3s ease-in-out infinite;
}
@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(0,180,216,0.15); }
    50% { box-shadow: 0 0 16px rgba(0,180,216,0.3); }
}

.header-right { display: flex; align-items: center; }
.user-panel { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: var(--transition); }
.user-panel:hover { background: rgba(255,255,255,0.04); }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 600; font-size: 14px;
    box-shadow: 0 0 12px rgba(0,180,216,0.3);
}
.user-name { color: var(--text-secondary); font-size: 13px; }
.user-dropdown {
    display: none; position: absolute; top: 100%; right: 0;
    background: rgba(13,27,42,0.98); border: 1px solid rgba(0,180,216,0.15);
    border-radius: var(--radius-sm); min-width: 140px; padding: 4px 0;
    box-shadow: 0 12px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0,180,216,0.05);
    backdrop-filter: blur(20px); animation: dropdownIn 0.2s ease;
}
@keyframes dropdownIn {
    from { opacity:0; transform: translateY(-8px); }
    to { opacity:1; transform: translateY(0); }
}
.user-panel:hover .user-dropdown { display: block; }
.user-dropdown a {
    display: block; padding: 8px 16px; font-size: 13px; color: var(--text-secondary);
    text-decoration: none; white-space: nowrap; transition: var(--transition);
}
.user-dropdown a:hover { background: rgba(0,180,216,0.1); color: #fff; }

/* ========== 主导航 ========== */
.main-nav {
    background: rgba(13,27,42,0.85);
    border-bottom: 1px solid rgba(0,180,216,0.08);
    backdrop-filter: blur(20px);
    position: relative; z-index: 999;
}
.main-nav::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,180,216,0.4), transparent);
}
.nav-container { display: flex; max-width: 1400px; margin: 0 auto; padding: 0 20px; overflow: visible; flex-wrap: wrap; }
.nav-container::-webkit-scrollbar { height: 0; }
.nav-item {
    padding: 14px 20px; font-size: 14px; color: var(--text-muted);
    text-decoration: none; white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: var(--transition); display: flex; align-items: center; gap: 6px;
    position: relative;
}
.nav-item::after {
    content: ''; position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%);
    width: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
    transition: width 0.3s ease;
}
.nav-item:hover { color: var(--accent-cyan); text-decoration: none; background: rgba(0,180,216,0.03); }
.nav-item:hover::after { width: 80%; }
.nav-item.active { color: var(--accent-cyan); border-bottom-color: var(--accent-cyan); }
.nav-item.active::after { width: 80%; }
.nav-icon { font-size: 16px; transition: transform 0.3s ease; }
.nav-item:hover .nav-icon { transform: scale(1.2); }
/* 下拉子菜单 */
.nav-group { position: relative; }
.nav-arrow { font-size: 10px; margin-left: 2px; opacity: 0.7; }
.nav-submenu {
    display: none; position: absolute; top: 100%; left: 0; min-width: 220px;
    background: rgba(13,27,42,0.98); border: 1px solid rgba(0,180,216,0.2);
    border-top: 2px solid var(--accent-cyan); border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.5); overflow: hidden; z-index: 1000;
    animation: dropdownIn 0.2s ease;
}
.nav-group:hover .nav-submenu { display: block; }
.nav-sub-item {
    display: flex; align-items: center; gap: 8px; padding: 11px 18px;
    font-size: 13px; color: var(--text-muted); text-decoration: none;
    white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: all 0.2s;
}
.nav-sub-item:last-child { border-bottom: none; }
.nav-sub-item:hover { background: rgba(0,180,216,0.1); color: #fff; padding-left: 22px; }
.nav-sub-item.active { color: var(--accent-cyan); background: rgba(0,180,216,0.08); }
.nav-highlight {
    background: linear-gradient(135deg, rgba(0,180,216,0.12), rgba(114,46,209,0.08));
    border: 1px solid rgba(0,180,216,0.2);
    margin: 7px 8px; padding: 7px 16px; border-radius: 20px;
    animation: highlightPulse 4s ease-in-out infinite;
}
@keyframes highlightPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(0,180,216,0.1); }
    50% { box-shadow: 0 0 20px rgba(0,180,216,0.25); }
}

/* ========== 主内容区 ========== */
.main-content {
    flex: 1; max-width: 1400px; width: 100%;
    margin: 0 auto; padding: 20px 24px 40px;
    position: relative; z-index: 1;
}

/* ========== 卡片入场动画 ========== */
.stat-card, .panel, .report-card, .report-list-item, .admin-stat, .admin-menu-item, .summary-card {
    animation: fadeInUp 0.6s ease backwards;
}
.stat-card:nth-child(1), .panel:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2), .panel:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3), .panel:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4), .panel:nth-child(4) { animation-delay: 0.2s; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block; padding: 8px 18px; border-radius: var(--radius-sm);
    font-size: 14px; cursor: pointer; border: none; text-decoration: none;
    font-weight: 500; transition: var(--transition);
    position: relative; overflow: hidden;
}
.btn:hover { text-decoration: none; }
.btn::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 0; height: 0; border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%); transition: width 0.6s, height 0.6s;
}
.btn:active::after { width: 300px; height: 300px; }
.btn-primary {
    background: linear-gradient(135deg, #0077B6, #00B4D8);
    color: #fff; box-shadow: 0 4px 15px rgba(0,180,216,0.2);
}
.btn-primary:hover {
    box-shadow: 0 6px 25px rgba(0,180,216,0.4);
    transform: translateY(-2px);
}
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 4px; }
.btn-danger { background: var(--accent-red); color: #fff; }
.btn-success { background: var(--accent-green); color: #fff; }

/* ========== 统计卡片 ========== */
.stat-card {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; padding: 20px 24px;
    position: relative; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 30px rgba(0,180,216,0.08);
    border-color: rgba(0,180,216,0.25);
}
/* 扫描线 */
.stat-card::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(0,180,216,0.03) 50%, transparent 60%);
    animation: cardScan 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes cardScan {
    0% { transform: translateX(-100%) translateY(-100%); }
    100% { transform: translateX(100%) translateY(100%); }
}
.stat-card.accent-blue { border-left: 3px solid #00B4D8; }
.stat-card.accent-green { border-left: 3px solid #52C41A; }
.stat-card.accent-orange { border-left: 3px solid #FAAD14; }
.stat-card.accent-purple { border-left: 3px solid #722ED1; }

/* ========== 面板 ========== */
.panel {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px; overflow: hidden;
    transition: var(--transition);
    position: relative;
}
.panel:hover {
    border-color: rgba(0,180,216,0.15);
    box-shadow: 0 8px 30px rgba(0,0,0,0.2), 0 0 20px rgba(0,180,216,0.04);
}
.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex; justify-content: space-between; align-items: center;
    background: rgba(255,255,255,0.01);
}

/* ========== Flash消息 ========== */
.flash-message {
    padding: 12px 20px; margin-bottom: 16px; border-radius: var(--radius-sm);
    font-size: 14px; animation: slideDown 0.4s ease;
    backdrop-filter: blur(10px);
}
@keyframes slideDown { from { transform:translateY(-10px); opacity:0; } to { transform:translateY(0); opacity:1; } }
.flash-success { background: rgba(82,196,26,0.1); border: 1px solid rgba(82,196,26,0.3); color: var(--accent-green); }
.flash-error { background: rgba(255,77,79,0.1); border: 1px solid rgba(255,77,79,0.3); color: var(--accent-red); }
.flash-warning { background: rgba(250,173,20,0.1); border: 1px solid rgba(250,173,20,0.3); color: var(--accent-gold); }
.flash-info { background: rgba(24,144,255,0.1); border: 1px solid rgba(24,144,255,0.3); color: #1890FF; }

/* ========== 分页 ========== */
.pagination { padding: 16px 0; }
.pagination ul { display: flex; list-style: none; gap: 4px; justify-content: center; flex-wrap: wrap; }
.pagination li { display: inline; }
.pagination a, .pagination span {
    display: inline-block; padding: 6px 12px; border-radius: 4px;
    background: var(--bg-card); border: 1px solid var(--border-light);
    color: var(--text-muted); font-size: 13px; text-decoration: none;
    transition: var(--transition);
}
.pagination a:hover {
    border-color: var(--accent-cyan); color: var(--accent-cyan);
    box-shadow: 0 0 12px rgba(0,180,216,0.15);
}
.pagination .active a {
    background: linear-gradient(135deg, rgba(0,180,216,0.2), rgba(0,119,182,0.15));
    border-color: var(--accent-cyan); color: var(--accent-cyan); font-weight: 600;
}
.pagination span { color: var(--text-dim); cursor: default; }

/* ========== AI方案样式 ========== */
.ai-plan {
    background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius-md); padding: 24px;
    position: relative; overflow: hidden;
}
.ai-plan::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0,180,216,0.5), transparent);
    animation: planLine 4s ease-in-out infinite;
}
@keyframes planLine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}
.ai-plan h3 { font-size: 18px; color: var(--text-primary); margin-bottom: 16px; text-align: center; }
.ai-plan .plan-section {
    background: rgba(255,255,255,0.02); border: 1px solid var(--border-light);
    border-radius: var(--radius-sm); padding: 16px; margin-bottom: 14px;
    transition: var(--transition);
}
.ai-plan .plan-section:hover { border-color: rgba(0,180,216,0.2); }
.ai-plan .plan-section h4 { font-size: 14px; color: var(--accent-cyan); margin-bottom: 8px; }
.ai-plan .plan-section p { font-size: 14px; color: var(--text-muted); line-height: 1.7; }
.ai-plan .plan-section ul, .ai-plan .plan-section ol { margin-left: 20px; color: var(--text-muted); font-size: 14px; line-height: 1.8; }
.ai-plan .plan-footer { text-align: center; color: var(--text-dim); font-size: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border-light); }

/* ========== 页脚 ========== */
.main-footer {
    background: rgba(13,27,42,0.9);
    border-top: 1px solid rgba(0,180,216,0.08);
    padding: 12px 24px; font-size: 12px; color: var(--text-dim);
    backdrop-filter: blur(10px);
}
.footer-container { display: flex; justify-content: space-between; max-width: 1400px; margin: 0 auto; }
.footer-container .sep { margin: 0 10px; color: rgba(255,255,255,0.06); }

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(0,180,216,0.2), rgba(0,119,182,0.15));
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, rgba(0,180,216,0.4), rgba(0,119,182,0.3)); }

/* ========== 表格光晕 ========== */
.enterprise-table tr, .talent-table tr, .data-table tr, .peer-table tr {
    transition: all 0.2s ease;
}
.enterprise-table tr:hover td, .talent-table tr:hover td, .data-table tr:hover td, .peer-table tr:hover td {
    background: rgba(0,180,216,0.03) !important;
    box-shadow: inset 0 0 20px rgba(0,180,216,0.03);
}

/* ========== 数字跳动 ========== */
@keyframes numberPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.number-animate { animation: numberPop 0.5s ease; }

/* ========== 流光边框（hover触发） ========== */
.glow-border {
    position: relative; overflow: hidden;
}
.glow-border::after {
    content: ''; position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(135deg, transparent 30%, rgba(0,180,216,0.2) 50%, transparent 70%);
    opacity: 0; transition: opacity 0.4s ease;
    pointer-events: none;
}
.glow-border:hover::after { opacity: 1; }

/* ========== 通用工具类 ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.mr-8 { margin-right: 8px; }

/* ========== 加载骨架屏 ========== */
.skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.03) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}
@keyframes skeletonShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== 3D卡片倾斜 ========== */
.tilt-card {
    transition: transform 0.2s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
}

/* ========== 打印样式 ========== */
@media print {
    .top-header, .main-nav, .main-footer, .btn, #particlesCanvas, body::before { display: none !important; }
    body { background: #fff; color: #000; }
    .main-content { padding: 0; }
    .ai-plan { border: 1px solid #ddd; }
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .top-header { padding: 0 12px; }
    .header-center { display: none; }
    .logo-text { font-size: 14px; }
    .main-content { padding: 16px 12px; }
    .nav-item { padding: 10px 12px; font-size: 12px; }
    .footer-container { flex-direction: column; text-align: center; gap: 4px; }
}
