html {
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    color: #ffffff;
    font-family: Arial, sans-serif;
    background-color: #1C1C1D;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 48px 48px;
    background-position: 0 0;
    overflow-x: hidden;
}

body,
button,
input,
select {
    font-family: Arial, sans-serif;
}

.settings-page {
    width: min(1000px, calc(100% - 40px));
    margin: 0 auto;
    padding: 54px 0 120px;
    transition: filter 180ms ease, opacity 180ms ease;
}

body.modal-open .settings-page {
    filter: blur(4px);
    opacity: 0.72;
}

.settings-header {
    text-align: center;
    margin-bottom: 34px;
}

.settings-header h1 {
    margin: 0;
    font-size: 2.7rem;
    line-height: 1;
    letter-spacing: -1px;
}

.settings-header p {
    margin: 12px 0 0;
    color: rgba(255, 255, 255, 0.62);
    font-size: 1rem;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
}

.settings-card {
    min-height: 210px;
    padding: 34px 38px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.055);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.18);
    box-sizing: border-box;
}

.settings-card h2 {
    margin: 0 0 14px;
    font-size: 1.55rem;
    line-height: 1;
    letter-spacing: -0.5px;
    text-transform: lowercase;
}

.settings-card p,
.settings-card label,
.setting-status,
.small-note {
    color: rgba(255, 255, 255, 0.76);
    font-size: 1rem;
    line-height: 1.4;
}

.settings-card p {
    margin: 0 0 18px;
}

.setting-status {
    margin: 14px 0 0;
    color: rgba(255, 255, 255, 0.62);
}

.small-note {
    margin-top: 18px;
    color: rgba(255, 255, 255, 0.55);
}

.card-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.info-button {
    width: 32px;
    height: 32px;
    min-height: 32px;
    padding: 0;
    border-radius: 50%;
    flex: 0 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.13);
    color: rgba(255, 255, 255, 0.7);

    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;

    cursor: pointer;
    box-shadow: none;
    transform: none;

    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.info-button:hover {
    background: rgba(255, 255, 255, 0.095);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.92);
    transform: none;
    box-shadow: none;
}

.info-button:active {
    background: rgba(255, 255, 255, 0.075);
    transform: none;
    box-shadow: none;
}

.info-button:focus {
    outline: none;
}

.info-button:focus-visible {
    border-color: rgba(255, 255, 255, 0.28);
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 22px;
    background: rgba(0, 0, 0, 0.44);
    backdrop-filter: blur(6px);

    opacity: 0;
    pointer-events: none;

    transition: opacity 180ms ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-panel {
    width: min(460px, 100%);
    padding: 30px;
    border-radius: 16px;

    background: rgba(28, 28, 31, 0.97);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);

    position: relative;

    opacity: 0;
    transform: none;

    transition: opacity 180ms ease;
}

.modal-backdrop.active .modal-panel {
    opacity: 1;
    transform: none;
}

.modal-panel h2 {
    margin: 0 0 16px;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.modal-panel p {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, 0.68);
    line-height: 1.45;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;

    width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    border-radius: 50%;

    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.11);
    color: rgba(255, 255, 255, 0.7);

    display: flex;
    align-items: center;
    justify-content: center;

    box-shadow: none;
    transform: none;

    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.18);
    color: white;
    transform: none;
    box-shadow: none;
}

.modal-close:active {
    background: rgba(255, 255, 255, 0.07);
    transform: none;
    box-shadow: none;
}

.modal-example {
    margin-top: 18px;
    padding: 13px 14px;
    border-radius: 10px;

    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.075);

    color: rgba(255, 255, 255, 0.68);
    font-size: 0.92rem;
}

select,
input[type="text"] {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    background: rgba(0, 0, 0, 0.18);
    color: white;
    font-size: 0.98rem;
    box-sizing: border-box;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

select:focus,
input[type="text"]:focus {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(0, 0, 0, 0.24);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

button {
    min-height: 48px;
    padding: 0 22px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.045);
    color: white;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

button:hover {
    background: rgba(255, 255, 255, 0.075);
    border-color: rgba(255, 255, 255, 0.22);
}

button:active {
    transform: scale(0.98);
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 24px;
}

.switch-row input {
    display: none;
}

.switch {
    width: 52px;
    height: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
    position: relative;
    flex: 0 0 auto;
}

.switch::before {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 3px;
    left: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.58);
    transition: transform 180ms ease, background 180ms ease;
}

.switch-row input:checked + .switch::before {
    transform: translateX(22px);
    background: white;
}

.button-row {
    display: flex;
    gap: 14px;
    margin-top: 12px;
}

.button-row button {
    flex: 1;
}

.button-row.compact {
    margin-top: 14px;
}

.data-card {
    grid-column: 1 / -1;
    width: min(430px, 100%);
    justify-self: center;
}

#importFile {
    display: none;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-panel {
    width: min(460px, 100%);
    padding: 30px;
    border-radius: 18px;
    background: rgba(29, 29, 33, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.42);
    transform: translateY(8px) scale(0.98);
    transition: transform 180ms ease;
    position: relative;
}

.modal-backdrop.active .modal-panel {
    transform: translateY(0) scale(1);
}

.modal-panel h2 {
    margin: 0 0 16px;
    font-size: 1.45rem;
}

.modal-panel p {
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.45;
    margin: 0 0 14px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 50%;
    padding: 0;
}

.modal-example {
    margin-top: 18px;
    padding: 13px 14px;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.92rem;
}

:root[data-theme="minecraft"] body {
    background-color: #202020;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #2f2f34 transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    background: #2f2f34;
    border-radius: 999px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #44444a;
}

*::-webkit-scrollbar-button {
    display: none;
    width: 0;
    height: 0;
}

*::-webkit-scrollbar-corner {
    background: transparent;
}

@media (max-width: 760px) {
    .settings-page {
        width: min(100% - 24px, 520px);
        padding-top: 32px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .settings-card {
        padding: 26px 24px;
    }

    .data-card {
        width: 100%;
    }

    .button-row {
        flex-direction: column;
    }
}

html.minecraft-theme,
html.minecraft-theme body {
    background: #000;
    background-image: none;
}

html.minecraft-theme body::before,
html.minecraft-theme body::after {
    display: none;
    content: none;
}

html.minecraft-theme #minecraft-theme-layer {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background: #000;
}

html.minecraft-theme #minecraft-theme-layer canvas {
    display: block;
    width: 100%;
    height: 100%;
}

html.minecraft-theme .settings-page,
html.minecraft-theme .nexus-nav,
html.minecraft-theme #home-screen,
html.minecraft-theme #search-container {
    position: relative;
    z-index: 1;
}

html.minecraft-theme .settings-card,
html.minecraft-theme .nexus-nav,
html.minecraft-theme #uv-form {
    background: rgba(22, 22, 24, 0.72);
    backdrop-filter: blur(8px);
}