@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800;900&family=Orbitron:wght@600;700;800;900&display=swap');

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
}

.font-cyber {
    font-family: 'Orbitron', sans-serif;
}

code, pre, .font-mono, .CodeMirror {
    font-family: 'Fira Code', monospace !important;
}

/* -------------------------------------------------------------
   ПЕРЕМИКАЧ РЕЖИМІВ (STUDIO / FREE DEV)
   ------------------------------------------------------------- */
.mode-tab-btn {
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.mode-tab-btn:hover {
    color: #e2e8f0;
}

.mode-tab-btn.active {
    background: #0284c7;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.5);
    border-color: #38bdf8;
}

/* -------------------------------------------------------------
   CODEMIRROR РЕДАКТОРИ ТА СИНХРОННЕ ПІДСВІЧУВАННЯ
   ------------------------------------------------------------- */
.CodeMirror {
    height: 100% !important;
    background: #080d1a !important;
    color: #e2e8f0 !important;
    font-size: 13px;
    line-height: 1.55;
}

.CodeMirror-gutters {
    background: #060a14 !important;
    border-right: 1px solid #1e293b !important;
}

.CodeMirror-linenumber {
    color: #475569 !important;
    padding: 0 8px 0 4px !important;
}

.cm-indent-guide {
    position: relative;
    display: inline-block;
}

.cm-indent-guide::before {
    content: "·";
    position: absolute;
    left: 0;
    color: rgba(6, 182, 212, 0.22);
    font-weight: bold;
    pointer-events: none;
}

/* Рядок у коді, що відповідає виділеному на Canvas елементу */
.cm-active-selection-line {
    background: rgba(6, 182, 212, 0.18) !important;
    border-left: 3px solid #06b6d4 !important;
    transition: background 0.2s ease;
}

/* Текстовий тег у коді */
.cm-highlight-tag {
    background: rgba(168, 85, 247, 0.35) !important;
    border-radius: 3px;
    outline: 1px solid #c084fc;
}

/* -------------------------------------------------------------
   ПІДСВІТКА ЕЛЕМЕНТА НА CANVAS ПРИ НАВІГАЦІЇ З КОДУ
   ------------------------------------------------------------- */
.canvas-code-highlight {
    outline: 2px dashed #06b6d4 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.55) !important;
    animation: pulseCanvasGlow 1.6s ease-in-out infinite alternate;
}

@keyframes pulseCanvasGlow {
    from { outline-color: #06b6d4; }
    to { outline-color: #a855f7; }
}

/* -------------------------------------------------------------
   СПЛІТЕРИ (SPLITTERS)
   ------------------------------------------------------------- */
.gutter-h {
    width: 9px;
    background: #090e1c;
    border-left: 1px solid #1e293b;
    border-right: 1px solid #1e293b;
    cursor: col-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    touch-action: none;
    z-index: 25;
    transition: background 0.15s ease;
}

.gutter-h:hover, .gutter-h.active {
    background: #0284c7;
}

.gutter-h-line {
    width: 1px;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
}

.gutter-v {
    height: 9px;
    background: #090e1c;
    border-top: 1px solid #1e293b;
    border-bottom: 1px solid #1e293b;
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    user-select: none;
    touch-action: none;
    z-index: 25;
    transition: background 0.15s ease;
}

.gutter-v:hover, .gutter-v.active {
    background: #0284c7;
}

.gutter-v-line {
    height: 1px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
}

.gutter-icon {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #111827;
    border: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.6);
}

/* -------------------------------------------------------------
   КНОПКИ ТАБІВ ТА ВИСУВНІ ШТОРКИ (DRAWERS)
   ------------------------------------------------------------- */
.top-cad-btn {
    padding: 6px 11px;
    border-radius: 10px;
    background: #0e1526;
    border: 1px solid #1e293b;
    font-size: 11px;
    font-weight: 700;
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    cursor: pointer;
}
.top-cad-btn:hover {
    background: #17233d;
    border-color: #0284c7;
}

.side-tab-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #10172a;
    border: 1px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}
.side-tab-btn:hover {
    background: #1c2844;
    border-color: #38bdf8;
    transform: scale(1.05);
}
.side-tab-btn.active {
    background: #082f49;
    border-color: #0284c7;
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.45);
}

.cad-drawer {
    position: absolute;
    right: 48px;
    top: 0;
    bottom: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
    transform: translateX(0);
    opacity: 1;
}
.cad-drawer.drawer-closed {
    transform: translateX(110%);
    opacity: 0;
    pointer-events: none;
}

.vp-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.15s;
    cursor: pointer;
}
.vp-btn:hover, .vp-btn.active {
    background: #0284c7;
    color: #ffffff;
}

/* -------------------------------------------------------------
   МОНТАЖНИЙ СТІЛ САЙТУ ТА БЛОКИ
   ------------------------------------------------------------- */
.site-block-wrapper {
    position: relative;
    border: 1px dashed transparent;
    transition: border-color 0.15s ease;
}

.site-block-wrapper:hover {
    border-color: rgba(6, 182, 212, 0.6);
}

.site-block-wrapper.is-selected {
    border: 1.5px solid #06b6d4 !important;
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.25);
}

.component-selected {
    outline: 2px solid #a855f7 !important;
    outline-offset: 2px;
}

.drop-zone-bar {
    height: 8px;
    margin: -4px 0;
    position: relative;
    z-index: 20;
    transition: all 0.15s ease;
}
.drop-zone-bar:hover, .drop-zone-bar.drag-over {
    height: 16px;
    background: rgba(6, 182, 212, 0.4);
    border-radius: 4px;
    border: 1px dashed #06b6d4;
}

.float-btn {
    padding: 4px 7px;
    border-radius: 6px;
    background: #131d33;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #1e293b;
    cursor: pointer;
    transition: all 0.15s ease;
}
.float-btn:hover {
    background: #1e293b;
    border-color: #06b6d4;
    color: #38bdf8;
}

.shape-opt-btn, .opt-btn, .effect-toggle-btn {
    padding: 7px;
    border-radius: 8px;
    background: #0f172a;
    border: 1px solid #1e293b;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}
.shape-opt-btn:hover, .opt-btn:hover, .effect-toggle-btn:hover {
    background: #1e293b;
    color: #38bdf8;
    border-color: #0284c7;
}
.shape-opt-btn.active, .effect-toggle-btn.active {
    background: #082f49;
    border-color: #0284c7;
    color: #38bdf8;
}

.cad-slider {
    accent-color: #06b6d4;
    height: 4px;
    border-radius: 2px;
    background: #1e293b;
    outline: none;
}

/* -------------------------------------------------------------
   КІБЕР-ЕФЕКТИ
   ------------------------------------------------------------- */
.cyber-glow {
    box-shadow: 0 0 25px rgba(6, 182, 212, 0.6) !important;
}

.cyber-glass {
    background: rgba(13, 20, 36, 0.65) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
}

.cyber-border-neon {
    border: 1.5px solid #06b6d4 !important;
    position: relative;
}
.cyber-border-neon::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 1px solid rgba(6, 182, 212, 0.4);
    pointer-events: none;
    border-radius: inherit;
}

.cyber-tilt {
    transform: skewX(-4deg) !important;
}

.img-crop-square {
    border-radius: 0px !important;
}
.img-crop-rounded {
    border-radius: 16px !important;
}
.img-crop-circle {
    border-radius: 9999px !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
}
.img-neon-border {
    border: 2px solid #06b6d4 !important;
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.5) !important;
}
.img-skewed {
    transform: perspective(600px) rotateY(-8deg) !important;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #080d19;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #334155;
}
/* Фікс для вікна довільної розробки: на всю висоту та ширину без деформацій */
#freeDevFrameWrapper {
    height: 100% !important;
    min-height: 100% !important;
    align-self: stretch;
}

#freeDevLiveFrame {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    display: block;
}