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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

header {
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 10px 20px;
    margin-bottom: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-content .logo {
    margin-right: 0;
}

.header-content h1 {
    margin: 0;
    flex: 1;
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-link {
    padding: 8px 16px;
    background: white;
    color: #555;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #99999937;
    transform: translateY(-1px);
}

.logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

header h1 {
    text-align: left;
    color: #2c3e50;
    margin: 0;
    font-size: 1.2em;
    font-weight: 400;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.platform-filter, .timeline-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.platform-filter label {
    font-weight: 600;
    color: #34495e;
}

.platform-filter select {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.platform-filter select:focus {
    outline: none;
    border-color: #667eea;
}

.timeline-controls button {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.timeline-controls button:hover {
    background: #5a6fd8;
}

.timeline-controls input[type="range"] {
    width: 200px;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    cursor: pointer;
}

.timeline-controls input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.timeline-controls span {
    font-weight: 600;
    color: #34495e;
    min-width: 50px;
}

main {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px);
    overflow: hidden;
}

.main-content {
    display: flex;
    flex: 1;
    gap: 10px;
    padding: 10px;
    overflow: hidden;
    min-height: 500px;
}

.left-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    min-height: 500px;
    overflow: hidden;
}

.right-panel {
    flex: 1;
    overflow: hidden;
}

.visualization-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    flex: 1;
    height: 100%;
    min-height: 400px;
}

#main-visualization {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    position: relative;
    border: none;
}

.legend {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    z-index: 10;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.legend h3 {
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.9em;
    font-weight: 600;
}

.info-box {
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    z-index: 10;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 11px;
    color: #2c3e50;
    line-height: 1.4;
}

.info-box div {
    margin: 2px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 14px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auxiliary-views {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    height: 100%;
    overflow-y: auto;
}

.auxiliary-panel {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
    min-height: 150px;
}

.time-trend-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: 120px;
    min-height: 120px;
}

.time-trend-container .auxiliary-panel {
    margin: 0;
    height: 100%;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.auxiliary-panel h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1em;
    font-weight: 600;
}

#platform-chart, #content-chart, #event-subjects-chart, #post-positions-chart, #emotion-types-chart, #user-types-chart {
    height: 120px;
    width: 100%;
}

#geographic-chart {
    height: 120px;
    width: 100%;
}

#time-trend-chart {
    height: 100%;
    width: 100%;
}

#data-analysis {
    height: 200px;
    width: 100%;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.analysis-section {
    margin-bottom: 15px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.analysis-section h5 {
    margin: 0 0 8px 0;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 600;
}

.analysis-section div {
    font-size: 12px;
    color: #34495e;
    margin: 2px 0;
    padding: 2px 0;
}

/* Node styles */
.node {
    cursor: pointer;
    transition: all 0.3s ease;
}

.node:hover {
    stroke-width: 3px;
}

.node.topic {
    fill: rgba(255, 255, 255, 0.9);
    stroke: #2c3e50;
    stroke-width: 2px;
}

.node.post {
    stroke: white;
    stroke-width: 2px;
}

.node.post:hover {
    stroke-width: 4px;
}

/* Link styles */
.link {
    stroke: #bdc3c7;
    stroke-width: 2px;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.link:hover {
    opacity: 1;
    stroke-width: 3px;
}

/* Text styles */
.node-label {
    font-size: 12px;
    font-weight: 600;
    text-anchor: middle;
    pointer-events: none;
    fill: #2c3e50;
}

.topic-label {
    font-size: 14px;
    font-weight: 700;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Responsive design */
@media (max-width: 1200px) {
    main {
        grid-template-columns: 1fr;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .platform-filter, .timeline-controls {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .main-content {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    #main-visualization {
        height: 400px;
    }
    
    .auxiliary-panel {
        padding: 15px;
    }
} 

/* Tooltip styles */
.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 12px;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    max-width: 250px;
    word-wrap: break-word;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.tooltip strong {
    color: #667eea;
    font-weight: 600;
}

/* Chart container improvements */
#platform-chart, #time-trend-chart, #content-chart, #event-subjects-chart, 
#post-positions-chart, #emotion-types-chart, #user-types-chart {
    height: 150px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    transition: all 0.3s ease;
}

#geographic-chart {
    height: 150px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    transition: all 0.3s ease;
}

/* Grid line improvements */
.grid line {
    stroke: #ddd;
    stroke-opacity: 0.7;
}

.grid path {
    stroke-width: 0;
}

/* Axis improvements */
.auxiliary-panel svg text {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Animation for chart elements */
.auxiliary-panel svg rect,
.auxiliary-panel svg path,
.auxiliary-panel svg circle {
    transition: all 0.3s ease;
}

/* Responsive improvements for charts */
@media (max-width: 768px) {
    #platform-chart, #content-chart, #event-subjects-chart, 
    #post-positions-chart, #emotion-types-chart, #user-types-chart {
        height: 120px;
    }
    
    #time-trend-chart {
        height: 25px;
    }
    
    .auxiliary-panel {
        padding: 15px;
    }
    
    .auxiliary-panel h3 {
        font-size: 1.1em;
    }
} 