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

body {
    background: #ffffff;
    /* White background */
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.controls {
    position: fixed;
    top: 30px;
    left: 30px;
    display: flex;
    gap: 12px;
    z-index: 1000;
}

.controls button {
    padding: 12px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid rgba(80, 80, 80, 0.3);
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.controls button:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(80, 80, 80, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.controls button.active {
    background: #333;
    color: white;
    border-color: #333;
}

.controls button.active:hover {
    background: #444;
    border-color: #444;
}

.start-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.start-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6) !important;
}

.start-btn.started {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.start-btn.started:hover {
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.6) !important;
}

.settings-panel {
    position: fixed;
    top: 90px;
    left: 30px;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transform: translateX(-400px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.settings-panel.show {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

.settings-panel h3 {
    margin: 0 0 20px 0;
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.slider-group {
    margin-bottom: 20px;
}

.slider-group label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.slider-group .value {
    color: #333;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    min-width: 45px;
    text-align: center;
}

.slider-group input[type="range"] {
    width: 100%;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(90deg, #ddd 0%, #333 100%);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #333;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #222;
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #333;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider-group input[type="range"]::-moz-range-thumb:hover {
    background: #222;
    transform: scale(1.15);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.reset-btn {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 600;
    border: 2px solid #333;
    background: white;
    color: #333;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reset-btn:hover {
    background: #333;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.memory-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 16px 0 10px 0;
    padding: 10px 12px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #555;
}

.memory-info span:last-child {
    color: #333;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}.preset-select {
    width: 100%;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23333%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 12px top 50%;
    background-size: 10px auto;
}

.preset-select:hover {
    border-color: #888;
    background-color: rgba(255, 255, 255, 1);
}

.preset-select:focus {
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(51, 51, 51, 0.1);
}
@media (max-width: 768px) {
    .controls {
        top: auto;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 8px;
    }

    .controls button {
        padding: 10px 16px;
        font-size: 12px;
        flex: 1 1 auto;
    }

    .settings-panel {
        top: auto;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 70vh;
        border-radius: 20px 20px 0 0;
        transform: translateY(100%);
        overflow-y: auto;
        padding-bottom: 80px;
        /* Space for controls */
    }

    .settings-panel.show {
        transform: translateY(0);
    }

    /* Adjust logo position for portrait */
    canvas {
        width: 100%;
        height: 100%;
    }
}