/* UI Components - Buttons, Sliders, Controls */
/* Matches dna.html lines 51-181 exactly */

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #423028;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

#loading-logo {
    width: auto;
    height: auto;
    max-width: 80%;
    max-height: 80%;
}

/* Language Button - dna.html lines 51-65 */
#language-btn {
    font-size: 14px;
    color: #A9DEFE;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    transition: transform 0.2s;
}

#language-btn:hover {
    transform: scale(1.05);
}

body.dark-mode #language-btn {
    color: #ffffff;
}

body.light-mode #language-btn {
    color: #000000;
}

/* Left Slider - dna.html lines 102-139 */
/* Thumb is 48px, browser positions thumb center at edges, so we extend slider by 48px (24px each side) */
/* and offset position to compensate, so the visible ball center reaches the track edges */
#left-slider {
    -webkit-appearance: none;
    appearance: none;
    width: calc(45vh + 48px);
    height: 1px;
    background: transparent;
    transform: rotate(-90deg);
    transform-origin: 0 0;
    position: absolute;
    left: 0;
    top: calc(45vh + 24px);
    margin: 0;
    padding: 0;
}

#left-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 48px;
    height: 48px;
    background: radial-gradient(circle, #A9DEFE 0%, #A9DEFE 21%, transparent 21%, transparent 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

body.dark-mode #left-slider::-webkit-slider-thumb {
    background: radial-gradient(circle, #ffffff 0%, #ffffff 21%, transparent 21%, transparent 100%);
}

body.light-mode #left-slider::-webkit-slider-thumb {
    background: radial-gradient(circle, #000000 0%, #000000 21%, transparent 21%, transparent 100%);
}

#left-slider::-moz-range-thumb {
    width: 48px;
    height: 48px;
    background: radial-gradient(circle, #A9DEFE 0%, #A9DEFE 21%, transparent 21%, transparent 100%);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

body.dark-mode #left-slider::-moz-range-thumb {
    background: radial-gradient(circle, #ffffff 0%, #ffffff 21%, transparent 21%, transparent 100%);
}

body.light-mode #left-slider::-moz-range-thumb {
    background: radial-gradient(circle, #000000 0%, #000000 21%, transparent 21%, transparent 100%);
}

/* Category Buttons - dna.html lines 141-181 */
.category-btn {
    position: absolute;
    left: 2.64vw;     /* 38/1440 */
    width: 104px;     /* Figma: W 104 */
    height: 41px;     /* Figma: H 41 */
    border-radius: 50%;  /* Makes 104x41 rectangle into ellipse shape */
    background: transparent;
    border: 1px solid #A9DEFE;  /* Figma: Stroke A9DEFE, Weight 1, Inside */
    color: #A9DEFE;
    font-size: 12px;
    cursor: pointer;
    z-index: 100;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s, transform 0.2s;
}

.category-btn:hover:not(.active) {
    transform: scale(1.05);
}

body.dark-mode .category-btn {
    border-color: #ffffff;
    color: #ffffff;
}

body.light-mode .category-btn {
    border-color: #000000;
    color: #000000;
}

/* Selected/active state for category buttons - Figma: Fill A9DEFE */
.category-btn.active {
    background: #A9DEFE;
    color: #423028;
}

body.dark-mode .category-btn.active {
    background: #ffffff;
    color: #050505;
}

body.light-mode .category-btn.active {
    background: #000000;
    color: #fafafa;
}

/* Font Button */
#font-btn {
    position: absolute;
    left: 2.64vw;
    top: 3vh;
    font-size: 14px;
    color: #A9DEFE;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    z-index: 100;
    transition: transform 0.2s;
}

#font-btn:hover {
    transform: scale(1.05);
}

body.dark-mode #font-btn {
    color: #ffffff;
}

body.light-mode #font-btn {
    color: #000000;
}

/* Parameters Panel */
.parameters-panel {
    position: absolute;
    top: 78.12vh;  /* Align with top of molecules button */
    left: 18vw;
    right: 5vw;
    height: calc(90.03vh - 78.12vh + 41px);  /* Span from molecules top to charger bottom */
    display: flex;
    gap: 10vw;
    justify-content: flex-start;
    align-items: flex-start;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.3s;
}

.parameters-panel.hidden {
    opacity: 0;
    pointer-events: none;
}

.param-column {
    display: flex;
    flex-direction: column;
    gap: 0.8vh;
    justify-content: space-between;
    height: 100%;
    align-items: flex-start;
}

.param-column label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #A9DEFE;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    padding: 0 18px;
    height: 41px;
    margin: 0 -18px;
    border-radius: 50%;
    border: 1px solid transparent;
    transition: border-color 0.2s, transform 0.2s;
}

.param-column label:hover:not(.active) {
    transform: scale(1.05);
}

.param-column label.active {
    border-color: #A9DEFE;
}

body.dark-mode .param-column label {
    color: #ffffff;
}

body.dark-mode .param-column label.active {
    border-color: #ffffff;
}

body.light-mode .param-column label {
    color: #000000;
}

body.light-mode .param-column label.active {
    border-color: #000000;
}

.param-square {
    width: 12px;
    height: 12px;
    background: #A9DEFE;
    border-radius: 4px;
    display: inline-block;
    flex-shrink: 0;
}

body.dark-mode .param-square {
    background: #ffffff;
}

body.light-mode .param-square {
    background: #000000;
}

/* Return/Back Icon - Bottom Right */
#return-btn {
    position: absolute;
    bottom: 3vh;
    right: 2.64vw;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 100;
    transition: transform 0.2s;
}

#return-btn:hover {
    transform: scale(1.1);
}
