.light-panel {
    width: 100%;
    height: 15rem;
    background: #ffeedd;
    border-radius: 3px;
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
}

.light-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 3px;
    pointer-events: none;
    transition: border-radius 0.3s;
}

/***************************************/

.glow-tip {
    background: rgb(255 250 235 / 44%);
    backdrop-filter: blur(16px);
    padding: 0.3rem 0.75rem;
    border-radius: 60px;
    letter-spacing: 0.5px;
    pointer-events: auto;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.5rem;
    transition: opacity 0.35s, color 0.25s, background 0.25s, transform 0.2s;
}

.night .glow-tip{
    color: #34495e;
}

.glow-tip:hover {
    transform: scale(1.04);
}

.glow-tip:active {
    transform: scale(0.97);
}

.glow-tip.dark-tip {
    color: #f0ece0;
    background: rgba(0, 0, 0, 0.45);
}

.glow-tip.tip-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
}

/***************************************/

.tip-bar {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    z-index: 3;
    pointer-events: none;
}

.exit-btn {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 3;
    width: fit-content;
    margin: 0 auto;
    display: none;
}

.off-tip {
    position: absolute;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 1px;
    pointer-events: none;
    z-index: 5;
}

.off-tip.show {
    display: flex;
}

.tap-hint {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
    z-index: 2;
}

.tap-hint.show {
    opacity: 1;
}

/***************************************/

.light-panel.fs-active {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    z-index: 9999999;
    margin: 0;
    cursor: pointer;
}

.light-panel.fs-active::after {
    border-radius: 0;
}

.light-panel.fs-active .exit-btn {
    bottom: 60px;
    font-size: 15px;
    padding: 10px 28px;
}

.light-panel.fs-active .exit-btn.dark-tip {
    color: rgba(255, 255, 255, 0.75);
    background: rgba(0, 0, 0, 0.4);
}

.light-panel.fs-active .tap-hint.show {
    bottom: 28px;
}

/***************************************/

.controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.controls > :first-child {
    grid-column: 1 / -1;
}

.controls > :last-child {
    grid-column: 1 / -1;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid #eee;
    padding: 0.5rem 0.5rem 0.75rem 0.5rem;
}

.night .control-group{
    border:1px solid #444;
}

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    height: 1.2rem;
    line-height: 1.2rem;
}

.value-display {
    font-family: 'Menlo', 'Consolas', monospace;
    font-size: 0.6rem;
}

.temp-track {
    position: relative;
}

.temp-track .track-bg {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 0.3rem;
    border-radius: 10px;
    transform: translateY(-50%);
    background: linear-gradient(to right,
            #cc3300 0%,
            #ff6622 10%,
            #ff9944 22%,
            #ffcc77 35%,
            #fff5e8 48%,
            #eef3ff 55%,
            #c4d9ff 65%,
            #8eb8ff 76%,
            #5a9cff 86%,
            #3d7cff 94%,
            #2a5eee 100%);
    pointer-events: none;
    z-index: 0;
}

.temp-track input[type="range"] {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 0.3rem;
    border-radius: 10px;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    background: transparent;
    transform: translateY(-1px);
}

.temp-track input[type="range"]:focus {
    outline: none;
}

.temp-track input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 0.9rem;
    height:  0.9rem;
    background: #fff;
    border-radius: 50%;
    border: 2px solid #ffe6b3;
    cursor: pointer;
}

.night .temp-track input[type="range"]::-webkit-slider-thumb {
    background: #181a1b;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
}

.toggle-switch .layui-form-switch{
    margin-top: 0;
}

.breathing-params {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: opacity 0.25s;
}

.breathing-params.disabled {
    pointer-events: none;
}

.param-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.param-label {
    font-size: 0.55rem;
    white-space: nowrap;
    min-width: 1rem;
}

.param-value {
    font-family: 'Menlo', 'Consolas', monospace;
    font-size: 0.5rem;
    min-width: 2rem;
}


@media (max-width: 480px) {
    .controls {
        grid-template-columns: 1fr;
    }
    .toggle-switch {
        gap: 0.5rem;
    }
}