.animation-panel {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2a2a2a;
    border-top: 1px solid #3a3a3a;
    padding: 10px 15px;
    z-index: 99;
    display: none;
    padding-bottom: 50px;
    max-height: 200px;
    overflow-y: auto;
}

.animation-panel.open {
    display: block;
    user-select: none;
    -moz-user-select: none;
}

.anim-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.anim-btn {
    padding: 6px 10px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    color: #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.anim-btn:hover {
    background: #4a4a4a;
}

.anim-btn.active {
    background: #0066cc;
    border-color: #0066cc;
}

#recordBtn.active {
    background: #cc0000;
    border-color: #cc0000;
    animation: pulse 1s infinite;
}


#playBtn.active {
    background: #0066cc;
    border-color: #0066cc;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.anim-label {
    font-size: 11px;
    color: #b0b0b0;
    margin: 0 2px;
}

.anim-input {
    width: 50px;
    padding: 4px 6px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    color: #e0e0e0;
    border-radius: 4px;
    font-size: 11px;
    text-align: center;
}

.anim-input:focus {
    outline: none;
    border-color: #0066cc;
}

.anim-select {
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    color: #e0e0e0;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    min-width: 100px;
}

.anim-select:focus {
    outline: none;
    border-color: #0066cc;
}

.timeline-container {
    width: 100%;
    overflow-x: auto;
    background: #1a1a1a;
    border-radius: 4px;
    padding: 8px;
    border: 1px solid #3a3a3a;
}

.timeline {
    display: flex;
    gap: 2px;
    min-width: max-content;
    align-items: center;
}

.frame {
    width: 35px;
    height: 25px;
    background: #3a3a3a;
    border: 1px solid #4a4a4a;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    flex-shrink: 0;
}

.frame:hover {
    background: #4a4a4a;
}

.frame.active {
    background: #0066cc;
    border-color: #0077dd;
    color: white;
}



.layer-item.animated {
    border-left: 3px solid #0066cc;
    padding-left: 5px;
}

.animation-mode .canvas-container {
    border: 2px solid #0066cc;
}

.animation-recording .canvas-container {
    border: 2px solid #cc0000;
}

/* Mobile responsive */
@media (max-width: 700px) {
    .anim-controls {
        gap: 6px;
    }
    
    .anim-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    .anim-input {
        width: 40px;
    }
    
    .frame {
        width: 30px;
        height: 22px;
        font-size: 9px;
    }
}

.toggle-bottom {
    top: auto;
    bottom: 0 !important;
    margin: 0;
    z-index: 1001;
    position: fixed;
    left: 0 !important;
    writing-mode: horizontal-tb;
    transform: none;
}

.frame.has-keyframe::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #00ff00;
    border-radius: 50%;
}

.frame.jump-keyframe::after {
    background: #ff9500;
    border-radius: 2px;
}


.animation-height-panel {
    padding-bottom: 200px;
    border-bottom: none !important;
}
