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

body {
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    -webkit-user-select: none;
    user-select: none;
}

#gradient-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    background: linear-gradient(45deg, #4a154b, #2d1b69, #0f4c75, #3282b8, #bbe1fa);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.floating-panel {
    position: absolute;
    border-radius: 55px;
    padding: 20px;
    cursor: move;
    user-select: none;
    /* iOS-compatible blur effect using multiple layered backgrounds */
    background: 
        linear-gradient(-60deg, 
            rgba(221, 221, 221, 0.4) 0%, 
            rgba(255, 255, 255, 0.1) 18%, 
            rgba(255, 255, 255, 0.1) 82%, 
            rgba(221, 221, 221, 0.4) 100%),
        rgba(255, 255, 255, 0.14);
    
    /* iOS Safari compatible backdrop blur */
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    
    /* Enhanced shadow for better visibility on iOS */
    box-shadow: 
        0 3px 140px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    
    /* Fallback for browsers without backdrop-filter support */
    @supports not (backdrop-filter: blur(1px)) {
        background: rgba(255, 255, 255, 0.25);
        border: 1px solid rgba(255, 255, 255, 0.3);
    }
}

#export-panel {
    bottom: 50px;
    left: 50px;
}

.panel-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 8px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 20px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

.panel-item:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.15);
    transform: translateX(2px);
}

.panel-item i {
    width: 20px;
    height: 20px;
    stroke-width: 2;
}

.color-stop {
    position: absolute;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.3),
        0 0 0 2px rgba(255, 255, 255, 0.8);
    transform: translate(-50%, -50%);
    transition: all 0.1s ease;
    z-index: 10;
}

.color-stop:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.4),
        0 0 0 3px rgba(255, 255, 255, 0.9);
}

.color-stop.dragging {
    transform: translate(-50%, -50%) scale(1.2);
    box-shadow: 
        0 6px 20px rgba(0, 0, 0, 0.5),
        0 0 0 4px rgba(255, 255, 255, 1);
}

/* Ensure touch events work on iOS */
.floating-panel, .color-stop {
    touch-action: none;
}
