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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #7474bf 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 50%, rgba(74, 144, 226, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(99, 179, 237, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(52, 152, 219, 0.15) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(to right, #ffffff, #a8d8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

header p {
    font-size: 1.2rem;
    opacity: 0.95;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.controls button {
    padding: 12px 24px;
    font-size: 1rem;
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.controls button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.5);
    background: linear-gradient(135deg, #5ba3f5 0%, #4a90e2 100%);
}

.controls button:active {
    transform: translateY(0);
}

.map-container {
    background: linear-gradient(to bottom, #f0f8ff, #ffffff);
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(30, 60, 114, 0.4);
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid rgba(74, 144, 226, 0.2);
    position: relative;
}

.map-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to right, #1e3c72, #4a90e2, #63b3ed, #4a90e2, #1e3c72);
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

#knowledgeMap {
    width: 100%;
    height: 600px;
    display: block;
    cursor: grab;
}

#knowledgeMap:active {
    cursor: grabbing;
}

.info-panel {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 12px 40px rgba(30, 60, 114, 0.4);
    min-height: 200px;
    border: 2px solid rgba(74, 144, 226, 0.2);
    position: relative;
    overflow: hidden;
}

.info-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #1e3c72, #4a90e2, #63b3ed);
}

.info-content {
    position: relative;
    z-index: 1;
}

.info-content h2 {
    color: #1e3c72;
    margin-bottom: 15px;
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(74, 144, 226, 0.1);
}

.info-content p {
    color: #2c3e50;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

#infoConnections {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(74, 144, 226, 0.2);
}

#infoConnections h3 {
    color: #2a5298;
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 600;
}

#infoConnections ul {
    list-style: none;
    padding-left: 0;
}

#infoConnections li {
    padding: 8px 12px;
    margin: 5px 0;
    color: #34495e;
    background: rgba(74, 144, 226, 0.05);
    border-left: 3px solid #4a90e2;
    border-radius: 4px;
    transition: all 0.3s ease;
}

#infoConnections li:hover {
    background: rgba(74, 144, 226, 0.1);
    transform: translateX(5px);
}

.examples-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(74, 144, 226, 0.05);
    border-radius: 12px;
    border-left: 4px solid #4a90e2;
}

.examples-section h3 {
    color: #2a5298;
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

.examples-section ul {
    list-style: none;
    padding-left: 0;
}

.examples-section li {
    padding: 8px 0;
    color: #2c3e50;
    position: relative;
    padding-left: 20px;
}

.examples-section li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: #4a90e2;
    font-weight: bold;
}

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

.node circle {
    transition: all 0.3s ease;
}

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

.node text {
    pointer-events: none;
    user-select: none;
    font-size: 12px;
    font-weight: 500;
}

.link {
    stroke: #b0c4de;
    stroke-opacity: 0.5;
    stroke-width: 2;
    fill: none;
    transition: all 0.3s ease;
}

.link.highlighted {
    stroke: #4a90e2;
    stroke-opacity: 1;
    stroke-width: 3;
    filter: drop-shadow(0 0 3px rgba(74, 144, 226, 0.5));
}

.node.highlighted circle {
    stroke: #1e3c72;
    stroke-width: 4;
    filter: drop-shadow(0 0 8px rgba(74, 144, 226, 0.6));
}

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

    .controls {
        flex-wrap: wrap;
    }

    .controls button {
        font-size: 0.9rem;
        padding: 8px 16px;
    }

    #knowledgeMap {
        height: 400px;
    }
}
