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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #000;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

#gradient-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

.controls {
    position: fixed;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.top-left {
    top: 20px;
    left: 20px;
    display: flex;
    gap: 8px;
}

.advanced-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: none;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(20px);
    z-index: 15;
}

.advanced-toggle:hover {
    background: rgba(0, 0, 0, 0.9);
}

.toggle-icon {
    transition: transform 0.3s ease;
}

.advanced-toggle.active .toggle-icon {
    transform: rotate(180deg);
}

.top-right {
    top: 20px;
    right: 20px;
    width: 280px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.collapsible-section {
    margin-bottom: 8px;
}

.section-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.section-header:hover {
    background: rgba(255, 255, 255, 0.15);
}

.section-icon {
    transition: transform 0.3s ease;
}

.section-header.active .section-icon {
    transform: rotate(180deg);
}

.section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 16px;
}

.section-content.open {
    max-height: 500px;
    padding: 16px;
}

.preset-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 600px;
    background: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid rgba(51, 51, 51, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.control-btn {
    background: rgba(26, 26, 26, 1);
    border: 1px solid rgba(51, 51, 51, 1);
    border-radius: 6px;
    padding: 8px 12px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.control-btn:hover {
    background: rgba(51, 51, 51, 0.8);
    border-color: rgba(102, 102, 102, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.control-btn:active {
    transform: translateY(0);
}

.control-btn svg {
    width: 16px;
    height: 16px;
}

h3 {
    color: white;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 600;
}

.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 24px;
    min-width: 400px;
    max-width: 80vw;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
}

.modal-body textarea {
    width: 100%;
    height: 120px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 12px;
    color: white;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
    margin-bottom: 12px;
}

.copy-btn {
    background: #007bff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}

.copy-btn:hover {
    background: #0056b3;
}

@media (max-width: 768px) {
    .top-left {
        top: 10px;
        left: 10px;
        flex-wrap: wrap;
    }
    
    .top-right {
        display: none;
        top: 70px;
        left: 10px;
        right: 10px;
        width: auto;
        max-height: calc(100vh - 200px);
    }
    
    .top-right.mobile-open {
        display: block;
    }
    
    .advanced-toggle {
        display: flex;
        top: 10px;
        right: 10px;
    }
    
    .preset-controls {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .control-btn {
        padding: 6px 8px;
        font-size: 12px;
    }
    
    .controls {
        padding: 12px;
    }
    
    .section-content.open {
        max-height: 300px;
    }
}

@media (min-width: 769px) {
    .advanced-toggle {
        display: none !important;
    }
    
    .top-right {
        display: block !important;
    }
    
    .section-content {
        max-height: none !important;
        padding: 16px !important;
        overflow: visible !important;
    }
    
    .section-header {
        pointer-events: none;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        margin-bottom: 12px;
    }
    
    .section-header span {
        font-size: 16px;
        font-weight: 600;
    }
    
    .section-icon {
        display: none;
    }
}