@import url('https://fonts.googleapis.com/css2?family=VT323&family=Orbitron:wght@400;700&display=swap');

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

body {
    font-family: 'VT323', monospace;
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    color: #333;
    overflow: hidden;
    height: 100vh;
}

/* Header Styles */
.header {
    background: linear-gradient(90deg, #FF6B6B, #9B59B6, #2ECC71);
    color: white;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    border-bottom: 2px solid #ccc;
    box-shadow: inset -1px -1px 1px rgba(0,0,0,0.2);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 24px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

.vintage-badge {
    background: rgba(255,255,255,0.2);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid rgba(255,255,255,0.3);
}

.menu-bar {
    display: flex;
    gap: 20px;
    margin-left: 40px;
}

.menu-item {
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 14px;
}

.menu-item:hover {
    background: rgba(255,255,255,0.2);
}

/* Main Content Layout */
.main-content {
    display: flex;
    height: calc(100vh - 140px);
}

/* Left Toolbar */
.left-toolbar {
    width: 80px;
    background: #f0f0f0;
    border-right: 2px inset #ddd;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tool-palette {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.tool-btn {
    width: 32px;
    height: 32px;
    border: 1px outset #ccc;
    background: #f8f8f8;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.1s;
}

.tool-btn:hover {
    background: #e8e8e8;
}

.tool-btn.active {
    border: 1px inset #ccc;
    background: #FF6B6B;
    color: white;
}

.color-controls {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.color-square {
    width: 24px;
    height: 24px;
    border: 1px solid #333;
    cursor: pointer;
}

.color-palette {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2px;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border: 1px solid #999;
    cursor: pointer;
}

.color-swatch:hover {
    border: 2px solid #333;
}

/* Canvas Area */
.canvas-container {
    flex: 1;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.canvas-toolbar {
    background: #f0f0f0;
    padding: 8px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
}

.zoom-control {
    padding: 4px;
    border: 1px inset #ccc;
    background: white;
}

.playback-controls {
    display: flex;
    gap: 4px;
}

.control-btn {
    width: 32px;
    height: 24px;
    border: 1px outset #ccc;
    background: #f8f8f8;
    cursor: pointer;
    font-size: 12px;
}

.control-btn:hover {
    background: #e8e8e8;
}

.control-btn:active {
    border: 1px inset #ccc;
}

.grid-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.canvas-wrapper {
    flex: 1;
    position: relative;
    overflow: auto;
    background: #ffffff;
}

#canvas {
    border: 1px solid #ddd;
    transform-origin: top left;
}

.berry-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Right Panel */
.right-panel {
    width: 200px;
    background: #f0f0f0;
    border-left: 2px inset #ddd;
    padding: 8px;
    overflow-y: auto;
}

.panel-section {
    margin-bottom: 16px;
    padding: 8px;
    border: 1px inset #ddd;
    background: #f8f8f8;
}

.panel-section h3 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #9B59B6;
}

.property-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.property-group label {
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.property-group input {
    width: 60px;
    padding: 2px;
    border: 1px inset #ccc;
    font-size: 11px;
}

.effects-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.effect-btn {
    padding: 6px;
    border: 1px outset #ccc;
    background: linear-gradient(180deg, #FF6B6B, #FF5252);
    color: white;
    cursor: pointer;
    font-size: 11px;
    text-align: center;
}

.effect-btn:hover {
    background: linear-gradient(180deg, #FF5252, #FF6B6B);
}

.animation-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.animation-controls label {
    font-size: 12px;
}

.animation-controls select {
    width: 100%;
    padding: 4px;
    border: 1px inset #ccc;
    font-size: 11px;
}

.anim-btn {
    padding: 6px;
    border: 1px outset #ccc;
    background: #2ECC71;
    color: white;
    cursor: pointer;
    font-size: 11px;
}

.anim-btn:hover {
    background: #27AE60;
}

/* Timeline Panel */
.timeline-panel {
    height: 120px;
    background: #f0f0f0;
    border-top: 2px inset #ddd;
    display: flex;
    flex-direction: column;
}

.timeline-header {
    padding: 8px;
    background: #e8e8e8;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
}

.fps-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fps-control input {
    width: 80px;
}

.timeline-controls {
    display: flex;
    gap: 8px;
    align-items: center;
}

.timeline-controls button {
    padding: 4px 8px;
    border: 1px outset #ccc;
    background: #f8f8f8;
    cursor: pointer;
    font-size: 11px;
}

.timeline-content {
    flex: 1;
    display: flex;
}

.layers-panel {
    width: 150px;
    border-right: 1px solid #ddd;
    background: #f8f8f8;
}

.layer-item {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    cursor: pointer;
}

.layer-item.active {
    background: #FF6B6B;
    color: white;
}

.layer-controls {
    display: flex;
    gap: 4px;
}

.layer-toggle, .layer-lock {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
}

.frames-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.frame-numbers {
    height: 20px;
    display: flex;
    background: #e8e8e8;
    border-bottom: 1px solid #ddd;
}

.frame-number {
    width: 60px;
    text-align: center;
    font-size: 10px;
    padding: 4px;
    border-right: 1px solid #ddd;
}

.timeline-track {
    flex: 1;
    display: flex;
}

.frame-cell {
    width: 60px;
    height: 100%;
    border-right: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
    background: #fff;
}

.frame-cell.active {
    background: #FFE0E0;
    box-shadow: inset 0 0 0 2px #FF6B6B;
}

.frame-cell:hover {
    background: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .left-toolbar {
        width: 60px;
    }
    
    .right-panel {
        width: 180px;
    }
    
    .tool-palette {
        grid-template-columns: 1fr;
    }
    
    .color-palette {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }
    
    .left-toolbar {
        width: 100%;
        height: 60px;
        flex-direction: row;
        overflow-x: auto;
    }
    
    .tool-palette {
        display: flex;
        gap: 4px;
    }
    
    .right-panel {
        width: 100%;
        height: 150px;
        overflow-y: auto;
    }
    
    .timeline-panel {
        height: 100px;
    }
    
    #canvas {
        width: 100%;
        height: auto;
    }
}

/* Animations */
@keyframes berry-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.logo {
    animation: berry-bounce 2s infinite;
}

.effect-btn:active {
    animation: berry-bounce 0.5s ease-out;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f0f0f0;
}

::-webkit-scrollbar-thumb {
    background: #9B59B6;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8E44AD;
}