.theme-slider {
    display: flex;
    background: var(--theme-line-bg);
    padding: 0.3rem;
    border-radius: 2rem;
    margin-bottom: 1.5rem;
}

.theme-option {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    border-radius: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.theme-option:focus {
    outline: none;
}

.theme-option.selected {
    background: var(--theme-color);
    color: var(--theme-bg);
}

.theme-preview {
    flex: 0 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 1vh 3rem 3vh 3rem;
}

.theme-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.7);
}

.theme-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    width: 100vw;
    /* background-color: var(--theme-bg); */
    color: var(--theme-color);
    font-family: var(--font-family);
    padding: 3vh 0 1.5rem;
    box-sizing: border-box;
    z-index: 403;
    overflow: hidden;
    transition: 120ms;
}

/* Backdrop with blur effect for theme modal */
.theme-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(10px);
    z-index: -1;
    pointer-events: none;
}

/* Theme-aware backdrop for light mode */
[theme="light"] .theme-modal::before {
    background: rgba(255, 255, 255, 0.3);
}

.theme-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.theme-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}


.theme-controls {
    /* controls take natural height */
    padding: 0 3rem;
}


.theme-modal-confirm {
    background-color: rgb(53, 101, 248);
    padding: 0.5rem 1.5rem;
    font-size: 2rem;
    color: white;
    border-radius: 3rem;
    font-weight: 500;
    margin: 0 1.5rem;
    align-self: end;
}

.dev-build-popup {
    background-color: #dc9716;
    padding: 0.5rem 1.5rem 0.5rem 1.2rem;
    border-radius: 15px;
    color: white;
    z-index: 401;
    font-size: 1.5rem;
}

.sim-popup {
    background-color: #16aedc;
    padding: 0.5rem 0.5rem 0.5rem 1.1rem;
    border-radius: 15px;
    color: white;
    z-index: 401;
    font-size: 1.5rem;
    pointer-events: all;
    user-select: none;
}

.sim-exit, .sim-speed {
    font-size: 1.3rem;
    font-weight: bold;
    border-radius: 2rem;
    background-color: rgb(104, 213, 213);
    padding: 0.2rem 0.5rem;
    cursor: pointer;
}

.sim-speed {
    padding: 0.2rem 0.8rem !important;
}