/* ============================================
   FUNNEL BUILDER - STRICT BLACK & BLUE GLASS
   Строгий черно-синий дизайн с эффектом жидкого стекла
   ============================================ */

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

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
}

body {
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 25%, #16213e 50%, #0f3460 75%, #0a0a0a 100%);
    background-attachment: fixed;
    color: #ffffff;
    min-height: 100vh;
}

/* Тонкие световые акценты */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(37, 99, 235, 0.02) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(30, 64, 175, 0.01) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* === НАВИГАЦИЯ (STRICT GLASS) === */

#nav {
    position: relative;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 
        0 4px 16px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 0 rgba(59, 130, 246, 0.1);
    min-height: 60px;
}

/* Кнопки навигации */
#nav button {
    position: relative;
    padding: 10px 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#nav button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

#nav button:hover::before {
    left: 100%;
}

#nav button:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

#nav button:active {
    transform: translateY(0);
}

/* === ОСНОВНЫЕ ВИДЫ === */

#dashboard-view,
#builder-view,
#account-view {
    position: relative;
    z-index: 1;
    height: calc(100vh - 66px);
    overflow-y: auto;
    padding: 24px;
}

/* Кастомный скроллбар */
#dashboard-view::-webkit-scrollbar,
#builder-view::-webkit-scrollbar,
#account-view::-webkit-scrollbar,
#properties::-webkit-scrollbar,
#canvas::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

#dashboard-view::-webkit-scrollbar-track,
#builder-view::-webkit-scrollbar-track,
#account-view::-webkit-scrollbar-track,
#properties::-webkit-scrollbar-track,
#canvas::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

#dashboard-view::-webkit-scrollbar-thumb,
#builder-view::-webkit-scrollbar-thumb,
#account-view::-webkit-scrollbar-thumb,
#properties::-webkit-scrollbar-thumb,
#canvas::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.4);
    border-radius: 3px;
    transition: background 0.3s;
}

#dashboard-view::-webkit-scrollbar-thumb:hover,
#builder-view::-webkit-scrollbar-thumb:hover,
#account-view::-webkit-scrollbar-thumb:hover,
#properties::-webkit-scrollbar-thumb:hover,
#canvas::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.6);
}

/* === DASHBOARD === */

#dashboard-view h2,
#account-view h2 {
    color: #f9fafb;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 24px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
}

.project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.project-item {
    position: relative;
    padding: 24px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    cursor: pointer;
    color: #e5e7eb;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 
        0 4px 16px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 0 0 rgba(59, 130, 246, 0.1);
}

.project-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.project-item:hover::before {
    opacity: 1;
}

.project-item:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px 0 rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(59, 130, 246, 0.2);
}

/* === BUILDER VIEW === */

#builder-view {
    display: flex;
    flex-direction: column;
    padding: 0;
}

/* Toolbar */
#toolbar {
    position: relative;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 
        0 4px 16px 0 rgba(0, 0, 0, 0.3),
        inset 0 1px 0 0 rgba(59, 130, 246, 0.1);
}

#toolbar button {
    position: relative;
    padding: 10px 20px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

#toolbar button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

#toolbar button:not(:disabled)::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s;
}

#toolbar button:not(:disabled):hover::before {
    left: 100%;
}

#toolbar button:not(:disabled):hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

#status {
    margin-left: 20px;
    font-weight: 600;
    color: #e5e7eb;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Container для canvas и properties */
#container {
    flex: 1;
    display: flex;
    height: calc(100vh - 132px);
    overflow: hidden;
}

/* === CANVAS (область для узлов) === */

#canvas {
    flex: 3;
    position: relative;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin: 16px 0 16px 16px;
    border-radius: 16px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 
        inset 0 2px 8px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2);
    cursor: grab;
    user-select: none;
}

#canvas:active {
    cursor: grabbing;
}

/* Canvas container for zoom and pan */
.canvas-container {
    width: 200%;
    height: 200%;
    position: relative;
    overflow: hidden;
    transform-origin: 0 0;
    transition: transform 0.1s ease-out;
    min-width: 2000px;
    min-height: 1200px;
}

/* Dynamic grid background */
.canvas-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 2000px;
    height: 1200px;
    pointer-events: none;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    transition: background-size 0.3s ease;
}

/* Zoom controls */
.zoom-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.zoom-btn {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(1.05);
}

.zoom-btn:active {
    transform: scale(0.95);
}

.zoom-level {
    color: #ffffff;
    font-size: 12px;
    text-align: center;
    margin: 5px 0;
    opacity: 0.7;
}

/* Minimap */
.minimap {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 200px;
    height: 120px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    z-index: 1000;
    overflow: hidden;
    cursor: pointer;
}

.minimap-viewport {
    position: absolute;
    border: 2px solid rgba(59, 130, 246, 0.8);
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    pointer-events: none;
}

#canvas #edgesSvg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

/* === NODES (узлы/шаги воронки) === */

.node {
    position: absolute;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 2px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    cursor: move;
    color: #f9fafb;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.3px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px 0 rgba(0, 0, 0, 0.4),
        inset 0 1px 0 0 rgba(59, 130, 246, 0.2),
        inset 0 -1px 0 0 rgba(0, 0, 0, 0.2);
    z-index: 10;
    user-select: none;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Квадратная карточка по умолчанию */
.node {
    width: 120px;
    height: 150px;
    transition: all 0.3s ease;
}

/* Прямоугольная карточка для широких фото */
.node.landscape {
    width: 150px;
    height: 120px;
}

/* Квадратная карточка для квадратных фото */
.node.square {
    width: 120px;
    height: 120px;
}

/* Адаптивные размеры при малом зуме */
.node.small-zoom {
    width: 80px;
    height: 100px;
}

.node.small-zoom.landscape {
    width: 100px;
    height: 80px;
}

.node.small-zoom.square {
    width: 80px;
    height: 80px;
}

/* Иконка контента в узле */
.node-icon {
    width: 36px;
    height: 36px;
    color: rgba(59, 130, 246, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* Адаптивные размеры иконок при малом зуме */
.node.small-zoom .node-icon {
    width: 24px;
    height: 24px;
}

.node:hover .node-icon {
    color: rgba(59, 130, 246, 1);
    transform: scale(1.1);
}

.node.selected .node-icon {
    color: rgba(59, 130, 246, 1);
    transform: scale(1.15);
}

.node::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(0, 0, 0, 0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.node:hover::before {
    opacity: 1;
}

.node:hover {
    transform: scale(1.03);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 
        0 8px 24px 0 rgba(0, 0, 0, 0.5),
        inset 0 1px 0 0 rgba(59, 130, 246, 0.3),
        0 0 0 2px rgba(59, 130, 246, 0.1);
}

.node.selected {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.6);
    box-shadow: 
        0 8px 32px 0 rgba(59, 130, 246, 0.3),
        inset 0 1px 0 0 rgba(59, 130, 246, 0.4),
        0 0 0 3px rgba(59, 130, 246, 0.2);
    transform: scale(1.05);
}

.node strong {
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* === PROPERTIES PANEL === */

#properties {
    flex: 1;
    min-width: 320px;
    max-width: 400px;
    padding: 24px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px) saturate(120%);
    -webkit-backdrop-filter: blur(20px) saturate(120%);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-right: none;
    border-top: none;
    border-bottom: none;
    margin: 16px 16px 16px 0;
    border-radius: 16px 0 0 16px;
    box-shadow: 
        -4px 0 16px 0 rgba(0, 0, 0, 0.3),
        inset 1px 0 0 0 rgba(59, 130, 246, 0.1);
}

#properties h2 {
    margin: 0 0 24px 0;
    color: #f9fafb;
    font-size: 24px;
    font-weight: 700;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.5px;
}

#no-selection {
    font-style: italic;
    color: rgba(156, 163, 175, 0.8);
    text-align: center;
    padding: 40px 20px;
    font-size: 15px;
}

#properties label {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(209, 213, 219, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

#properties input,
#properties select,
#properties textarea {
    width: 100%;
    padding: 12px 16px;
    margin-top: 6px;
    box-sizing: border-box;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e5e7eb;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

#properties input::placeholder,
#properties textarea::placeholder {
    color: rgba(156, 163, 175, 0.6);
}

#properties input:focus,
#properties select:focus,
#properties textarea:focus {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

#properties select {
    cursor: pointer;
}

/* === FILE UPLOAD STYLES === */

.file-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.file-input-container input[type="text"] {
    flex: 1;
    margin-top: 0;
}

.upload-btn {
    padding: 8px 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: rgba(59, 130, 246, 0.9);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    transform: scale(1.05);
}

.upload-btn:active {
    transform: scale(0.95);
}

/* Стили для отображения загруженного изображения в узле */
.node-image {
    width: 100%;
    object-fit: cover;
    border-radius: 14px 14px 0 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Высота изображения для вертикальных карточек */
.node:not(.landscape) .node-image {
    height: 105px;
}

/* Высота изображения для горизонтальных карточек */
.node.landscape .node-image {
    height: 90px;
}

/* Адаптивные размеры изображений при малом зуме */
.node.small-zoom:not(.landscape) .node-image {
    height: 70px;
}

.node.small-zoom.landscape .node-image {
    height: 60px;
}

.node:hover .node-image {
    transform: scale(1.02);
}

.node.selected .node-image {
    transform: scale(1.05);
}

/* Контейнер для иконки (когда нет фото) */
.node-icon-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 14px 14px 0 0;
}

/* Высота контейнера иконки для вертикальных карточек */
.node:not(.landscape) .node-icon-container {
    height: 105px;
}

/* Высота контейнера иконки для горизонтальных карточек */
.node.landscape .node-icon-container {
    height: 90px;
}

/* Адаптивные размеры контейнеров иконок при малом зуме */
.node.small-zoom:not(.landscape) .node-icon-container {
    height: 70px;
}

.node.small-zoom.landscape .node-icon-container {
    height: 60px;
}

/* Название шага */
.node-title {
    padding: 8px 12px;
    text-align: center;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 0 0 14px 14px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* Адаптивные размеры текста при малом зуме */
.node.small-zoom .node-title {
    padding: 4px 8px;
    font-size: 9px;
    letter-spacing: 0.1px;
}

/* === RICH TEXT EDITOR === */

.editor-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.editor-toolbar button {
    padding: 8px 12px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.editor-toolbar button:hover {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.editor-content {
    min-height: 120px;
    max-height: 300px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #e5e7eb;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 14px;
    line-height: 1.6;
    outline: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.editor-content:focus {
    border-color: rgba(59, 130, 246, 0.6);
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 
        inset 0 1px 3px rgba(0, 0, 0, 0.3),
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

.editor-content blockquote {
    border-left: 3px solid rgba(59, 130, 246, 0.5);
    padding-left: 12px;
    margin: 8px 0;
    font-style: italic;
    opacity: 0.9;
}

.editor-content b,
.editor-content strong {
    font-weight: 700;
}

.editor-content i,
.editor-content em {
    font-style: italic;
}

.editor-content u {
    text-decoration: underline;
}

/* === ACCOUNT VIEW === */

#account-view p {
    color: rgba(209, 213, 219, 0.9);
    font-size: 16px;
    line-height: 1.6;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid rgba(59, 130, 246, 0.2);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

/* === ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ === */

/* Плавное появление элементов */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-item,
.node,
#properties > * {
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* Строгий стиль для кнопки Generate */
#generateBtn {
    background: rgba(59, 130, 246, 0.2);
    border-color: rgba(59, 130, 246, 0.5);
    position: relative;
}

#generateBtn::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

#generateBtn:hover::after {
    opacity: 1;
}

/* Улучшенная типографика */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

::-moz-selection {
    background: rgba(59, 130, 246, 0.3);
    color: #ffffff;
}

/* Адаптивность */
@media (max-width: 1024px) {
    #container {
        flex-direction: column;
    }
    
    #canvas {
        flex: 1;
        margin: 16px;
    }
    
    #properties {
        max-width: 100%;
        margin: 0 16px 16px 16px;
        border-radius: 16px;
        border: 1px solid rgba(59, 130, 246, 0.2);
    }
    
    .project-list {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    #nav {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }
    
    #nav button,
    #toolbar button {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    #toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .project-list {
        grid-template-columns: 1fr;
    }
    
    .node {
        min-width: 120px;
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Строгие линии SVG */
#edgesSvg line {
    stroke-dasharray: 3;
    animation: dashAnimation 2s linear infinite;
}

@keyframes dashAnimation {
    to {
        stroke-dashoffset: -6;
    }
}

/* Скрытие файлового инпута */
#fileInput {
    display: none !important;
}