:root {
    --bg: #f5f5f5;
    --bg-secondary: #ffffff;
    --surface: #ffffff;
    --text: #000000;
    --text-primary: #000000;
    --text-secondary: #666666;
    --accent: #000000;
    --accent-hover: #333333;
    --border: #000000;
    --shadow-light: #ffffff;
    --shadow-dark: #000000;
    --node-bg: #ffffff;
    --node-border: #000000;
    --node-text: #000000;
    --node-shadow: rgba(0,0,0,0.3);
    --line: #000000;
}

html.dark {
    --bg: #1a1a1a;
    --bg-secondary: #000000;
    --surface: #000000;
    --text: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent: #ffffff;
    --accent-hover: #cccccc;
    --border: #ffffff;
    --shadow-light: #333333;
    --shadow-dark: #000000;
    --node-bg: #000000;
    --node-border: #ffffff;
    --node-text: #ffffff;
    --node-shadow: rgba(255,255,255,0.3);
    --line: #ffffff;
}

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

/* Hide scrollbars globally */
* { scrollbar-width: none; -ms-overflow-style: none; }
*::-webkit-scrollbar { display: none; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: var(--bg-secondary);
    padding: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--border);
    box-shadow: 4px 4px 0 var(--shadow-dark);
}

.btn {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--border);
    border-radius: 0;
    background: var(--bg-secondary);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 4px 4px 0 var(--shadow-dark);
    transition: all 0.1s;
}

.btn:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow-dark); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow-dark); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--bg-secondary); }
.btn-secondary { background: var(--bg-secondary); }

.toolbar {
    background: var(--bg-secondary);
    padding: 0.5rem;
    border: 3px solid var(--border);
    border-radius: 0;
    box-shadow: 4px 4px 0 var(--shadow-dark);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.divider { width: 2px; height: 1.5rem; background: var(--border); }

#zoomIndicator { min-width: 4rem; text-align: center; font-weight: 600; color: var(--text); }

#context-menu {
    background: var(--bg-secondary);
    border: 3px solid var(--border);
    border-radius: 0;
    box-shadow: 6px 6px 0 var(--shadow-dark);
    padding: 0.5rem;
}

#context-menu li {
    list-style: none;
    padding: 0.75rem 1rem;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0;
    transition: all 0.1s;
}

#context-menu li:hover { background: var(--accent); color: var(--bg-secondary); border-color: var(--border); }

#node-editor {
    background: var(--bg-secondary);
    color: var(--text);
    border: 3px solid var(--border);
    border-radius: 0;
    box-shadow: inset 2px 2px 0 var(--shadow-dark);
    font-family: inherit;
}

#cloudModal > div {
    background: var(--bg-secondary);
    border: 4px solid var(--border);
    border-radius: 0;
    box-shadow: 8px 8px 0 var(--shadow-dark);
}

input[type="text"] {
    background: var(--bg-secondary);
    color: var(--text);
    border: 3px solid var(--border);
    border-radius: 0;
    padding: 0.75rem;
    box-shadow: inset 2px 2px 0 var(--shadow-dark);
    outline: none;
}

button:not(.btn) {
    background: var(--bg-secondary);
    color: var(--text);
    border: 3px solid var(--border);
    border-radius: 0;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    box-shadow: 4px 4px 0 var(--shadow-dark);
    transition: all 0.1s;
}

button:not(.btn):hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow-dark); }
button:not(.btn):active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow-dark); }

#notification {
    background: var(--bg-secondary);
    border: 3px solid var(--border);
    border-radius: 0;
    box-shadow: 6px 6px 0 var(--shadow-dark);
}

.mindmap-item { border: 2px solid transparent; border-radius: 0; transition: all 0.1s; padding: 0.5rem; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.mindmap-item:hover { border-color: var(--border); background: var(--bg); }
.mindmap-item.selected { background: var(--accent) !important; color: var(--bg-secondary) !important; border-color: var(--border) !important; }

#mindmapsList {
    background: var(--bg-secondary);
    border: 3px solid var(--border);
    border-radius: 0;
    box-shadow: inset 2px 2px 0 var(--shadow-dark);
    overflow-y: auto;
}

.hidden { display: none !important; }
svg { width: 1.25rem; height: 1.25rem; }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.h-screen { height: 100vh; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-1 { gap: 0.25rem; }
.absolute { position: absolute; }
.left-1\/2 { left: 50%; }
.-translate-x-1\/2 { transform: translateX(-50%); }
.p-2 { padding: 0.5rem; }
.p-1 { padding: 0.25rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.text-2xl { font-size: 1.5rem; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 0.875rem; }
.w-16 { width: 4rem; }
.text-center { text-align: center; }
.flex-1 { flex: 1; }
.relative { position: relative; }


.z-30 { z-index: 30; }
.w-48 { width: 12rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.cursor-pointer { cursor: pointer; }
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-50 { z-index: 50; }
.justify-center { justify-content: center; }
.p-6 { padding: 1.5rem; }
.w-96 { width: 24rem; }
.max-w-md { max-width: 28rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.text-lg { font-size: 1.125rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.block { display: block; }
.font-medium { font-weight: 500; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.w-full { width: 100%; }
.max-h-48 { max-height: 12rem; }
.overflow-y-auto { overflow-y: auto; }
.justify-end { justify-content: flex-end; }
.bottom-4 { bottom: 1rem; }
.right-4 { right: 1rem; }
.p-4 { padding: 1rem; }
.translate-y-20 { transform: translateY(5rem); }
.translate-y-0 { transform: translateY(0); }
.items-start { align-items: flex-start; }
.mr-3 { margin-right: 0.75rem; }
.mt-0\.5 { margin-top: 0.125rem; }
.ml-2 { margin-left: 0.5rem; }
.text-xs { font-size: 0.75rem; }
