/* ============================================
   JurisMind — Font Hosting (Local)
   ============================================ */

/* Inter Variable */
@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-VariableFont_opsz,wght.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/Inter-Italic-VariableFont_opsz,wght.woff2') format('woff2');
    font-weight: 100 900;
    font-display: swap;
    font-style: italic;
}

/* Merriweather Variable */
@font-face {
    font-family: 'Merriweather';
    src: url('fonts/Merriweather-VariableFont_opsz,wdth,wght.woff2') format('woff2');
    font-weight: 300 900;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: 'Merriweather';
    src: url('fonts/Merriweather-Italic-VariableFont_opsz,wdth,wght.woff2') format('woff2');
    font-weight: 300 900;
    font-display: swap;
    font-style: italic;
}

/* ============================================
   JurisMind — Design System
   ============================================ */

:root {
    /* Color palette */
    --primary-50: #eef2ff;
    --primary-100: #e0e7ff;
    --primary-200: #c7d2fe;
    --primary-400: #818cf8;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;

    --violet-50: #f5f3ff;
    --violet-100: #ede9fe;
    --violet-400: #a78bfa;
    --violet-500: #8b5cf6;
    --violet-600: #7c3aed;

    --rose-400: #fb7185;
    --rose-500: #f43f5e;

    --amber-400: #fbbf24;
    --amber-500: #f59e0b;

    --emerald-400: #34d399;
    --emerald-500: #10b981;

    --cyan-400: #22d3ee;
    --cyan-500: #06b6d4;

    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
    --grad-rose: linear-gradient(135deg, #f43f5e, #fb7185);
    --grad-amber: linear-gradient(135deg, #f59e0b, #fbbf24);
    --grad-emerald: linear-gradient(135deg, #10b981, #34d399);
    --grad-cyan: linear-gradient(135deg, #06b6d4, #22d3ee);
    --grad-violet: linear-gradient(135deg, #7c3aed, #a78bfa);
    --grad-blue: linear-gradient(135deg, #3b82f6, #60a5fa);
    --grad-pink: linear-gradient(135deg, #ec4899, #f472b6);
    --grad-orange: linear-gradient(135deg, #f97316, #fb923c);
    --grad-teal: linear-gradient(135deg, #14b8a6, #2dd4bf);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.15);
    --shadow-node: 0 2px 8px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-node-hover: 0 6px 20px rgba(99, 102, 241, 0.15), 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-node-selected: 0 0 0 3px rgba(99, 102, 241, 0.3), 0 6px 20px rgba(99, 102, 241, 0.15);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 999px;

    /* Sizing */
    --toolbar-height: 56px;
}

/* ============================================
   Reset & Base
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
    /* overflow: hidden; -- controlled by page classes */
    font-family: var(--font-family);
    background: #ffffff;
    color: var(--slate-800);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    touch-action: manipulation;
}

/* Page specific scrolling logic */
html,
body:not(.admin-body) {
    overflow: auto;
    /* Default to scrolling */
    display: flex;
    flex-direction: column;
    margin: 0;
}

/* App-only: hide scrolling if we are in the mindmap app */
body:not(.landing-page):not(.pricing-page):not(.checkout-page):not(.auth-page):not(.profile-page):not(.legal-page):not(.admin-body):not(.themen-page) {
    overflow: hidden;
    height: 100vh;
}

/* ============================================
   Toolbar
   ============================================ */
/* ============================================
   Mindmap Toolbar (Secondary)
   ============================================ */
/* ============================================
   Mindmap Toolbar (Secondary - Floating)
   ============================================ */
.mindmap-toolbar {
    position: fixed;
    top: 86px;
    /* Floating below header with gap */
    left: 50%;
    transform: translateX(-50%);
    height: 48px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-full);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    z-index: 900;
    gap: 8px;
    transition: all var(--transition-normal);
}

.mindmap-toolbar:hover {
    box-shadow:
        0 8px 12px -2px rgba(0, 0, 0, 0.08),
        0 15px 20px -5px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.03);
    transform: translateX(-50%) translateY(-1px);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 4px;
}

/* Updated formatting for tool-btn to fit new toolbar */
.mindmap-toolbar .tool-btn {
    padding: 0;
    width: 34px;
    height: 34px;
    font-size: 0;
    /* Hide text label for cleaner look, tooltip handles it */
    border-radius: 50%;
    /* Circular buttons */
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    outline: none;
    background: transparent;
    color: var(--slate-500);
    transition: all var(--transition-fast);
    touch-action: manipulation;
}

.mindmap-toolbar .tool-btn svg {
    width: 18px;
    height: 18px;
}

.mindmap-toolbar .tool-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    color: var(--primary-600);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.mindmap-toolbar .tool-btn.accent {
    background: var(--primary-50);
    color: var(--primary-600);
}

.mindmap-toolbar .tool-btn.accent:hover {
    background: var(--primary-100);
    color: var(--primary-700);
    transform: none;
    /* Override default */
}

.mindmap-toolbar .toolbar-divider {
    height: 20px;
    background: var(--slate-200);
    margin: 0 2px;
}

/* Visibility Control */
.admin-only {
    display: none !important;
}

body.is-admin .admin-only {
    display: flex !important;
}

.admin-only.toolbar-divider {
    display: none !important;
}

body.is-admin .admin-only.toolbar-divider {
    display: block !important;
}

/* ============================================
   Canvas Container
   ============================================ */
.canvas-container {
    position: fixed;
    top: 0;
    /* Changed from 70px to allow background to show through header */
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    cursor: grab;
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(20, 184, 166, 0.1) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(251, 113, 133, 0.1) 0px, transparent 50%),
        radial-gradient(at 10% 90%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(255, 255, 255, 0.5) 0px, transparent 80%) !important;
    background-size: cover;
    touch-action: none;
}

.canvas-container:active {
    cursor: grabbing;
}

.connections-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 1px;
    overflow: visible;
    pointer-events: none;
    z-index: 1;
}

.nodes-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 2;
    transform-origin: 0 0;
    will-change: transform;
}

.connections-svg {
    transform-origin: 0 0;
}

/* ============================================
   Mind Map Nodes
   ============================================ */
.mm-node {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 80px;
    max-width: 320px;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    user-select: none;
    transition: box-shadow var(--transition-normal), border-color var(--transition-normal), transform var(--transition-fast), background var(--transition-normal);
    transform-origin: center center;
    z-index: 10;
    will-change: transform, box-shadow;
    /* Behebt Render-Artefakte beim Löschen/Zuklappen */
    backface-visibility: hidden;
    transform: translateZ(0);
    touch-action: manipulation;
}

.mm-node:hover {
    box-shadow: var(--shadow-node-hover);
    z-index: 20;
    transform: translateY(-2px) scale(1.03);
}

.mm-node.transparent-sibling {
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.mm-node.transparent-sibling:hover {
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
}

.mm-node.selected {
    box-shadow: var(--shadow-node-selected);
    border-color: var(--primary-400);
}

.mm-node.root-node {
    padding: 14px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.85);
    color: var(--slate-800);
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    min-width: 120px;
    z-index: 15;
}

.mm-node.root-node:hover {
    background: rgba(255, 255, 255, 0.75);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1), 0 0 25px rgba(255, 255, 255, 0.6);
    transform: translateZ(0) scale(1.02);
}

.mm-node.root-node.selected {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 12px 40px rgba(0, 0, 0, 0.1);
}

.mm-node.depth-1 {
    font-weight: 500;
    font-size: 14px;
    padding: 9px 15px;
}

.mm-node.depth-2 {
    font-size: 13px;
    padding: 7px 13px;
}

.mm-node.depth-3,
.mm-node.depth-4 {
    font-size: 12px;
    padding: 6px 11px;
    border-radius: var(--radius-md);
}

.node-text {
    line-height: 1.4;
    outline: none;
    min-width: 10px;
    white-space: pre-wrap;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
}

.node-text .trailing-number {
    display: block;
    font-size: calc(1em - 4pt);
    line-height: 1.2;
    margin-top: 2px;
    opacity: 0.9;
}

.node-text[contenteditable="true"] {
    cursor: text;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    padding: 1px 4px;
    margin: -1px -4px;
}

.root-node .node-text {
    text-align: center;
}

/* Collapse toggle */
.collapse-toggle {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--slate-600);
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    z-index: 30;
}

.collapse-toggle:hover {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
    transform: scale(1.15);
}

.collapse-toggle svg {
    width: 12px;
    height: 12px;
    transition: transform var(--transition-normal);
}

.collapse-toggle.collapsed svg {
    transform: rotate(-90deg);
}

/* Radial Open Animation (Balanced & Elegant) */
@keyframes radial-ripple {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.6;
        border-width: 1.5px;
    }

    100% {
        transform: translate(-50%, -50%) scale(2.8);
        opacity: 0;
        border-width: 0.5px;
    }
}

.ripple-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid currentColor;
    pointer-events: none;
    z-index: 20;
    animation: radial-ripple 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Enhanced visibility in Dark Mode (Glass Theme) */
body.glass-theme .ripple-effect {
    filter: drop-shadow(0 0 6px currentColor) brightness(1.5);
}

/* Add button on hover */
.node-add-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-500);
    border: none;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    opacity: 0;
    transition: all var(--transition-fast);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    z-index: 30;
}

.mm-node:hover .node-add-btn {
    opacity: 1;
}

@media (hover: none) {
    .node-add-btn {
        opacity: 1;
        width: 24px;
        height: 24px;
    }

    .collapse-toggle {
        width: 26px;
        height: 26px;
    }
}

.node-add-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.4);
}

/* Branch color indicators (Matching admin-editor: full left border) */
.mm-node[data-color] {
    border-left: 4px solid var(--primary-500);
}

.mm-node[data-color="violet"] {
    border-left-color: var(--violet-500);
}

.mm-node[data-color="rose"] {
    border-left-color: var(--rose-500);
}

.mm-node[data-color="amber"] {
    border-left-color: var(--amber-500);
}

.mm-node[data-color="emerald"] {
    border-left-color: var(--emerald-500);
}

.mm-node[data-color="cyan"] {
    border-left-color: var(--cyan-500);
}

.mm-node[data-color="blue"] {
    border-left-color: #3b82f6;
}

.mm-node[data-color="pink"] {
    border-left-color: #ec4899;
}

.mm-node[data-color="orange"] {
    border-left-color: #f97316;
}

.mm-node[data-color="teal"] {
    border-left-color: #14b8a6;
}


/* SVG connection lines */
.connection {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    transition: opacity var(--transition-smooth);
}

.connection.fading {
    opacity: 0;
}

/* ============================================
   Context Menu
   ============================================ */
.context-menu {
    position: fixed;
    display: none;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    padding: 6px;
    z-index: 5000;
    animation: ctxAppear 0.15s ease-out;
}

@keyframes ctxAppear {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-4px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.context-menu.visible {
    display: block;
}

.ctx-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: none;
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    color: var(--slate-700);
    cursor: pointer;
    transition: background var(--transition-fast);
    text-align: left;
}

.ctx-item:hover {
    background: var(--primary-50);
    color: var(--primary-600);
}

.ctx-item.danger:hover {
    background: #fef2f2;
    color: var(--rose-500);
}

.ctx-divider {
    height: 1px;
    background: var(--slate-200);
    margin: 4px 8px;
}



/* ============================================
   Color Picker
   ============================================ */
.color-picker-popup {
    position: fixed;
    display: none;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(25px) saturate(160%);
    -webkit-backdrop-filter: blur(25px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    padding: 14px;
    z-index: 5000;
    animation: ctxAppear 0.15s ease-out;
}

.color-picker-popup.visible {
    display: block;
}

.color-picker-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.color-swatches {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.color-swatch:hover {
    transform: scale(1.2);
}

.color-swatch.active {
    border-color: var(--slate-800);
    box-shadow: 0 0 0 2px white, 0 0 0 4px var(--slate-400);
}

/* ============================================
   Toast Notification
   ============================================ */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    background: var(--slate-800);
    color: white;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition-normal);
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ============================================
   Zoom indicator
   ============================================ */

/* ============================================
   Scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 3px;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .tool-btn span {
        display: none;
    }

    .tool-btn {
        padding: 8px;
    }

    .toolbar {
        padding: 0 10px;
    }

    .logo-text {
        font-size: 15px;
    }

    .theme-toggle-container {
        right: auto !important;
        left: 20px !important;
    }

    .theme-toggle-btn {
        padding: 12px !important;
    }

    .theme-toggle-btn .toggle-text {
        display: none !important;
    }
}

/* ============================================
   Print
   ============================================ */
@media print {

    .toolbar,
    .context-menu,
    .color-picker-popup,
    .toast,
    .collapse-toggle,
    .node-add-btn {
        display: none !important;
    }

    .canvas-container {
        position: static;
        overflow: visible;
        background: white !important;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes nodeAppear {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes startupPopup {
    0% {
        opacity: 0;
        transform: scale(0.5) translateY(-20px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.mm-node.appearing {
    animation: nodeAppear 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mm-node.startup-animate {
    animation: startupPopup 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes pathStartup {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.5;
    }
}

.connection.startup-animate {
    animation: pathStartup 0.5s ease-out both;
}

/* User requested Pop-in Effect for text characters */
@keyframes pop-in {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    70% {
        transform: scale(1.1);
        /* Kurzes Überdehnen für den Bounce-Effekt */
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.char-pop {
    display: inline-block;
    white-space: pre;
    /* Erhält Leerzeichen */
    transform-origin: center;
    opacity: 0;
    animation: pop-in 0.2s ease-out forwards;
}

/* Children hide/show for collapse */
.mm-node.hidden-by-collapse {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: scale(0.6) !important;
    transition: opacity 0.25s, transform 0.25s !important;
}

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

    100% {
        background-position: 0% 0;
    }
}

/*
.shimmer-text {
    background-image: linear-gradient(90deg,
            #1b1b1b 0%,
            #1b1b1b 44%,
            #4f46e5 45%,
            #eef2ff 50%,
            #4f46e5 55%,
            #1b1b1b 65%,
            #1b1b1b 100%) !important;

    background-size: 300% 100% !important;

    background-clip: text !important;
    -webkit-background-clip: text !important;

    color: rgba(255, 255, 255, 0) !important;
    -webkit-text-fill-color: transparent !important;

    animation: shimmerPass 1.5s ease-out forwards !important;

    display: inline-block !important;
}
*/

/* ============================================
   Landing Page & Shared Header
   ============================================ */
body.landing-page {
    overflow-y: auto;
    /* Enable scrolling for landing page */
    background: #ffffff;
}

.landing-page main {
    display: block;
    /* Ensure main is block */
}

.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    height: 70px;
    /* Slightly taller than app toolbar */
    background: rgba(255, 255, 255, 0.4);
    /* Glassier effect */

    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.header-content {
    width: 100%;
    max-width: 1200px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    flex-shrink: 0;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-bar {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--slate-600);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: left center;
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(1) {
    transform: rotate(45deg);
    background-color: var(--primary-600);
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}

.mobile-menu-toggle.active .hamburger-bar:nth-child(3) {
    transform: rotate(-45deg);
    background-color: var(--primary-600);
}

/* Body lock when menu open */
body.menu-open {
    overflow: hidden !important;
}

@media (max-width: 900px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        padding: 100px 40px;
        gap: 32px;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        backdrop-filter: blur(10px);
        overflow-y: auto;
        /* Fallback for many menu items */
    }

    .main-nav.nav-open {
        right: 0;
    }

    .nav-link {
        font-size: 16px;
        width: 100%;
    }

    .nav-btn {
        width: 100%;
        text-align: center;
        padding: 12px 24px;
        font-size: 16px;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        border: none;
        background: var(--slate-50);
        margin-top: 10px;
        display: none;
        animation: none;
        padding: 10px;
        transform: none !important;
        left: 0 !important;
        right: 0 !important;
    }

    .dropdown-wrapper.open .dropdown-menu {
        display: flex;
    }

    .user-dropdown-wrapper .user-avatar-initial {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .user-name-span {
        display: block !important;
        /* Force show in mobile menu since it's a list now */
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 18px;
    }

    .header-content {
        padding: 0 16px;
    }
}

.nav-link {
    font-size: 16px;
    font-weight: 500;
    color: var(--slate-600);
    text-decoration: none;
    transition: color 0.15s;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-600);
}

.nav-btn {
    padding: 8px 16px;
    background: var(--slate-800);
    color: white;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.15s, background 0.15s;
}

.nav-btn:hover {
    background: var(--slate-900);
    transform: translateY(-1px);
}

/* Dropdown specific overrides for header */
.dropdown-wrapper {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 6px;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.1);
    padding: 6px;
    z-index: 1100;
    flex-direction: column;
    animation: dropdownFadeIn 0.15s ease;
}

.dropdown-wrapper.open .dropdown-menu {
    display: flex;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--slate-700);
    font-size: 16px;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    transition: background 0.1s, color 0.12s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-600);
}

.dropdown-item svg {
    color: var(--slate-400);
    transition: color 0.12s;
}

.dropdown-item:hover svg {
    color: var(--primary-600);
}

/* Hero Section */
.hero {
    position: relative;
    max-width: 100%;
    margin: 0;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 40vh;
    overflow: hidden;
}

#heroCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: auto;
}

.hero-content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(6px) saturate(180%);
    -webkit-backdrop-filter: blur(6px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    padding: 48px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}


.hero-content h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #1e293b, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 18px;
    line-height: 1.6;
    color: var(--slate-500);
    margin-bottom: 32px;
    max-width: 600px;
    /* Wider for centered text */
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.cta-btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cta-btn.primary {
    background: var(--grad-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.cta-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35);
}

.cta-btn.secondary {
    background: white;
    color: var(--slate-700);
    border: 1px solid var(--slate-200);
}

.cta-btn.secondary:hover {
    border-color: var(--slate-300);
    background: var(--slate-50);
}

/* Features */
.features {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-bottom: 100px;
}

/* Glassmorphism Feature Card */
.feature-card.neumorphic {
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px) saturate(180%);
    -webkit-backdrop-filter: blur(8px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 28px;
    cursor: pointer;
    text-align: left;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 5px 15px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    z-index: 1;
}

.feature-card.neumorphic::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 90px;
    opacity: 0.35;
    z-index: -1;
    pointer-events: none;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    clip-path: ellipse(140% 100% at 50% 0%);
}

.feature-card.neumorphic:hover::before {
    height: 110px;
    opacity: 0.45;
}

.card-purple::before {
    background-color: #ddd6fe;
    /* violet-200 */
}

.card-orange::before {
    background-color: #fed7aa;
    /* orange-200 */
}

.card-green::before {
    background-color: #bbf7d0;
    /* emerald-200 */
}

.card-blue::before {
    background-color: #bfdbfe;
    /* blue-200 */
}

.feature-card.neumorphic:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.18), 0 10px 25px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 0 24px 0;
    width: 68px;
    height: 68px;
    border-radius: 20px;
    color: white;
    transition: all 0.4s ease;
}

.feature-card.neumorphic:hover .feature-icon {
    color: white;
    transform: scale(1.1) rotate(5deg);
}

/* Gradients for Feature Icons */
.card-purple .feature-icon {
    background: linear-gradient(135deg, #a78bfa, var(--violet-600));
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.2);
}

.card-purple:hover .feature-icon {
    background: linear-gradient(135deg, #c4b5fd, var(--violet-500));
}

.card-orange .feature-icon {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.2);
}

.card-orange:hover .feature-icon {
    background: linear-gradient(135deg, #fcd34d, #fbbf24);
}

.card-green .feature-icon {
    background: linear-gradient(135deg, #93e942, #0ab118);
    box-shadow: 0 10px 20px rgba(10, 177, 24, 0.25);
}

.card-green:hover .feature-icon {
    background: linear-gradient(135deg, #aeff5e, #0ccb1c);
}

.card-blue .feature-icon {
    background: linear-gradient(135deg, #69c3ff, #0400e8);
    box-shadow: 0 10px 20px rgba(4, 0, 232, 0.25);
}

.card-blue:hover .feature-icon {
    background: linear-gradient(135deg, #8ad1ff, #0500ff);
}

.feature-card.neumorphic h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--slate-800);
    font-weight: 600;
}

.feature-card.neumorphic p {
    color: var(--slate-500);
    line-height: 1.5;
    font-size: 15px;
}

.feature-card.neumorphic.has-badge {
    position: relative;
}

.badge-soon {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--grad-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 12px;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Feature Modal */
.feature-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
    padding: 60px 0;
}

.feature-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.feature-modal-content {
    background: var(--slate-50);
    padding: 60px 50px;
    border-radius: 32px;
    max-width: 900px;
    width: 95%;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    position: relative;
    text-align: left;
    box-shadow: 12px 12px 24px rgba(0, 0, 0, 0.05), -12px -12px 24px rgba(255, 255, 255, 0.5);
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.feature-modal-overlay.active .feature-modal-content {
    transform: scale(1);
}

.feature-modal-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
    box-shadow: none !important;
    background: transparent !important;
}

.feature-modal-close {
    position: fixed;
    top: 30px;
    right: 40px;
    z-index: 10000;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    font-size: 28px;
    cursor: pointer;
    color: var(--slate-600);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.feature-modal-close:hover {
    background: white;
    transform: scale(1.1);
    color: var(--slate-900);
}

.feature-modal-close:hover {
    background: #e2e8f0;
    color: var(--slate-800);
}

.feature-modal-content h3 {
    font-size: 28px;
    color: var(--slate-900);
    margin-bottom: 24px;
    font-weight: 800;
}

@media (max-width: 768px) {
    .feature-modal-content {
        padding: 40px 24px;
    }

    .feature-modal-content .modal-flex-container {
        flex-direction: column !important;
        gap: 20px !important;
    }
}

.feature-modal-content p {
    color: var(--slate-600);
    font-size: 16px;
    line-height: 1.6;
}

/* Responsive Landing */
@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        margin-top: 40px;
        gap: 40px;
    }

    .hero-content {
        align-items: center;
        width: 90%;
        padding: 32px 20px;
    }

    .hero-content h1 {
        font-size: 36px;
        margin: 0 auto 20px;
    }

    .hero-sub {
        font-size: 16px;
        margin: 0 auto 24px;
    }

    .hero-actions {
        justify-content: center;
    }

    .features {
        grid-template-columns: repeat(2, 1fr);
        padding: 40px 24px;
        gap: 20px;
        margin-bottom: 20px;
    }

    .feature-card.neumorphic {
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto 24px auto;
    }
}

/* ============================================
   Auth & Pricing Pages (Added)
   ============================================ */

/* Auth Page */
.auth-page {
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    /* Ensure it stacks but centers content via margins or flex props */
    /* align-items: center;  <-- Removed to let margin: auto work */
    /* justify-content: center; <-- Removed to allow footer to stay at bottom */
    min-height: 100vh;
}

.auth-container {
    background: white;
    width: 100%;
    max-width: 400px;
    padding: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    text-align: center;
    margin: auto;
    /* Centers the container in the flex body */
}

.auth-header h1 {
    margin-top: 20px;
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-900);
}

.auth-header p {
    color: var(--slate-500);
    margin-bottom: 30px;
}

.auth-form {
    text-align: left;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 40px 0;
    color: var(--slate-400);
    font-size: 13px;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--slate-200);
}

.auth-divider span {
    padding: 0 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 11px;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    background: white;
    border: 1px solid var(--slate-200);
    color: var(--slate-700);
    margin: 10px 0 0 0;
    padding: 14px;
    font-weight: 600;
    width: 100%;
    transition: all 0.2s ease;
}

.google-btn svg {
    flex-shrink: 0;
}

.google-btn:hover {
    background: white;
    border-color: var(--slate-400);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-50);
}

.full-width {
    width: 100%;
    justify-content: center;
}

.auth-footer {
    margin-top: 24px;
    font-size: 14px;
    color: var(--slate-500);
}

.auth-footer a {
    color: var(--primary-600);
    text-decoration: none;
    font-weight: 500;
}

.error-msg {
    background: #fef2f2;
    color: #dc2626;
    padding: 10px;
    border-radius: var(--radius-md);
    font-size: 13px;
    margin-bottom: 20px;
    text-align: center;
}

/* Pricing Page */
.pricing-page {
    background: #fff;
    overflow-y: auto;
}

.pricing-hero {
    text-align: center;
    padding: 80px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.pricing-hero h1 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 16px;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-hero p {
    font-size: 18px;
    color: var(--slate-500);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto 80px;
    padding: 0 20px;
}

.pricing-card {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: 24px;
    padding: 32px;
    position: relative;
    transition: all 0.3s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-200);
}

.pricing-card.popular {
    border: 2px solid var(--primary-500);
    box-shadow: var(--shadow-lg);
}

.pricing-card .badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-500);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.pricing-card .card-header {
    text-align: center;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--slate-100);
    padding-bottom: 24px;
}

.pricing-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 10px;
}

.pricing-card.popular h3 {
    background: linear-gradient(135deg, #d4af37 0%, #f7ef8a 30%, #d4af37 50%, #cf9911 70%, #d4af37 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.pricing-card .price {
    font-size: 36px;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 8px;
}

.pricing-card .price .period {
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-500);
}

.features-list {
    list-style: none;
    margin-bottom: 32px;
    font-size: 15px;
    color: var(--slate-600);
}

.features-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-redirect {
    text-align: center;
    margin-bottom: 60px;
    padding: 20px;
    background: var(--slate-50);
}

/* Read-Only Mode */
/* Read-Only Mode */
/* Hide specific editing tools */
body.read-only #btnAddChild,
body.read-only #btnDelete,
body.read-only #btnImport,
body.read-only #btnExport,
body.read-only .node-add-btn,
body.read-only .context-menu {
    display: none !important;
}

/* Allow interaction with collapse toggles and canvas */
body.read-only .collapse-toggle {
    display: flex !important;
    cursor: pointer;
}

body.read-only .mm-node {
    cursor: default;
}

/* Prevent text selection in read-only mode (copy protection) */
body.read-only .node-text,
body.read-only .mm-node,
body.read-only #nodesLayer,
body.read-only #canvasContainer {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-osx-font-smoothing: grayscale;
    -ms-user-select: none !important;
}

/* Dashboard Styles */
.dashboard-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 100px 40px 80px 40px;
    /* Increased top padding to clear header */
    background-color: #f8fafc;
    background-image:
        radial-gradient(at 10% 10%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 90% 10%, rgba(20, 184, 166, 0.1) 0px, transparent 50%),
        radial-gradient(at 90% 90%, rgba(251, 113, 133, 0.1) 0px, transparent 50%),
        radial-gradient(at 10% 90%, rgba(139, 92, 246, 0.12) 0px, transparent 50%),
        radial-gradient(at 50% 50%, rgba(255, 255, 255, 0.5) 0px, transparent 80%) !important;
    background-size: cover;
    z-index: 100;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 48px;
    max-width: 600px;
}

.dashboard-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.dashboard-header p {
    font-size: 16px;
    color: var(--slate-500);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1200px;
    padding-bottom: 40px;
}

.grid-separator {
    grid-column: 1 / -1;
    height: 10px;
    /* Vertical gap between categories */
    margin-top: 10px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid rgb(255, 255, 255);
    border-radius: 16px;
    padding: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 160px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -5px rgba(0, 0, 0, 0.05);
}

.card-center-icon {
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.8;
    z-index: 1;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dashboard-card:hover .card-center-icon {
    transform: translate(-50%, -50%);
    opacity: 1.0;
}

/* Glass reflection shine */
.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
    z-index: 1;
}

.dashboard-card h3 {
    font-size: 14px;
    font-weight: 700;
    /* Bold text */
    color: #fff;
    background: var(--tile-color, var(--slate-500));
    height: 25%;
    /* Set to 25% height */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    position: relative;
    z-index: 2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--tile-color, var(--slate-500));
    transition: width 0.5s ease;
    z-index: 3;
}

.dashboard-card:hover::after {
    width: 100%;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 80px;
        /* Slightly less top padding on mobile */
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0 0 40px;
        /* Removed side padding from grid as container handles it */
    }

    .dashboard-card h3 {
        font-size: 12px;
    }
}

/* ============================================
   Profile Page
   ============================================ */
.profile-main {
    padding-top: 40px;
    padding-bottom: 60px;
    background-color: var(--slate-50);
    min-height: calc(100vh - 70px);
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.profile-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 30px;
    color: var(--slate-800);
}

.profile-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--slate-100);
    background: white;
}

.card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--slate-800);
    margin: 0;
}

.card-body {
    padding: 24px;
}

.profile-field {
    margin-bottom: 20px;
}

.profile-field label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--slate-500);
    margin-bottom: 6px;
}

.profile-field span,
.profile-field p {
    font-size: 16px;
    color: var(--slate-800);
    font-weight: 400;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge.success {
    background: #ecfdf5;
    color: #059669;
}

.btn-danger-outline {
    background: transparent;
    border: 1px solid var(--rose-400);
    color: var(--rose-500);
    padding: 8px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.btn-danger-outline:hover {
    background: #fff1f2;
    color: var(--rose-600);
}

/* ============================================
   Dropdown Menu for User
   ============================================ */
.user-dropdown-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 12px;
}

/* Reusing .dropdown-menu from templates if available, but defining specific here just in case */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    min-width: 200px;
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: all var(--transition-fast);
    transform-origin: top right;
}

.user-dropdown-wrapper.open .dropdown-menu,
.dropdown-wrapper.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--slate-700);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: background 0.15s;
    cursor: pointer;
    border: none;
    background: none;
    text-align: left;
}

.dropdown-item:hover {
    background: var(--slate-50);
    color: var(--primary-600);
}

.dropdown-divider {
    height: 1px;
    background: var(--slate-100);
    margin: 4px 0;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    transition: background 0.15s;
}

.user-dropdown-toggle:hover,
.user-dropdown-toggle.active {
    background: var(--slate-100);
}

.user-avatar-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--grad-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-name-span {
    font-size: 16px;
    font-weight: 500;
    color: var(--slate-700);
}

@media (max-width: 768px) {
    .user-name-span {
        display: none;
    }
}

/* ============================================
   Locked Tiles & Upgrade Modal
   ============================================ */

.dashboard-card.locked {
    cursor: not-allowed;
    position: relative;
    overflow: hidden;
}

.dashboard-card.locked .card-center-icon {
    filter: grayscale(1) blur(2px);
    /* Blur the main icon instead of text */
    opacity: 0.4;
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    /* Move to top */
    justify-content: flex-end;
    /* Wait, user said top left? Ah, user said "oben links". That is top-left. */
    justify-content: flex-start;
    /* Top left */
    padding: 12px;
    background: transparent;
    pointer-events: none;
    z-index: 10;
    color: var(--slate-600);
}

.lock-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    opacity: 0.8;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

/* Modal Content */
.modal-content {
    background: white;
    width: 90%;
    max-width: 480px;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    text-align: center;
    position: relative;
    transform: scale(0.95);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: all 0.2s;
    z-index: 10;
}

.modal-close svg {
    pointer-events: none;
}

.modal-close:hover {
    background: var(--slate-100);
    color: var(--slate-600);
}

.modal-icon {
    display: inline-flex;
    padding: 12px;
    background: var(--violet-50);
    color: var(--violet-600);
    border-radius: 50%;
    margin-bottom: 20px;
}

.modal-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 12px;
}

.modal-content p {
    color: var(--slate-600);
    margin-bottom: 24px;
    line-height: 1.5;
}

.btn-upgrade {
    display: inline-block;
    background: linear-gradient(135deg, var(--violet-600) 0%, var(--indigo-600) 100%);
    color: black;
    font-weight: 500;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-upgrade:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(99, 102, 241, 0.4);
}

/* ============================================
   Checkout Page
   ============================================ */
.checkout-page {
    background: linear-gradient(135deg, #eef2ff 0%, #f1f5f9 100%);
    min-height: 100vh;
}

.checkout-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.checkout-title {
    text-align: center;
    margin-bottom: 32px;
    color: var(--slate-800);
    font-size: 32px;
    font-weight: 700;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

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

.checkout-card {
    background: white;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--slate-100);
}

.checkout-card h2 {
    font-size: 20px;
    color: var(--slate-800);
    margin-bottom: 24px;
    font-weight: 600;
}

/* User Data Left Column */
.readonly-input {
    width: 100%;
    padding: 12px;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    color: var(--slate-500);
    font-size: 14px;
    margin-top: 6px;
    cursor: not-allowed;
}

.info-box {
    margin-top: 24px;
    padding: 16px;
    background: rgba(99, 102, 241, 0.08);
    /* Primary tint */
    border-radius: 12px;
    color: var(--primary-700);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Order Summary Right Column */
.package-selection {
    margin-bottom: 24px;
}

.package-select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--slate-300);
    border-radius: 12px;
    font-size: 15px;
    color: var(--slate-700);
    margin-top: 8px;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%2364748B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    appearance: none;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--slate-600);
    font-size: 15px;
}

.summary-line.small {
    font-size: 13px;
    color: var(--slate-400);
    margin-bottom: 16px;
}

.summary-total {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--slate-200);
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
}

.vat-note {
    text-align: right;
    font-size: 12px;
    color: var(--slate-400);
    margin-top: 4px;
}

.divider {
    border: 0;
    border-top: 1px solid var(--slate-100);
    margin: 24px 0;
}

.checkout-card h3 {
    font-size: 16px;
    color: var(--slate-700);
    margin-bottom: 16px;
    font-weight: 600;
}

/* Payment Status */
.payment-status {
    background: #d1fae5;
    color: #065f46;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    animation: fadeIn 0.4s ease;
}

.payment-status.hidden {
    display: none;
}

/* Confirm Button */
.btn-confirm-order {
    width: 100%;
    padding: 14px;
    background: var(--slate-200);
    color: var(--slate-400);
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: not-allowed;
    transition: all 0.2s;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-confirm-order.active {
    background: var(--primary-600);
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.2);
}

.btn-confirm-order.active:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--slate-500);
    background: rgba(255, 255, 255, 0.5);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner.hidden {
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Legal Pages & Footer
   ============================================ */
.legal-page {
    background: var(--slate-50);
    color: var(--slate-900);
}

.legal-container {
    max-width: 800px;
    margin: 120px auto 100px;
    padding: 0 24px;
    line-height: 1.6;
}

.legal-container h1 {
    font-size: 32px;
    margin-bottom: 40px;
    color: var(--slate-900);
}

.legal-container h2 {
    font-size: 20px;
    margin: 32px 0 16px;
    color: var(--slate-800);
}

.legal-container p {
    margin-bottom: 16px;
    color: var(--slate-600);
}

.legal-container a {
    color: var(--primary-600);
    text-decoration: none;
}

.legal-container a:hover {
    text-decoration: underline;
}

.legal-container ul {
    margin-bottom: 24px;
    padding-left: 24px;
    list-style-type: disc;
}

.legal-container li {
    margin-bottom: 12px;
    color: var(--slate-600);
}

.site-footer {
    padding: 40px 0;
    border-top: 1px solid var(--slate-200);
    background: white;
    margin-top: auto;
}

.footer-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-nav {
    display: flex;
    gap: 24px;
}

.footer-link {
    color: var(--slate-500);
    text-decoration: none;
    font-size: 14px;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--primary-600);
}

.copyright {
    color: var(--slate-400);
    font-size: 14px;
}

@media (max-width: 640px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}

/* ============================================
   Feature Tree Section (Animated)
   ============================================ */
/* ============================================
   Sticky Scroll Section
   ============================================ */
.sticky-scroll-section {
    padding: 100px 24px;
    background: #ffffff;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sticky-heading {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 60px;
    background: var(--grad-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: left;
    width: 100%;
}

.sticky-scroll-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sticky-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sticky-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 32px;
    padding: 48px 0;
    border-top: 1px solid var(--slate-200);
}

.row-title {
    flex: 0 0 35%;
    font-size: 28px;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 0;
    letter-spacing: -0.5px;
}

.row-desc {
    flex: 1;
    font-size: 18px;
    line-height: 1.7;
    color: var(--slate-600);
}

/* Blur Reveal Animation Classes */
.blur-reveal {
    filter: blur(20px);
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: filter, opacity, transform;
}

.blur-reveal.in-view {
    filter: blur(0);
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .sticky-scroll-section {
        padding: 80px 20px 60px;
    }

    .mac-graphic-section {
        padding: 20px 24px 100px;
    }

    .sticky-heading {
        font-size: 2rem;
        margin-bottom: 40px;
    }

    .sticky-row {
        flex-direction: column;
        gap: 16px;
        padding: 32px 0;
    }

    .row-title {
        flex: none;
    }
}

/* ============================================
   Mac Graphic Section
   ============================================ */
.mac-graphic-section {
    padding: 80px 24px;
}

.graphic-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
}

.graphic-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.scroll-graphic {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.graphic-text-container {
    max-width: 700px;
}

.mac-image {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: contain;
    display: block;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: scale(1);
    will-change: filter, opacity, transform;
    transition:
        opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
        transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.image-1 {
    position: relative;
    z-index: 1;
}

.image-2 {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    filter: blur(8px);
    z-index: 2;
    transform: scale(1.03);
    /* Overscale slightly when blurred to avoid edge artifacts */
}

.scroll-graphic.switched .image-1 {
    opacity: 0;
    filter: blur(8px);
    transform: scale(1.03);
}

.scroll-graphic.switched .image-2 {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
}

.mac-image:hover {
    transform: translateY(-5px);
}

.graphic-text-container {
    margin: 0 auto 20px;
}

.graphic-text-container h2 {
    font-size: 3rem;
    margin-bottom: 24px;
    background: var(--grad-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.graphic-text-container p {
    font-size: 1.25rem;
    line-height: 1.7;
    color: var(--slate-600);
}






/* ============================================
   Reviews Section
   ============================================ */
.reviews-section {
    padding: 100px 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    position: relative;
    overflow: hidden;
}

.reviews-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--slate-200), transparent);
}

.reviews-section h2 {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 60px;
    color: var(--slate-800);
    letter-spacing: -1px;
}

.reviews-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 32px;
    justify-content: center;
}

.review-card {
    flex: 1;
    max-width: 380px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 32px;
    border-radius: 28px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.7);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.review-card:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border-color: rgba(99, 102, 241, 0.2);
}

.review-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.user-avatar {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 20px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.review-card:hover .user-avatar {
    transform: rotate(0deg) scale(1.1);
}

.user-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-800);
}

.review-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
}

.review-text {
    font-size: 16px;
    line-height: 1.62;
    color: var(--slate-600);
    font-weight: 500;
    position: relative;
    padding-left: 20px;
}

.review-text::before {
    content: '“';
    position: absolute;
    left: 0;
    top: -5px;
    font-size: 40px;
    color: var(--primary-200);
    font-family: serif;
    line-height: 1;
}

.reviews-dots {
    display: none;
}

/* Mobile Responsive for Reviews */
@media (max-width: 768px) {
    .reviews-section {
        padding: 60px 20px;
    }

    .reviews-container {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 10px 0 40px;
        gap: 20px;
        justify-content: flex-start;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .reviews-container::-webkit-scrollbar {
        display: none;
    }

    .review-card {
        flex: 0 0 100%;
        scroll-snap-align: center;
        max-width: none;
        padding: 24px;
    }

    .reviews-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: -20px;
        padding-bottom: 30px;
    }

    .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--slate-300);
        transition: all 0.3s ease;
    }

    .dot.active {
        background: var(--slate-800);
        transform: scale(1.2);
    }
}

/* ============================================
   Law Modal / Paragraphs
   ============================================ */
.node-law-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    color: var(--slate-600);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    z-index: 30;
    line-height: 1;
    transition: all var(--transition-fast);
}

.node-law-btn:hover {
    background: var(--primary-500);
    border-color: var(--primary-500);
    color: white;
    transform: scale(1.15);
}

.law-modal-overlay {
    position: fixed;
    top: 90px;
    right: 20px;
    bottom: 20px;
    width: calc(33.333vw - 40px);
    min-width: 320px;
    height: calc(100vh - 110px);
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 9999;
    display: flex;
    align-items: stretch;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.law-modal-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: none;
}

.law-modal-content {
    pointer-events: auto;
    position: relative;
    background: rgba(255, 255, 255, 0.45);
    /* More transparent glass effect */
    backdrop-filter: blur(8px) saturate(160%);
    -webkit-backdrop-filter: blur(8px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    border-radius: var(--radius-xl);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateX(40px);
    transition: transform var(--transition-normal);
}

.law-modal-overlay.show .law-modal-content {
    transform: translateX(0);
}

@media (max-width: 768px) {
    .law-modal-overlay {
        width: calc(100vw - 40px);
    }
}

.law-modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--slate-200);
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-right: 50px;
}

.law-modal-header h3 {
    font-size: 18px;
    color: var(--slate-900);
    margin: 0;
    line-height: 1.4;
}

.law-modal-header a {
    font-size: 12px;
    color: var(--primary-600);
    text-decoration: none;
}

.law-modal-header a:hover {
    text-decoration: underline;
}

.law-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--slate-100);
    color: var(--slate-600);
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.law-modal-close:hover {
    background: var(--rose-500);
    color: white;
}

.law-modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 15px;
    color: var(--slate-800);
    line-height: 1.6;
}

.law-modal-body p {
    margin-bottom: 12px;
}

.law-modal-body p:last-child {
    margin-bottom: 0;
}

.law-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--slate-200);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============================================
   Glassmorphism Theme (User Request)
   ============================================ */

body.glass-theme {
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.2);
    --glass-blur: 24px;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
    --glass-text: #ffffff;

    /* Vibrant branch colors for Dark Mode */
    --vibrant-primary: #818cf8;
    --vibrant-violet: #a78bfa;
    --vibrant-rose: #fb7185;
    --vibrant-amber: #fbbf24;
    --vibrant-emerald: #34d399;
    --vibrant-cyan: #22d3ee;
    --vibrant-blue: #60a5fa;
    --vibrant-pink: #f472b6;
    --vibrant-orange: #fb923c;
    --vibrant-teal: #2dd4bf;

    background-color: #2F3A42 !important;
    /* Dark Blue-Grey Base */
    color: #f1f5f9;
}

/* Red/Blue-Icon Styles */
.style-red-icon {
    color: #f43f5e;
    font-size: 0.85em;
    margin-right: 2px;
    font-weight: 700;
}

.style-blue-icon {
    color: #3b82f6;
    font-size: 0.85em;
    margin-right: 2px;
    font-weight: 700;
}

body.glass-theme .style-red-icon {
    color: #ff4d6d !important;
    /* Very bright, clear red */
    text-shadow: none !important;
}

body.glass-theme .style-blue-icon {
    color: #bfdbfe !important;
    /* Even lighter sky blue for maximum visibility */
    text-shadow: none !important;
}

body.glass-theme .canvas-container {
    background-color: #2F3A42 !important;
    background-image:
        radial-gradient(at 0% 0%, rgba(203, 213, 225, 0.5) 0px, transparent 55%),
        /* Light Grey highlight */
        radial-gradient(at 100% 0%, rgba(90, 104, 110, 0.9) 0px, transparent 65%),
        /* #5A686E accent */
        radial-gradient(at 100% 100%, rgba(203, 213, 225, 0.25) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(47, 58, 66, 0.98) 0px, transparent 65%),
        /* #2F3A42 deep accent */
        radial-gradient(at 50% 50%, rgba(90, 104, 110, 0.5) 0px, transparent 80%),
        /* #5A686E core */
        radial-gradient(at 75% 25%, rgba(47, 58, 66, 0.8) 0px, transparent 60%) !important;
    background-size: cover !important;
}

body.glass-theme .mm-node {
    background: rgba(255, 255, 255, 0.18);
    /* Brighter nodes */
    backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    color: var(--glass-text);
}

body.glass-theme .mm-node:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px) scale(1.03);
}

body.glass-theme .mm-node.transparent-sibling {
    background: rgba(255, 255, 255, 0.05);
}

body.glass-theme .mm-node.transparent-sibling:hover {
    background: rgba(255, 255, 255, 0.18);
}

body.glass-theme .mm-node.selected {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3), var(--glass-shadow);
}

body.glass-theme .mm-node.root-node {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.4);
    /* White glow */
    font-weight: 700;
}

body.glass-theme .mm-node.root-node:hover {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 40px 0 rgba(99, 102, 241, 0.6);
}

body.glass-theme .node-text {
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

body.glass-theme .node-text b {
    color: #fff;
    font-weight: 700;
}

/* Branch color indicators (Matching admin-editor: full left border) in Glass Theme */
body.glass-theme .mm-node[data-color] {
    border-left: 4px solid var(--vibrant-primary);
}

body.glass-theme .mm-node[data-color="violet"] {
    border-left-color: var(--vibrant-violet);
}

body.glass-theme .mm-node[data-color="rose"] {
    border-left-color: var(--vibrant-rose);
}

body.glass-theme .mm-node[data-color="amber"] {
    border-left-color: var(--vibrant-amber);
}

body.glass-theme .mm-node[data-color="emerald"] {
    border-left-color: var(--vibrant-emerald);
}

body.glass-theme .mm-node[data-color="cyan"] {
    border-left-color: var(--vibrant-cyan);
}

body.glass-theme .mm-node[data-color="blue"] {
    border-left-color: var(--vibrant-blue);
}

body.glass-theme .mm-node[data-color="pink"] {
    border-left-color: var(--vibrant-pink);
}

body.glass-theme .mm-node[data-color="orange"] {
    border-left-color: var(--vibrant-orange);
}

body.glass-theme .mm-node[data-color="teal"] {
    border-left-color: var(--vibrant-teal);
}


/* Connection styling in Glass Theme */
body.glass-theme .connection {
    stroke-width: 3;
    stroke-opacity: 0.8 !important;
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.2));
}

body.glass-theme .conn-primary {
    stroke: var(--vibrant-primary) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-primary));
}

body.glass-theme .conn-violet {
    stroke: var(--vibrant-violet) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-violet));
}

body.glass-theme .conn-rose {
    stroke: var(--vibrant-rose) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-rose));
}

body.glass-theme .conn-amber {
    stroke: var(--vibrant-amber) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-amber));
}

body.glass-theme .conn-emerald {
    stroke: var(--vibrant-emerald) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-emerald));
}

body.glass-theme .conn-cyan {
    stroke: var(--vibrant-cyan) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-cyan));
}

body.glass-theme .conn-blue {
    stroke: var(--vibrant-blue) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-blue));
}

body.glass-theme .conn-pink {
    stroke: var(--vibrant-pink) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-pink));
}

body.glass-theme .conn-orange {
    stroke: var(--vibrant-orange) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-orange));
}

body.glass-theme .conn-teal {
    stroke: var(--vibrant-teal) !important;
    filter: drop-shadow(0 0 6px var(--vibrant-teal));
}

/* Toggle Button Styling */
.theme-toggle-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 99px;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: #fff;
}

.theme-toggle-btn .toggle-icon {
    font-size: 18px;
    transition: transform 0.5s ease;
}

.theme-toggle-btn:hover .toggle-icon {
    transform: rotate(20deg) scale(1.2);
}

body.glass-theme .theme-toggle-btn {
    background: rgba(15, 23, 42, 0.4);
    /* Consistent with dark header */
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.glass-theme .theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* UI Adjustments for Glass Theme */
body.glass-theme .mindmap-toolbar {
    background: rgba(15, 23, 42, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

body.glass-theme .mindmap-toolbar .tool-btn {
    color: rgba(255, 255, 255, 0.7) !important;
}

body.glass-theme .mindmap-toolbar .tool-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

body.glass-theme .mindmap-toolbar .toolbar-divider {
    background: rgba(255, 255, 255, 0.1) !important;
}

body.glass-theme .collapse-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

body.glass-theme .collapse-toggle:hover {
    background: var(--vibrant-primary) !important;
    border-color: var(--vibrant-primary) !important;
}

body.glass-theme .node-add-btn {
    background: var(--vibrant-primary) !important;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5) !important;
}

body.glass-theme .node-law-btn {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(4px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}


/* Context Menu in Glass Theme */
body.glass-theme .context-menu,
body.glass-theme .color-picker-popup {
    background: rgba(30, 41, 59, 0.8) !important;
    backdrop-filter: blur(25px) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6) !important;
}

body.glass-theme .ctx-item {
    color: rgba(255, 255, 255, 0.8) !important;
}

body.glass-theme .ctx-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

body.glass-theme .ctx-divider {
    background: rgba(255, 255, 255, 0.1) !important;
}

body.glass-theme .color-picker-title {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Glassmorphism Law Modal */
body.glass-theme .law-modal-overlay {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: transparent !important;
}

body.glass-theme .law-modal-content {
    background: rgba(255, 255, 255, 0.08) !important;
    /* Even more transparent in dark glass mode */
    backdrop-filter: blur(30px) saturate(180%) !important;
    /* Extreme local blur for readability */
    -webkit-backdrop-filter: blur(30px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
}

body.glass-theme .law-modal-header h3 {
    color: #fff !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.glass-theme .law-modal-header a {
    color: var(--vibrant-primary) !important;
}

body.glass-theme .law-modal-close {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
    backdrop-filter: blur(8px) !important;
    opacity: 1 !important;
}

body.glass-theme .law-modal-close:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    transform: scale(1.1);
}

body.glass-theme .law-modal-body p {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

body.glass-theme .site-header {
    background: rgba(15, 23, 42, 0.4) !important;
    /* Perfect glass-like contrast */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.glass-theme .nav-link,
body.glass-theme .logo-text,
body.glass-theme .user-name-span,
body.glass-theme .mobile-menu-toggle .hamburger-bar {
    color: rgba(255, 255, 255, 0.95) !important;
}

body.glass-theme .mobile-menu-toggle .hamburger-bar {
    background-color: rgba(255, 255, 255, 0.95) !important;
}

body.glass-theme .collapse-toggle,
body.glass-theme .node-law-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

/* ============================================
   About Page Redesign
   ============================================ */
.about-hero-section {
    padding: 80px 0 20px 0;
}

.about-hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-hero-text h1 {
    font-size: 48px;
    font-weight: 850;
    line-height: 1.2;
    letter-spacing: -1.5px;
    margin-bottom: 28px;
    padding-top: 20px;
    background: linear-gradient(135deg, #0f172a, #334155);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-hero-text .hero-sub {
    font-size: 22px;
    color: var(--slate-500);
    max-width: 100%;
}

.about-hero-image {
    position: relative;
}



.about-hero-image img {
    width: 100%;
    height: auto;
    display: block;
}

.faq-container {
    max-width: 1200px;
    margin: 0 auto 100px;
    padding: 0 40px;
}

.faq-item {
    margin-bottom: 20px;
    border-radius: 20px;
    background: #fff;
    border: 1px solid var(--slate-100);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    width: 100%;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-200);
}

.faq-details {
    width: 100%;
}

.faq-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    color: var(--slate-800);
    list-style: none;
    user-select: none;
    gap: 16px;
}

.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-50);
    border-radius: 50%;
    color: var(--primary-600);
    transition: transform 0.3s ease;
    font-size: 24px;
    padding-bottom: 3px;
}

.faq-details[open] .faq-icon {
    transform: rotate(135deg);
    background: var(--primary-500);
    color: #fff;
}

.faq-content {
    padding: 0 32px 32px;
    font-size: 17px;
    line-height: 1.8;
    color: var(--slate-600);
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 968px) {
    .about-hero-container {
        grid-template-columns: 1fr;
        gap: 60px;
        text-align: center;
        padding: 0 24px;
    }

    .about-hero-text h1 {
        font-size: 48px;
    }

    .about-hero-image {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* ============================================
   Custom Highlights
   ============================================ */
.hm-highlight {
    background: linear-gradient(135deg, #cca664, #fcd34d, #feed89, #cca664, #fcd34d);
    background-size: 400%;
    animation: text-gradient 2s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    color: transparent;
    /* Extra safety */
    font-weight: 700;
    text-shadow: none !important;
    display: inline-block;
}

@keyframes text-gradient {
    0% {
        background-position: 100% 50%;
    }

    30% {
        background-position: 0% 50%;
    }

    70% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}