/* poet_network 页面样式 */

/* ======== 从 poet_network.html 抽取的内联样式（2026-07-18） ======== */
/* 原 <style> 块 1 */
:root {
            --tang-red: #8B0000;
            --tang-gold: #DAA520;
            --tang-ink: #2F2F2F;
            --tang-paper: #F5F5DC;
            --tang-brown: #8B4513;
            --tang-green: #8B4513;
            --tang-blue: #4169E1;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'KaiTi', 'STKaiti', 'Microsoft YaHei', serif;
            background: linear-gradient(135deg, var(--tang-paper) 0%, #FDF5E6 50%, var(--tang-paper) 100%);
            min-height: 100vh;
            overflow: hidden;
        }

        header {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
            background: linear-gradient(180deg, rgba(139,69,19,0.98) 0%, rgba(139,69,19,0.9) 100%);
            padding: 12px 20px;
            border-bottom: 3px solid var(--tang-gold);
            box-shadow: 0 4px 20px rgba(139,69,19,0.3);
        }

        .header-content {
            max-width: 1400px;
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .header-title {
            font-size: 24px;
            color: var(--tang-gold);
            font-weight: bold;
            letter-spacing: 4px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .header-subtitle {
            font-size: 14px;
            color: rgba(255,255,255,0.8);
            margin-top: 2px;
            font-style: italic;
            letter-spacing: 2px;
        }

        .header-left {
            display: flex;
            flex-direction: column;
        }

        .header-right {
            display: flex;
            gap: 15px;
            align-items: center;
        }

        .back-link {
            color: var(--tang-gold);
            text-decoration: none;
            padding: 8px 16px;
            background: rgba(255,255,255,0.1);
            border-radius: 8px;
            border: 1px solid rgba(218,165,32,0.3);
            transition: all 0.3s;
            font-size: 14px;
            letter-spacing: 2px;
        }

        .back-link:hover {
            background: rgba(218,165,32,0.3);
            transform: translateY(-2px);
        }

        .legend-container {
            display: flex;
            gap: 20px;
            align-items: center;
            background: rgba(255,255,255,0.1);
            padding: 8px 15px;
            border-radius: 8px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 8px;
            color: rgba(255,255,255,0.9);
            font-size: 13px;
        }

        .legend-color {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            border: 2px solid rgba(255,255,255,0.5);
        }

        #network-container {
            width: 100vw;
            height: calc(100vh - 80px);
            margin-top: 80px;
            position: relative;
        }

        #network-svg {
            width: 100%;
            height: 100%;
        }

        .node {
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .node:hover {
            filter: brightness(1.2);
        }

        .node-circle {
            stroke-width: 3;
            transition: all 0.3s ease;
        }

        .node:hover .node-circle {
            stroke-width: 5;
            filter: drop-shadow(0 0 10px var(--tang-gold));
        }

        .node-text {
            font-family: 'KaiTi', 'STKaiti', serif;
            font-size: 14px;
            text-anchor: middle;
            dominant-baseline: central;
            pointer-events: none;
            text-shadow: 1px 1px 3px rgba(255,255,255,0.8), -1px -1px 3px rgba(255,255,255,0.8);
            fill: var(--tang-ink);
            font-weight: bold;
        }

        .node-subtitle {
            font-size: 11px;
            fill: #666;
            font-style: italic;
        }

        .link {
            stroke: rgba(139,69,19,0.3);
            stroke-width: 2;
            transition: all 0.3s ease;
        }

        .link:hover {
            stroke: var(--tang-gold);
            stroke-width: 4;
            filter: drop-shadow(0 0 5px var(--tang-gold));
        }

        .link-label {
            font-size: 11px;
            fill: #8B4513;
            text-anchor: middle;
            pointer-events: none;
            background: rgba(255,255,255,0.8);
            padding: 2px 6px;
            border-radius: 4px;
        }

        .tooltip {
            position: fixed;
            background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(245,245,220,0.98) 100%);
            border: 2px solid var(--tang-brown);
            border-radius: 12px;
            padding: 15px 20px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.2);
            pointer-events: none;
            z-index: 1000;
            max-width: 350px;
            display: none;
            backdrop-filter: blur(10px);
        }

        .tooltip-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 2px solid var(--tang-gold);
        }

        .tooltip-name {
            font-size: 20px;
            font-weight: bold;
            color: var(--tang-ink);
            letter-spacing: 2px;
        }

        .tooltip-period {
            font-size: 12px;
            color: var(--tang-brown);
            background: rgba(139,69,19,0.1);
            padding: 2px 8px;
            border-radius: 4px;
            font-style: italic;
        }

        .tooltip-title {
            font-size: 14px;
            color: #666;
            margin-bottom: 8px;
            font-style: italic;
        }

        .tooltip-desc {
            font-size: 14px;
            color: #333;
            line-height: 1.8;
            margin-bottom: 10px;
            text-indent: 2em;
        }

        .tooltip-poem {
            background: linear-gradient(135deg, rgba(218,165,32,0.1) 0%, rgba(139,69,19,0.05) 100%);
            border-left: 4px solid var(--tang-gold);
            padding: 10px 15px;
            border-radius: 0 8px 8px 0;
            margin-top: 10px;
        }

        .tooltip-poem-title {
            font-size: 14px;
            font-weight: bold;
            color: var(--tang-brown);
            margin-bottom: 5px;
            text-align: center;
        }

        .tooltip-poem-text {
            font-size: 13px;
            color: #444;
            line-height: 2;
            font-style: italic;
        }

        .tooltip-relations {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px dashed rgba(139,69,19,0.3);
        }

        .tooltip-relations-title {
            font-size: 13px;
            font-weight: bold;
            color: var(--tang-brown);
            margin-bottom: 5px;
        }

        .tooltip-relation-list {
            display: flex;
            flex-wrap: wrap;
            gap: 5px;
        }

        .tooltip-relation-tag {
            background: rgba(107,142,35,0.1);
            color: var(--tang-green);
            padding: 3px 8px;
            border-radius: 15px;
            font-size: 12px;
            border: 1px solid rgba(107,142,35,0.3);
        }

        .controls {
            position: fixed;
            top: 100px;
            right: 20px;
            background: rgba(255,255,255,0.95);
            border: 2px solid var(--tang-brown);
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            z-index: 90;
            backdrop-filter: blur(10px);
        }

        .controls-title {
            font-size: 14px;
            font-weight: bold;
            color: var(--tang-brown);
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(139,69,19,0.2);
            text-align: center;
        }

        .control-group {
            margin-bottom: 12px;
        }

        .control-label {
            font-size: 12px;
            color: #666;
            margin-bottom: 5px;
            display: block;
        }

        .control-select {
            width: 100%;
            padding: 6px 10px;
            border: 1px solid var(--tang-brown);
            border-radius: 6px;
            background: white;
            font-family: 'KaiTi', 'STKaiti', serif;
            color: var(--tang-ink);
            font-size: 13px;
            cursor: pointer;
        }

        .control-btn {
            width: 100%;
            padding: 8px 15px;
            background: linear-gradient(135deg, var(--tang-brown), #A0522D);
            color: white;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            font-family: 'KaiTi', 'STKaiti', serif;
            font-size: 13px;
            letter-spacing: 2px;
            transition: all 0.3s;
            margin-bottom: 5px;
        }

        .control-btn:hover {
            background: linear-gradient(135deg, #A0522D, var(--tang-brown));
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(139,69,19,0.3);
        }

        .search-box {
            position: fixed;
            top: 100px;
            left: 20px;
            z-index: 90;
        }

        .search-input {
            width: 250px;
            padding: 10px 15px;
            border: 2px solid var(--tang-brown);
            border-radius: 25px;
            font-family: 'KaiTi', 'STKaiti', serif;
            font-size: 14px;
            background: rgba(255,255,255,0.95);
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            outline: none;
            transition: all 0.3s;
        }

        .search-input:focus {
            box-shadow: 0 0 0 3px rgba(139,69,19,0.2);
            width: 300px;
        }

        .search-input::placeholder {
            color: #999;
        }

        .stats-panel {
            position: fixed;
            bottom: 100px;
            left: 20px;
            background: rgba(255,255,255,0.95);
            border: 2px solid var(--tang-brown);
            border-radius: 12px;
            padding: 15px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.15);
            z-index: 90;
            backdrop-filter: blur(10px);
        }

        .stats-title {
            font-size: 14px;
            font-weight: bold;
            color: var(--tang-brown);
            margin-bottom: 10px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(139,69,19,0.2);
        }

        .stats-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 13px;
        }

        .stats-label {
            color: #666;
        }

        .stats-value {
            color: var(--tang-brown);
            font-weight: bold;
        }

        .highlight-pulse {
            animation: pulse-glow 2s ease-in-out infinite;
        }

        @keyframes pulse-glow {
            0%, 100% {
                filter: drop-shadow(0 0 5px var(--tang-gold));
            }
            50% {
                filter: drop-shadow(0 0 20px var(--tang-gold)) drop-shadow(0 0 30px rgba(218,165,32,0.5));
            }
        }

        @media (max-width: 768px) {
            header {
                padding: 10px 15px;
            }

            .header-title {
                font-size: 18px;
                letter-spacing: 2px;
            }

            .header-subtitle {
                font-size: 12px;
            }

            .legend-container {
                display: none;
            }

            .search-box {
                top: 75px;
                left: 10px;
                right: 10px;
            }

            .search-input {
                width: 100%;
            }

            .controls {
                top: 130px;
                right: 10px;
                left: 10px;
                padding: 12px;
            }

            .stats-panel {
                display: none;
            }

            #network-container {
                margin-top: 65px;
                height: calc(100vh - 65px);
            }

            .tooltip {
                max-width: 90vw;
                font-size: 13px;
            }
        }
        
        /* ====== 增强交互效果 ====== */
        
        /* 网络节点动画 */
        .network-node {
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .network-node:hover {
            transform: scale(1.3);
            filter: brightness(1.3);
            z-index: 100;
        }
        
        .network-node.selected {
            animation: nodeSelect 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        }
        
        @keyframes nodeSelect {
            0% { transform: scale(0.8); }
            50% { transform: scale(1.4); }
            100% { transform: scale(1); }
        }
        
        /* 关系连线动画 */
        .relation-line {
            stroke-dasharray: 10;
            animation: lineDash 1s linear infinite;
        }
        
        @keyframes lineDash {
            to {
                stroke-dashoffset: -10;
            }
        }
        
        .relation-line.highlighted {
            animation: linePulse 1s ease-in-out infinite;
        }
        
        @keyframes linePulse {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }
        
        /* 诗人卡片入场动画 */
        .poet-info-card {
            animation: cardSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        @keyframes cardSlideIn {
            0% { opacity: 0; transform: translateY(20px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        
        /* 搜索框聚焦效果 */
        .search-input {
            transition: all 0.3s ease;
        }
        
        .search-input:focus {
            border-color: #DAA520;
            box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.1);
            outline: none;
        }
        
        /* 控制按钮波纹 */
        .control-btn {
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        
        .control-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-out, height 0.4s ease-out;
        }
        
        .control-btn:active::after {
            width: 200%;
            height: 200%;
        }
        
        .control-btn:hover {
            transform: scale(1.05);
        }
        
        /* 统计数字渐变 */
        .stat-value {
            background: linear-gradient(135deg, #8B4513, #DAA520);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }
        
        /* 统计面板悬浮 */
        .stat-item {
            transition: all 0.3s ease;
        }
        
        .stat-item:hover {
            transform: translateY(-5px);
            box-shadow: 0 8px 20px rgba(139, 69, 19, 0.15);
        }
        
        /* 关系类型标签 */
        .relation-tag {
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .relation-tag:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3);
        }
        
        .relation-tag.active {
            animation: tagActive 0.3s ease-out;
        }
        
        @keyframes tagActive {
            0% { transform: scale(0.9); }
            50% { transform: scale(1.05); }
            100% { transform: scale(1); }
        }
        
        /* 图例标签悬浮 */
        .legend-item {
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .legend-item:hover {
            transform: translateX(5px);
        }
        
        /* 返回按钮动画 */
        .back-btn {
            transition: all 0.3s ease;
        }
        
        .back-btn:hover {
            transform: translateX(-5px);
        }
        
        /* 网络加载动画 */
        #network-container::before {
            content: '构建诗人关系网络中...';
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            color: #8B4513;
            font-size: 18px;
            z-index: 1000;
            animation: networkLoading 1.5s ease-in-out infinite;
        }
        
        #network-container.loaded::before {
            display: none;
        }
        
        @keyframes networkLoading {
            0%, 100% { opacity: 0.5; }
            50% { opacity: 1; }
        }
        
        /* 连接数动画 */
        .connection-count {
            animation: countPulse 2s ease-in-out infinite;
        }
        
        @keyframes countPulse {
            0%, 100% { opacity: 0.8; }
            50% { opacity: 1; transform: scale(1.05); }
        }

/* 原内联 style 属性（已转为 class） */
.ih-whb5i1 {
    background: #FF6B6B;
}

.ih-2shd10 {
    background: #4ECDC4;
}

.ih-wosl7j {
    background: #FFA500;
}
