:root {
    --bg-primary: #0a0a0f;
    --bg-panel: #12121a;
    --bg-panel-hover: #1a1a28;
    --border: #2a2a3a;
    --text-primary: #e0e0e8;
    --text-secondary: #6a6a80;
    --accent: #4491e8;
}
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 11px;
}
#app {
    display: flex;
    width: 100vw;
    height: 100vh;
}
#toolbar {
    width: 52px;
    min-width: 52px;
    height: 100%;
    background: var(--bg-panel);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 10;
}

#toolbar::-webkit-scrollbar {
  width: 0;
}

.tool-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 5px 0;
    border-bottom: 1px solid var(--border);
}

.tool-section:last-child {
    border-bottom: none;
}

.tool-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 1px 0;
    position: relative;
    transition: background 0.12s, color 0.12s;
    font-size: 16px;
    flex-shrink: 0;
}

.tool-btn:hover {
    background: var(--bg-panel-hover);
    color: var(--accent);
}

.tool-btn.active {
    background: rgba(68, 145, 232, 0.13);
    color: var(--accent);
}

.tool-btn svg {
    width: 20px;
    height: 20px;
    fill:none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    
}

.tool-btn::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-panel-hover);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 5px;
    white-space: nowrap;
    font-size: 11px;
    font-family: system-ui, -apple-system, sans-serif;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s;
    z-index: 100;
}

.tool-btn:hover::after {
    opacity: 1;
}

#canvas-area {
    flex: 1;
    position: relative;
    overflow: hidden; 
}
#canvas {
    display: block;
    width: 100%;
    height: 100%;
    cursor: default;
}

#properties-panel {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    min-width: 160px;
    max-width: 210px;
    display: none;
    z-index: 20;
    box-shadow: 0 3px 18px rgba(0,0,0,0.45);
    font-family: monospace;
}

.prop-title {
    color: var(--accent);
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 7px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border);
}

.prop-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
    color: var(--text-secondary);
    font-size: 10px;
}

.prop-row span:last-child {
    color: var(--text-primary);
}

.prop-hint {
    margin-top: 7px;
    padding-top: 5px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 9px;
    line-height: 1.5;
}

#help-hint {
    position: absolute;
    top: 12px;
    right: 14px;
    color: #3a3a50;
    font-size: 10px;
    line-height: 1.6;
    pointer-events: none;
    text-align: right;
}