
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    background-color: #0a1931;
    color: #ffffff;
}

/* 全屏图谱容器 */
#network-graph-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: linear-gradient(135deg, #0a1931 0%, #1a2c4f 100%);
}

#network-graph {
    width: 100%;
    height: 100%;
}

/* 顶部导航栏 - 浮动面板 */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    padding: 12px 25px;
    z-index: 100;
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    min-width: 300px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #1a6bc4, #4dabff);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(90deg, #1a6bc4, #4dabff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-search {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
}

.search-container {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 15px 10px 45px;
    background-color: rgba(245, 247, 250, 0.9);
    border: 1px solid rgba(230, 233, 237, 0.5);
    border-radius: 25px;
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: #4dabff;
    box-shadow: 0 0 0 3px rgba(77, 171, 255, 0.2);
    background-color: rgba(255, 255, 255, 0.95);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #7a8aa0;
    font-size: 16px;
}

.nav-controls {
    display: flex;
    gap: 8px;
}

.nav-btn {
    padding: 8px 15px;
    background-color: rgba(245, 247, 250, 0.9);
    border: 1px solid rgba(230, 233, 237, 0.5);
    border-radius: 6px;
    color: #4d7cae;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
    backdrop-filter: blur(5px);
}

.nav-btn:hover {
    background-color: rgba(232, 241, 255, 0.95);
    border-color: #4dabff;
    color: #1a6bc4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 171, 255, 0.2);
}

.nav-btn.primary {
    background-color: #4dabff;
    border-color: #4dabff;
    color: white;
}

.nav-btn.primary:hover {
    background-color: #3a9bff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 171, 255, 0.4);
}

/* 合并的统计与筛选面板 - 左上角 */
.stats-filter-panel {
    position: fixed;
    top: 90px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 90;
    backdrop-filter: blur(10px);
    max-width: 500px;
    min-width: 350px;
}

.stats-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.panel-title {
    font-size: 16px;
    font-weight: 600;
    color: #1a293e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title i {
    color: #4dabff;
}

.stats-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-item {
    flex: 1;
    min-width: 120px;
    background: rgba(245, 247, 250, 0.9);
    border-radius: 10px;
    padding: 15px;
    border: 1px solid rgba(230, 233, 237, 0.5);
    transition: all 0.3s;
    cursor: pointer;
}

.stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background: rgba(232, 241, 255, 0.95);
    border-color: #4dabff;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: #1a293e;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 12px;
    color: #7a8aa0;
    font-weight: 500;
}

.filter-section {
    padding-top: 15px;
    border-top: 1px solid rgba(230, 233, 237, 0.5);
}

.filter-title {
    font-size: 14px;
    color: #7a8aa0;
    margin-bottom: 12px;
    font-weight: 500;
}

.filter-options {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-option {
    padding: 8px 15px;
    background-color: rgba(245, 247, 250, 0.9);
    border: 1px solid rgba(230, 233, 237, 0.5);
    border-radius: 20px;
    color: #4d7cae;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-option:hover {
    background-color: rgba(232, 241, 255, 0.95);
    border-color: #4dabff;
    color: #1a6bc4;
    transform: translateY(-2px);
}

.filter-option.active {
    background-color: #4dabff;
    border-color: #4dabff;
    color: white;
    box-shadow: 0 5px 15px rgba(77, 171, 255, 0.3);
}

/* 左下角控制面板 - 合并图例和图表控制 */
.control-legend-panel {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 90;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 500px;
}

.control-section {
    display: flex;
    align-items: center;
    gap: 10px;
}

.control-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a293e;
    white-space: nowrap;
}

.graph-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.graph-btn {
    padding: 8px 12px;
    background-color: rgba(245, 247, 250, 0.9);
    border: 1px solid rgba(230, 233, 237, 0.5);
    border-radius: 6px;
    color: #4d7cae;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.graph-btn:hover {
    background-color: rgba(232, 241, 255, 0.95);
    border-color: #4dabff;
    color: #1a6bc4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 171, 255, 0.2);
}

.graph-btn.fullscreen {
    background-color: rgba(77, 171, 255, 0.1);
    border-color: rgba(77, 171, 255, 0.3);
    color: #1a6bc4;
}

.legend-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-color {
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.legend-color.current {
    background-color: #4dabff;
}

.legend-color.upstream {
    background-color: #00c9a7;
}

.legend-color.downstream {
    background-color: #ff6b9d;
}

.legend-label {
    font-size: 12px;
    color: #4d7cae;
}

/* 详情面板 - 右侧浮动 */
.detail-panel {
    position: fixed;
    top: 90px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 20px;
    z-index: 90;
    width: 350px;
    max-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.detail-header {
    margin-bottom: 20px;
}

.product-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a293e;
    margin-bottom: 8px;
}

.product-desc {
    font-size: 13px;
    color: #7a8aa0;
    line-height: 1.5;
}

.detail-content {
    flex: 1;
    overflow-y: auto;
    padding-right: 8px;
}

.section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a293e;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title i {
    color: #4dabff;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.tag {
    padding: 6px 12px;
    background-color: rgba(245, 247, 250, 0.9);
    border: 1px solid rgba(230, 233, 237, 0.5);
    border-radius: 6px;
    font-size: 12px;
    color: #4d7cae;
    cursor: pointer;
    transition: all 0.3s;
}

.tag:hover {
    background-color: rgba(232, 241, 255, 0.95);
    border-color: #4dabff;
    color: #1a6bc4;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(77, 171, 255, 0.2);
}

.tag.active {
    background-color: #4dabff;
    border-color: #4dabff;
    color: white;
    box-shadow: 0 5px 15px rgba(77, 171, 255, 0.3);
}

.enterprise-list {
    background-color: rgba(249, 251, 254, 0.8);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(230, 233, 237, 0.5);
    max-height: 150px;
    overflow-y: auto;
}

.enterprise-item {
    padding: 10px;
    background-color: white;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid rgba(230, 233, 237, 0.5);
    transition: all 0.3s;
}

.enterprise-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    border-color: #4dabff;
}

.enterprise-name a {
    font-weight: 600;
    color: #1a293e;
    margin-bottom: 3px;
    font-size: 13px;
}

.enterprise-desc {
    color: #7a8aa0;
    font-size: 11px;
    line-height: 1.4;
}

.loading-enterprise {
    text-align: center;
    padding: 15px;
    color: #7a8aa0;
    font-style: italic;
    font-size: 12px;
}

.no-data {
    text-align: center;
    padding: 15px;
    color: #7a8aa0;
    font-size: 12px;
}

/* 节点工具提示 */
.node-tooltip {
    position: absolute;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(230, 233, 237, 0.8);
    font-size: 13px;
    color: #333;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    max-width: 250px;
    backdrop-filter: blur(10px);
}

.node-tooltip-title {
    font-weight: 700;
    color: #1a6bc4;
    margin-bottom: 6px;
    font-size: 14px;
}

.node-tooltip-desc {
    color: #7a8aa0;
    line-height: 1.4;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .stats-filter-panel {
        min-width: 300px;
        max-width: 400px;
    }
    
    .detail-panel {
        width: 320px;
    }
    
    .control-legend-panel {
        max-width: 400px;
    }
}

@media (max-width: 1024px) {
    .header-nav {
        flex-wrap: wrap;
        padding: 10px;
    }
    
    .nav-search {
        order: 3;
        margin: 10px 0 0;
        max-width: 100%;
    }
    
    .detail-panel {
        position: relative;
        top: auto;
        right: auto;
        width: 100%;
        max-height: 350px;
        margin: 20px;
        bottom: 20px;
    }
    
    .control-legend-panel {
        bottom: 380px;
        left: 20px;
        right: 20px;
        max-width: none;
    }
    
    .stats-filter-panel {
        left: 20px;
        right: 20px;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .header-nav {
        left: 10px;
        right: 10px;
        top: 10px;
        transform: none;
        max-width: none;
    }
    
    .stats-filter-panel {
        top: 80px;
        left: 10px;
        right: 10px;
    }
    
    .detail-panel {
        margin: 10px;
        bottom: 10px;
        max-height: 300px;
    }
    
    .control-legend-panel {
        left: 10px;
        right: 10px;
        bottom: 320px;
    }
    
    .stat-item {
        min-width: calc(50% - 8px);
    }
    
    .control-section {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .graph-controls {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .nav-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .nav-btn {
        flex: 1;
        justify-content: center;
    }
    
    .stat-item {
        min-width: 100%;
    }
}

/* 动画效果 */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.9;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.9;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* 全屏模式 */
body.fullscreen-mode .header-nav,
body.fullscreen-mode .stats-filter-panel,
body.fullscreen-mode .detail-panel,
body.fullscreen-mode .control-legend-panel {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

body.fullscreen-mode .header-nav:hover,
body.fullscreen-mode .stats-filter-panel:hover,
body.fullscreen-mode .detail-panel:hover,
body.fullscreen-mode .control-legend-panel:hover {
    opacity: 1;
    visibility: visible;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: rgba(245, 247, 250, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(77, 171, 255, 0.5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 171, 255, 0.8);
}
