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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a365d 100%);
    color: #e2e8f0;
    min-height: 100vh;
}

.header {
    background: linear-gradient(90deg, #1a365d 0%, #2d3748 100%);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #00ff88;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header h1 {
    font-size: 2rem;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.berrry-link a {
    color: #00ff88;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.berrry-link a:hover {
    color: #ffffff;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    gap: 2rem;
    min-height: calc(100vh - 200px);
}

.left-panel, .right-panel {
    background: rgba(26, 54, 93, 0.3);
    border: 1px solid #00ff88;
    border-radius: 10px;
    padding: 1.5rem;
    width: 250px;
    backdrop-filter: blur(10px);
}

.left-panel h3, .right-panel h3 {
    color: #00ff88;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    border-bottom: 1px solid #00ff88;
    padding-bottom: 0.5rem;
}

.tool-btn {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(45, 55, 72, 0.8);
    border: 1px solid #4a5568;
    border-radius: 5px;
    color: #e2e8f0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tool-btn:hover {
    background: rgba(0, 255, 136, 0.2);
    border-color: #00ff88;
    transform: translateY(-1px);
}

.tool-btn.active {
    background: #00ff88;
    color: #0a0a0a;
    font-weight: bold;
}

.effects-section {
    margin-top: 2rem;
}

.effects-section h4 {
    color: #00ff88;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.effects-section label {
    display: block;
    margin-bottom: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.effects-section input[type="checkbox"] {
    margin-right: 0.5rem;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.canvas-container {
    position: relative;
    border: 3px solid #00ff88;
    border-radius: 10px;
    background: #000;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    overflow: hidden;
}

#canvas, #overlay {
    display: block;
    background: transparent;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: #00ff88;
    padding: 1rem 2rem;
    border-radius: 5px;
    display: none;
    z-index: 100;
}

.status-bar {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: rgba(26, 54, 93, 0.5);
    border: 1px solid #00ff88;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 800px;
    backdrop-filter: blur(5px);
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #00ff88;
    font-size: 0.9rem;
    font-weight: 500;
}

.control-group input[type="range"] {
    width: 100%;
    height: 6px;
    background: #2d3748;
    outline: none;
    border-radius: 3px;
    appearance: none;
}

.control-group input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.control-group input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #00ff88;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.control-group select {
    width: 100%;
    padding: 0.5rem;
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 5px;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.control-group input[type="file"] {
    width: 100%;
    padding: 0.5rem;
    background: #2d3748;
    border: 1px solid #4a5568;
    border-radius: 5px;
    color: #e2e8f0;
    font-size: 0.9rem;
}

.reset-btn {
    width: 100%;
    padding: 0.75rem;
    background: #ff6b35;
    border: none;
    border-radius: 5px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #e55a2b;
    transform: translateY(-1px);
}

.footer {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid #00ff88;
    background: rgba(26, 54, 93, 0.2);
    font-size: 0.9rem;
}

.footer a {
    color: #00ff88;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 1200px) {
    .container {
        flex-direction: column;
        align-items: center;
    }
    
    .left-panel, .right-panel {
        width: 100%;
        max-width: 800px;
        margin-bottom: 1rem;
    }
    
    .canvas-container {
        width: 100%;
        max-width: 800px;
    }
    
    #canvas, #overlay {
        width: 100%;
        height: auto;
    }
    
    .status-bar {
        width: 100%;
        max-width: 800px;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .canvas-container {
        width: 100vw;
        max-width: calc(100vw - 2rem);
    }
    
    #canvas, #overlay {
        max-width: 100%;
    }
}

/* Animations */
@keyframes pulse {
    0% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.3); }
    50% { box-shadow: 0 0 30px rgba(0, 255, 136, 0.6); }
    100% { box-shadow: 0 0 20px rgba(0, 255, 136, 0.3); }
}

.canvas-container {
    animation: pulse 3s infinite;
}

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

::-webkit-scrollbar-track {
    background: #1a365d;
}

::-webkit-scrollbar-thumb {
    background: #00ff88;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00cc6a;
}