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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #4A90E2 0%, #1E3A8A 100%);
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 100vw;
    min-height: 100vh;
    padding: 20px;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.1rem;
    opacity: 0.95;
}

#knowledge-map {
    position: relative;
    width: 100%;
    height: calc(100vh - 200px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

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

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

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

.node:hover circle {
    stroke-width: 5px;
    filter: brightness(1.2);
}

.node text {
    font-size: 13px;
    font-weight: 600;
    fill: #333;
    text-anchor: middle;
    pointer-events: none;
    user-select: none;
}

.core-node circle {
    stroke-width: 5px;
}

.core-node text {
    font-size: 20px;
    font-weight: 700;
    fill: #fff;
}

.link {
    stroke: #999;
    stroke-opacity: 0.6;
    stroke-width: 2;
    fill: none;
}

.category-link {
    stroke-width: 3;
    stroke: #666;
}

.info-panel {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 500px;
    max-width: 90vw;
    max-height: 80vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.4);
    padding: 30px;
    overflow-y: auto;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.3s ease;
    opacity: 0;
    z-index: 1001;
}

.info-panel.visible {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

.info-panel.hidden {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    pointer-events: none;
}

.close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    color: #333;
}

#bias-title {
    font-size: 1.8rem;
    color: #2563EB;
    margin-bottom: 15px;
    padding-right: 40px;
}

.category-tag {
    display: inline-block;
    padding: 6px 15px;
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

#bias-description {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 20px;
}

.example-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 4px solid #2563EB;
}

.example-section h3 {
    font-size: 1.1rem;
    color: #2563EB;
    margin-bottom: 10px;
}

.example-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #666;
}

.tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
    max-width: 200px;
}

.tooltip.visible {
    opacity: 1;
}

/* Custom scrollbar for info panel */
.info-panel::-webkit-scrollbar {
    width: 8px;
}

.info-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.info-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3B82F6 0%, #1E40AF 100%);
    border-radius: 10px;
}

.info-panel::-webkit-scrollbar-thumb:hover {
    background: #2563EB;
}

/* Backdrop overlay for modal */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.modal-backdrop.visible {
    opacity: 1;
    pointer-events: all;
}

/* Responsive design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 0.95rem;
    }

    .info-panel {
        width: 95vw;
        max-height: 75vh;
        padding: 25px;
    }

    #bias-title {
        font-size: 1.5rem;
    }
}
