

/* Universe Theme Engine */

html:has(body.universe-theme-active) {

    background: var(--universe-bg, #14291f);

}

body.universe-theme-active {

    background: var(--universe-bg, #14291f) !important;

    color: var(--universe-text, #f3e3c3);

}

#universe-wallpaper {

    position: fixed;

    inset: 0;

    pointer-events: none;

    background-size: cover;

    background-position: center;

    opacity: var(--universe-photo-opacity, .35);

    filter: blur(var(--universe-photo-blur, 3px));

    transform: scale(1.05);

    z-index: 0;

}

body.universe-theme-active main,
body.universe-theme-active nav {

    position: relative;

    z-index: 1;

}

body.universe-theme-active h1,
body.universe-theme-active h2,
body.universe-theme-active h3 {

    color: var(--universe-text);

}

body.universe-theme-active button {

    color: var(--universe-text);

}

body.universe-theme-active .subtitle {

    color: var(--gold);

}

body.universe-theme-active dialog,
body.universe-theme-active #music-panel,
body.universe-theme-active .universe-page-bar,
body.universe-theme-active #universe-page-shell {

    background-color: var(--universe-bg) !important;

    color: var(--universe-text);

}

body.universe-theme-active input,
body.universe-theme-active textarea,
body.universe-theme-active select {

    color: var(--universe-text);

}

body.universe-theme-active select option {

    background: var(--universe-bg);

    color: var(--universe-text);

}

/* Theme Studio */

#theme-dialog {

    box-sizing: border-box;

    width: min(720px, 94vw);

    max-height: 90vh;

    overflow-y: auto;

    background: var(--universe-bg, #14291f);

    color: var(--cream);

    border: 1px solid var(--gold);

    border-radius: 28px;

    padding: 28px;

    text-align: center;

}

#theme-dialog::backdrop {

    background: #0009;

    backdrop-filter: blur(8px);

}

#theme-dialog h1 {

    font-family: Georgia, serif;

    font-weight: normal;

    font-size: clamp(36px, 8vw, 64px);

}

#theme-dialog h3 {

    text-align: left;

    margin: 30px 0 15px;

    font-weight: normal;

    font-size: 16px;

}

#theme-close {

    display: block;

    margin-left: auto;

}

#theme-preview {

    position: relative;

    isolation: isolate;

    overflow: hidden;

    border: 1px solid #88888840;

    border-radius: 22px;

    padding: 32px 15px;

    margin: 25px 0;

}

#theme-preview::before {

    content: "";

    position: absolute;

    inset: -15px;

    background-image: var(--preview-image, none);

    background-size: cover;

    background-position: center;

    opacity: var(--preview-opacity, .35);

    filter: blur(var(--preview-blur, 3px));

    z-index: -1;

}

#theme-preview small {

    color: var(--preview-accent);

    letter-spacing: 3px;

    font-size: 10px;

}

#theme-preview div {

    font-size: 34px;

    margin: 25px 0;

}

#theme-preview h2 {

    color: inherit;

    font-family: Georgia, serif;

    font-weight: normal;

    font-size: 40px;

    margin: 10px;

}

#theme-presets {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

}

#theme-dialog #theme-presets button {

    min-height: 80px;

    border-radius: 16px;

    font-size: 13px;

    margin: 0;

}

#theme-presets button.active {

    outline: 2px solid var(--gold);

    outline-offset: 3px;

}

.theme-colors {

    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 12px;

}

.theme-colors label {

    border: 1px solid #88888845;

    border-radius: 15px;

    padding: 12px 5px;

    font-size: 12px;

}

.theme-colors input {

    display: block;

    width: 48px;

    height: 38px;

    border: none;

    background: transparent;

    margin: 12px auto 0;

    cursor: pointer;

}

#theme-dialog button {

    padding: 12px 15px;

    font-size: 12px;

    margin: 6px;

}

#theme-file,
#theme-scope {

    display: block;

    width: 100%;

    box-sizing: border-box;

    border: 1px solid #88888855;

    border-radius: 12px;

    padding: 14px;

    background: #8888880c;

    margin: 12px 0;

}

#theme-photo-list {

    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 8px;

    max-height: 320px;

    overflow: auto;

    margin: 15px 0;

}

#theme-photo-list[hidden] {

    display: none !important;

}

#theme-dialog #theme-photo-list button {

    border-radius: 10px;

    overflow: hidden;

    padding: 0;

    margin: 0;

}

#theme-photo-list img {

    display: block;

    width: 100%;

    aspect-ratio: 1;

    object-fit: cover;

}

.theme-slider {

    text-align: left;

    margin: 25px 0;

}

.theme-slider label {

    display: flex;

    justify-content: space-between;

    font-size: 13px;

}

.theme-slider input {

    width: 100%;

    accent-color: var(--gold);

    margin: 15px 0;

}

.theme-hint,
#theme-status {

    font-size: 12px;

    line-height: 1.8;

    overflow-wrap: anywhere;

}

#theme-dialog #theme-save {

    display: block;

    width: 100%;

    box-sizing: border-box;

    margin: 20px 0 10px;

    padding: 16px;

    background: var(--gold);

    color: var(--universe-bg);

    border: none;

    border-radius: 14px;

    font-size: 14px;

    font-weight: 600;

}

#theme-dialog #theme-follow,
#theme-dialog #theme-reset {

    background: transparent;

    border: none;

    color: var(--gold);

    font-size: 12px;

}

@media (max-width: 600px) {

    #theme-dialog {

        padding: 16px;

    }

    #theme-presets {

        gap: 8px;

    }

    #theme-dialog #theme-presets button {

        min-height: 65px;

        font-size: 11px;

    }

    #theme-photo-list {

        grid-template-columns: repeat(3, 1fr);

    }

}


