/* Reset and Base Setup */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent scrolling, lock to viewport */
    background-color: #0b0c10; /* Very dark background for unrendered areas */
    font-family: 'Inter', sans-serif;
    color: #ffffff;
}

/* Canvas fills the entire screen behind the UI */
#cfdCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Glassmorphism Panel Container */
.glass-panel {
    position: absolute;
    top: 30px;
    left: 30px;
    width: 320px;
    padding: 25px;
    z-index: 10;

    /* The core frosted glass effect */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    
    /* Borders and Shadows */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* Typography */
h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 5px 0;
    letter-spacing: 0.5px;
}

.subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 25px 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Control Groups (Sliders) */
.control-group {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.control-group label {
    font-size: 0.9rem;
    font-weight: 300;
    width: 70%;
}

.val-display {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4facfe;
    width: 30%;
    text-align: right;
}

/* Custom Range Sliders */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    margin-top: 10px;
    background: transparent;
}

input[type=range]:focus {
    outline: none;
}

/* Slider Track */
input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Slider Thumb */
input[type=range]::-webkit-slider-thumb {
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #4facfe;
    cursor: pointer;
    -webkit-appearance: none;
    margin-top: -6px;
    box-shadow: 0 0 10px rgba(79, 172, 254, 0.5);
    transition: transform 0.1s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Buttons */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.btn {
    flex: 1;
    padding: 10px 0;
    border-radius: 8px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.btn.primary {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn.primary:hover {
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
    transform: translateY(-1px);
}

.btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Footer Status */
.footer-note {
    margin-top: 25px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background-color: #00ff88;
    border-radius: 50%;
    box-shadow: 0 0 8px #00ff88;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 255, 136, 0); }
}
