.canvas-container {
    flex: 1;
    position: relative;
    background-image: 
        radial-gradient(rgba(255, 255, 255, 0.05) 1.5px, transparent 1.5px);
    background-size: 30px 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #0d1117;
}

.canvas-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#main-canvas {
    display: block;
    cursor: crosshair;
}

/* Rulers */
.ruler {
    position: absolute;
    background: #2b313a;
    color: #8b949e;
    font-size: 9px;
    font-family: 'Fira Code', monospace;
    pointer-events: none;
    z-index: 10;
}

.h-ruler {
    top: -20px; left: 0; right: 0;
    height: 20px;
    border-bottom: 1px solid var(--border-color);
}

.v-ruler {
    top: 0; left: -20px; bottom: 0;
    width: 20px;
    border-right: 1px solid var(--border-color);
}

.ruler-corner {
    position: absolute;
    top: -20px; left: -20px;
    width: 20px; height: 20px;
    background: #21262d;
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    z-index: 11;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: calc(var(--timeline-offset) + 20px);
    right: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    z-index: 1000;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.zoom-btn {
    width: 28px; height: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.zoom-info.clickable-zoom {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s;
}

.zoom-info.clickable-zoom:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

.zoom-divider {
    width: 1px; height: 18px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 4px;
}

/* Layers Popup */
.layers-popup {
    position: absolute;
    bottom: calc(var(--timeline-offset) + 60px);
    right: 24px;
    width: 280px;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
    z-index: 2000;
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.19, 1, 0.22, 1);
}

.layers-popup.hidden {
    display: none;
    opacity: 0;
    transform: scale(0.9) translateY(10px);
}

.layers-panel-container {
    max-height: 350px;
}
