/* ======================================
   DWH Specialist Mind Map - Стили
   ====================================== */

/* === Базовые стили === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* === Заголовок === */
.header {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
    animation: fadeIn 1s ease-in;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* === Контейнер === */
.container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 95%;
    width: 100%;
    animation: slideUp 0.8s ease-out;
}

/* === Mind Map SVG === */
#mindmap {
    width: 100%;
    height: 80vh;
    min-height: 800px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    overflow: hidden;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

#mindmap svg {
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
}

/* === Узлы дерева === */
.node circle {
    stroke-width: 3px;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
    pointer-events: none;
}

.node circle:hover {
    stroke-width: 4px;
    filter: brightness(1.15) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
    transform: scale(1.1);
    pointer-events: none;
}

.node text {
    font-size: 14px;
    font-weight: 500;
    pointer-events: auto;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.9),
                 0 0 8px rgba(255, 255, 255, 0.5);
    fill: #333;
}

/* Обводка текста не должна перехватывать события мыши */
.text-stroke {
    pointer-events: none !important;
}

/* === Связи между узлами === */
.link {
    fill: none;
    stroke: #999;
    stroke-width: 2.5px;
    stroke-opacity: 0.7;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.3s ease;
}

.link:hover {
    stroke: #667eea;
    stroke-width: 3px;
    stroke-opacity: 0.8;
}

/* === Информационный блок === */
.info {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    border-radius: 5px;
    color: #1565c0;
}

/* === Анимации === */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* === Адаптивность для мобильных устройств === */
@media (max-width: 768px) {
    .header h1 {
        font-size: 1.8em;
    }

    .header p {
        font-size: 1em;
    }

    .container {
        padding: 20px;
    }

    #mindmap {
        height: 600px;
    }
}

@media (max-width: 480px) {
    .header h1 {
        font-size: 1.5em;
    }

    #mindmap {
        height: 500px;
    }
}
