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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    color: #fff;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 30px;
    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.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.main-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    margin-bottom: 30px;
    animation: fadeIn 0.5s ease;
}

.concept-header {
    text-align: center;
    margin-bottom: 40px;
}

.concept-icon {
    font-size: 4em;
    margin-bottom: 15px;
}

.concept-title {
    font-size: 2.5em;
    font-weight: bold;
    margin-bottom: 15px;
}

.concept-description {
    font-size: 1.15em;
    line-height: 1.8;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto;
}

.relationships-section {
    margin-top: 40px;
}

.section-title {
    font-size: 1.6em;
    font-weight: bold;
    margin-bottom: 25px;
    color: #fbbf24;
    text-align: center;
}

.relationships-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.relationship-card {
    background: rgba(255, 255, 255, 0.15);
    padding: 25px;
    border-radius: 15px;
    border-left: 4px solid;
    cursor: pointer;
    transition: all 0.3s ease;
}

.relationship-card.similar {
    border-left-color: #4ade80;
}

.relationship-card.prerequisite {
    border-left-color: #fbbf24;
}

.relationship-card.application {
    border-left-color: #60a5fa;
}

.relationship-card.contrast {
    border-left-color: #f87171;
}

.relationship-card:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.card-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: bold;
    margin-bottom: 12px;
}

.card-badge.similar {
    background: rgba(74, 222, 128, 0.3);
    color: #4ade80;
}

.card-badge.prerequisite {
    background: rgba(251, 191, 36, 0.3);
    color: #fbbf24;
}

.card-badge.application {
    background: rgba(96, 165, 250, 0.3);
    color: #60a5fa;
}

.card-badge.contrast {
    background: rgba(248, 113, 113, 0.3);
    color: #f87171;
}

.card-title {
    font-size: 1.3em;
    font-weight: bold;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-description {
    opacity: 0.9;
    line-height: 1.6;
    margin-bottom: 15px;
}

.card-link {
    font-size: 0.9em;
    color: #4ade80;
    font-weight: 500;
}

.network-visualization {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 30px;
    margin: 30px 0;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.network-graph {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.network-node {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.network-node.current {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.6);
}

.network-node:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(251, 191, 36, 0.6);
}

.node-label {
    position: absolute;
    bottom: -30px;
    font-size: 0.4em;
    white-space: nowrap;
    font-weight: bold;
}

.navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
}

.nav-btn {
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 15px;
    color: white;
    text-decoration: none;
    font-size: 1em;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    border: none;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

#loading {
    text-align: center;
    padding: 40px;
    font-size: 1.2em;
}

#loading.error {
    color: #f87171;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .relationships-grid {
        grid-template-columns: 1fr;
    }
}