@font-face {
    font-family: cmu;
    src: url('cmunss.ttf');
}

body {
    margin: 0;
    padding: 0;
    overflow: hidden;
    background: #000;
    font-family: cmu, 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: white;
}

canvas {
    display: block;
    width: 100vw;
    height: 100vh;
}

/* Settings Trigger (Gear Icon) */
.settings-trigger {
    position: fixed;
    top: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(20px);
    z-index: 1001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    opacity: 1;
    transition: opacity 0.3s ease;
}

.settings-trigger.hidden {
    opacity: 0;
    pointer-events: none;
}

.gear-icon {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.8);
    user-select: none;
}

/* UI Panel */
.ui-panel {
    position: fixed;
    top: 25px;
    right: 25px;
    bottom: 25px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 0;
    color: white;
    width: 320px;
    backdrop-filter: blur(25px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    overflow: hidden;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

.ui-panel.expanded {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* Panel Header */
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    flex: 1;
    margin-right: 15px;
}

.panel-header h3 {
    margin: 0 0 8px 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.description {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.description a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.description a:hover {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.6);
}

.close-icon {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    user-select: none;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Sections */
.info-section {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.controls-section {
    padding: 20px 25px;
    overflow-y: auto;
    flex: 1;
}

.control-category {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.control-category:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.control-category h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

/* Control Groups */
.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

/* Info Items */
.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
}

.info-item label {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

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

.info-button {
    padding: 4px 8px;
    font-size: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    font-family: inherit;
}

.info-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Slider Groups */
.slider-group label {
    margin-bottom: 12px;
}

.slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Range Inputs */
input[type="range"] {
    flex: 1;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

/* Slider thumb styling */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}


/* Value Display */
.value-display {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    min-width: 45px;
    text-align: right;
    font-family: 'Monaco', 'Consolas', monospace;
    letter-spacing: 0.5px;
}



/* Responsive Design */
@media (max-width: 480px) {
    .ui-panel {
        min-width: 280px;
        max-width: 300px;
    }
    
    .settings-trigger {
        top: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
    }
    
    .gear-icon {
        font-size: 18px;
    }
}