body {
    background-color: var(--bg-color-day); 
    margin: 0;
    padding-top: 80px; 
    position: relative;
    height: 100vh;
    width: 100vw;
    user-select: none;
    -webkit-user-drag: none;
    font-family: sans-serif; 
    color: var(--text-color-day);
}

.settings-container {
    max-width: 600px;
    margin: 50px auto;
    overflow: hidden;
}

.settings-slider {
    display: flex;
    width: 200%;
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.slide {
    width: 50%;
    padding: 30px;
    background-color: var(--container-bg-day);
    border-radius: 10px;
    box-sizing: border-box; /* Include padding in width calculation */
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.settings-header h2 {
    margin: 0;
    text-align: center;
    flex-grow: 1;
    color: var(--text-color-day);
}

.arrow {
    background: none;
    border: none;
    font-size: 36px;
    cursor: pointer;
    color: var(--text-color-day);
    padding: 0 20px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background-color: 0.3s;
    border-radius: 5px;
}

.setting-item:hover {
    background-color: rgba(128, 128, 128, 0.1);
}

.setting-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.setting-item label {
    font-size: 18px;
    font-weight: bold;
}

.setting-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.setting-item-center {
    justify-content: center;
    cursor: pointer;
}

#themeValue {
    font-weight: bold;
    padding: 10px 20px;
    border: 1px solid var(--button-border-color);
    border-radius: 5px;
    transition: background-color 0.3s, color 0.3s;
}

#themeValue:hover {
    background-color: var(--highlight-bg-day);
    color: white;
}

.setting-options {
    display: flex;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.option {
    padding: 10px 20px;
    border: 1px solid var(--button-border-color);
    border-radius: 5px;
    cursor: pointer;
    margin-left: 10px;
    margin-bottom: 10px;
    transition: background-color 0.3s, color 0.3s;
    flex-grow: 0;
    text-align: center;
}

.option:not(.selected):hover {
    background-color: var(--highlight-bg-day);
    color: white;
}

.option.selected {
    background-color: var(--highlight-bg-day);
    color: white;
}

/* Reset button styling to match other controls */
.reset-btn {
    margin-left: 10px;
    padding: 6px 10px;
    border: 1px solid var(--button-border-color);
    background: transparent;
    color: var(--text-color-day);
    border-radius: 4px;
    cursor: pointer;
}

.reset-btn:hover {
    background-color: rgba(0,0,0,0.05);
}

.reset-msg {
    margin-left: 10px;
    color: var(--text-color-day);
    font-size: 14px;
}

/* Controls grouping for color picker + reset */
.setting-controls {
    display: inline-flex;
    align-items: center;
}

.setting-controls input[type="color"] {
    width: 48px;
    height: 34px;
    padding: 0;
    margin-right: 10px;
    border: 1px solid var(--button-border-color);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
}

.setting-controls .reset-btn {
    padding: 8px 14px;
    font-size: 14px;
}

/* Shared control sizing to match .option */
.control {
    display: inline-flex;
    align-items: center;
    height: 60px;
    padding: 0 20px;
    border: 1px solid var(--button-border-color);
    border-radius: 5px;
    margin-left: 10px;
    background: transparent;
}

.control.color-control {
    padding: 0;
    flex: 1 1 auto;
}

.control input[type="color"] {
    width: 100%;
    height: 100%;
    border: none;
    padding: 0;
    margin: 0;
}

/* Make the color picker appear as a square tile */
.control.color-control {
    width: 60px;
    min-width: 60px;
}

.control.color-control input[type="color"] {
    width: 60px;
    height: 60px;
    border-radius: 4px;
}

/* Disabled seconds controls */
.setting-options.disabled .option {
    opacity: 0.45;
    pointer-events: none;
}

.control, .game-change-option {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

@media (max-width: 768px) {
    .settings-container {
        margin: 20px 10px;
    }

    .slide {
        padding: 20px;
    }

    .setting-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .setting-item label {
        margin-bottom: 10px;
    }

    .setting-options {
        width: 100%;
        justify-content: flex-start;
    }

    .option {
        margin-left: 0;
        margin-right: 10px;
        margin-bottom: 10px;
        flex-grow: 0;
        text-align: center;
    }

    .option:first-child {
        margin-right: 10px;
    }
}

.vertical-slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.vertical-slider-viewport {
    height: 60px; /* Adjust to show one item at a time */
    overflow: hidden;
    width: 100%;
    max-width: 250px; /* Make the slider narrower */
    margin: 0 auto; /* Center the slider */
    border: 1px solid var(--button-border-color);
    border-radius: 5px;
}

.vertical-slider-options {
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.game-change-option {
    height: 60px; /* Match viewport height */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    transition: background-color 0.3s, color 0.3s;
}

.game-change-option:hover {
    background-color: var(--highlight-bg-day);
    color: white;
}

.arrow.up-arrow, .arrow.down-arrow {
    padding: 0;
    font-size: 0;
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    margin: 20px 0;
}

.arrow.up-arrow {
    border-bottom: 20px solid var(--highlight-bg-day);
}

.arrow.up-arrow.button-hover:hover {
    box-shadow: none;
}

.arrow.down-arrow {
    border-top: 20px solid var(--highlight-bg-day);
}

.arrow.down-arrow.button-hover:hover {
    box-shadow: none;
}

.key-input {
    padding: 10px 20px;
    border: 1px solid var(--button-border-color);
    border-radius: 5px;
    background-color: var(--container-bg-day);
    color: var(--text-color-day);
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    width: 60px;
    transition: background-color 0.3s, color 0.3s;
}

.key-input:focus {
    outline: none;
    background-color: var(--highlight-bg-day);
    color: white;
}

.keybind-container {
    display: flex;
    flex-grow: 1;
    margin-left: 20px;
    align-items: flex-start;
}

.keybind-column {
    display: flex;
    flex-direction: column;
    margin-right: 20px;
}

.expandable-setting {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
    margin-top: 10px;
}

.expandable-setting.expanded {
    max-height: 100px;
}

.keybind-setting {
    display: flex;
    align-items: center;
}

.keybind-setting label {
    margin-right: 10px;
    font-size: 16px; /* Slightly smaller label for sub-items */
}

.keybind-visible .keybind-setting:nth-child(2),
.keybind-expandable .keybind-setting:nth-child(2) {
    margin-left: 50px;
}

#resetKeybinds {
    padding: 8px 16px;
    font-size: 14px;
    height: auto; /* Override the default height from .control */
}

.animation-setting-container {
    display: flex;
    flex-grow: 1;
    align-items: baseline;
}

.spacer {
    flex-grow: 1;
    transition: flex-grow 0.5s ease-in-out;
}

.animation-setting-container.on .spacer {
    flex-grow: 0;
}

.setting-options-container {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.setting-options.expandable {
    max-height: 45px; /* Adjust to show only one row */
    overflow: hidden;
    transition: max-height 1.5s ease-in-out;
}

.setting-options.expanded {
    max-height: 500px; /* A large value to show all options */
}

.expand-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color-day);
    padding: 0 10px;
    margin-left: 10px;
}

.disintegrating {
    animation: disintegrate 0.5s forwards;
}

.reintegrating {
    animation: reintegrate 0.5s forwards;
}

.sliding-in-left {
    animation: slide-in-left 0.5s forwards;
}

@keyframes disintegrate {
    0% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
    100% {
        opacity: 0;
        filter: blur(5px);
        transform: scale(0.8);
    }
}

@keyframes reintegrate {
    0% {
        opacity: 0;
        filter: blur(5px);
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: scale(1);
    }
}

@keyframes slide-in-left {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.selected-animation-style {
    margin-right: 10px;
    font-weight: bold;
}

#countdownSecondsRow {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;
    padding-top: 0;
    padding-bottom: 0;
}

#countdownSecondsRow.expanded {
    max-height: 100px; /* Adjust as needed */
    padding-top: 15px;
    padding-bottom: 15px;
}

.setting-item.dropdown {
    flex-direction: column;
    align-items: stretch;
    padding: 0;
}

.setting-item-header {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    padding: 15px;
}

.dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
    padding: 0 15px;
    opacity: 0;
    transform: translateY(-10px);
}

.dropdown-content.expanded {
    max-height: 500px; /* Adjust as needed */
    padding: 15px;
    opacity: 1;
    transform: translateY(0);
    transition: max-height 0.8s cubic-bezier(0.25, 0.1, 0.25, 1), opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.expand-btn.rotated {
    transform: rotate(180deg);
}