* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {

    --accent: #d9a441;
    --accent-light: #f4d58b;

    --text: #f5f1e8;
    --muted: rgba(245,241,232,.55);

    --background: #0b0907;

    --card:
        rgba(20,17,13,.48);

    --card-opacity: .48;

    --card-radius: 22px;

    --glass-blur: 18px;

    --ui-scale: 1;
}


html,
body {

    width: 100%;
    min-height: 100%;

}


body {

    min-height: 100vh;

    overflow-x: hidden;

    color: var(--text);

    font-family:
        Inter,
        "Noto Sans SC",
        "Microsoft YaHei",
        sans-serif;

    background:
        radial-gradient(
            circle at 50% 20%,
            rgba(217,164,65,.12),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #0b0907 0%,
            #15100b 45%,
            #080706 100%
        );

    transition:
        background .4s ease,
        color .3s ease;

}


/* =========================
   背景粒子
========================= */

#particles {

    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    pointer-events: none;

    z-index: 0;

}


/* =========================
   主页面
========================= */

.page {

    position: relative;

    z-index: 1;

    min-height: 100vh;

    display: flex;

    flex-direction: column;

    align-items: center;

    padding:
        calc(70px * var(--ui-scale))
        24px
        40px;

}


/* =========================
   Logo / 标题
========================= */

.logo-area {

    text-align: center;

    margin-bottom:
        calc(12px * var(--ui-scale));

}


.site-logo {

    display: none;

    max-width:
        calc(220px * var(--ui-scale));

    max-height:
        calc(110px * var(--ui-scale));

    object-fit: contain;

}


.logo-area h1 {

    font-family: Georgia, serif;

    font-size:
        calc(78px * var(--ui-scale));

    font-weight: 500;

    letter-spacing: .16em;

    color: var(--accent-light);

    text-shadow:
        0 0 20px rgba(217,164,65,.18),
        0 0 60px rgba(217,164,65,.08);

}


.logo-area p {

    margin-top:
        calc(8px * var(--ui-scale));

    font-size:
        calc(11px * var(--ui-scale));

    letter-spacing: .42em;

    color: var(--muted);

}


/* =========================
   分割线
========================= */

.divider {

    width: min(420px, 70vw);

    height: 1px;

    margin:
        calc(28px * var(--ui-scale))
        auto
        calc(46px * var(--ui-scale));

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--accent),
            transparent
        );

    opacity: .45;

}


/* =========================
   卡片
========================= */

.services {

    width: min(900px, 100%);

    display: grid;

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

    gap:
        calc(20px * var(--ui-scale));

}


.card {

    position: relative;

    min-height:
        calc(180px * var(--ui-scale));

    padding:
        calc(30px * var(--ui-scale));

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    text-decoration: none;

    color: var(--text);

    background:
        var(--card);

    border:
        1px solid
        rgba(255,220,150,.16);

    border-radius:
        var(--card-radius);

    backdrop-filter:
        blur(var(--glass-blur));

    -webkit-backdrop-filter:
        blur(var(--glass-blur));

    overflow: hidden;

    transition:
        transform .35s ease,
        border-color .35s ease,
        box-shadow .35s ease,
        background .35s ease;

}


.card::before {

    content: "";

    position: absolute;

    inset: -2px;

    background:
        radial-gradient(
            circle at var(--mx,50%) var(--my,50%),
            rgba(217,164,65,.13),
            transparent 30%
        );

    opacity: 0;

    transition:
        opacity .3s ease;

    pointer-events: none;

}


.card:hover {

    transform:
        translateY(
            calc(-7px * var(--ui-scale))
        );

    border-color:
        rgba(217,164,65,.42);

    background:
        rgba(30,24,17,.62);

    box-shadow:
        0 18px 50px rgba(0,0,0,.35),
        0 0 35px rgba(217,164,65,.06);

}


.card:hover::before {

    opacity: 1;

}


.icon {

    font-size:
        calc(38px * var(--ui-scale));

}


.card h2 {

    margin-top:
        calc(18px * var(--ui-scale));

    font-family:
        Georgia,
        serif;

    font-size:
        calc(25px * var(--ui-scale));

    font-weight: 500;

}


.card p {

    margin-top: 7px;

    font-size:
        calc(13px * var(--ui-scale));

    color: var(--muted);

}


.status {

    display: flex;

    align-items: center;

    gap: 7px;

    margin-top: 20px;

    font-size:
        calc(11px * var(--ui-scale));

    letter-spacing: .12em;

    color:
        rgba(255,255,255,.45);

}


.dot {

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background:
        rgba(255,255,255,.25);

}


.dot.online {

    background:
        #6fca8a;

    box-shadow:
        0 0 10px
        rgba(111,202,138,.7);

}


/* =========================
   设置按钮
========================= */

.settings {

    margin-top:
        calc(38px * var(--ui-scale));

    border:
        1px solid transparent;

    background:
        transparent;

    color:
        rgba(255,255,255,.42);

    font-size:
        calc(13px * var(--ui-scale));

    cursor: pointer;

    padding: 10px 16px;

    border-radius: 12px;

    transition:
        all .25s ease;

}


.settings:hover {

    color: var(--accent-light);

    background:
        rgba(255,255,255,.04);

    border-color:
        rgba(255,255,255,.07);

}


/* =========================
   页脚
========================= */

.footer {

    margin-top: auto;

    padding-top: 60px;

    color:
        rgba(255,255,255,.2);

    font-size: 10px;

    letter-spacing: .18em;

}


/* =========================
   点击粒子
========================= */

.click-particle {

    position: fixed;

    width: 5px;
    height: 5px;

    border-radius: 50%;

    background:
        var(--accent-light);

    pointer-events: none;

    z-index: 9999;

    animation:
        particle .65s ease-out forwards;

}


@keyframes particle {

    from {

        transform:
            translate(0,0)
            scale(1);

        opacity: 1;

    }

    to {

        transform:
            translate(
                var(--dx),
                var(--dy)
            )
            scale(0);

        opacity: 0;

    }

}


/* =========================
   设置遮罩
========================= */

.settings-overlay {

    position: fixed;

    inset: 0;

    z-index: 10000;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 20px;

    background:
        rgba(0,0,0,.65);

    backdrop-filter:
        blur(8px);

    opacity: 0;

    pointer-events: none;

    transition:
        opacity .25s ease;

}


.settings-overlay.open {

    opacity: 1;

    pointer-events: auto;

}


/* =========================
   设置面板
========================= */

.settings-panel {

    width:
        min(620px, 100%);

    max-height:
        min(850px, 90vh);

    display: flex;

    flex-direction: column;

    background:
        rgba(20,17,13,.94);

    border:
        1px solid
        rgba(217,164,65,.22);

    border-radius: 24px;

    box-shadow:
        0 30px 100px
        rgba(0,0,0,.6);

    overflow: hidden;

}


.settings-header {

    display: flex;

    justify-content: space-between;

    align-items: center;

    padding: 25px 28px;

    border-bottom:
        1px solid
        rgba(255,255,255,.07);

}


.settings-header h2 {

    font-family: Georgia, serif;

    font-weight: 500;

    color:
        var(--accent-light);

}


.settings-header p {

    margin-top: 5px;

    font-size: 11px;

    color: var(--muted);

}


.close-button {

    width: 36px;
    height: 36px;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255,255,255,.06);

    color:
        rgba(255,255,255,.65);

    font-size: 24px;

    cursor: pointer;

}


.settings-content {

    padding: 24px 28px;

    overflow-y: auto;

}


.setting-section {

    padding-bottom: 24px;

    margin-bottom: 24px;

    border-bottom:
        1px solid
        rgba(255,255,255,.06);

}


.setting-section:last-child {

    border-bottom: 0;

}


.setting-section h3 {

    margin-bottom: 18px;

    font-size: 15px;

    font-weight: 500;

    color:
        rgba(255,255,255,.85);

}


.setting-section label {

    display: block;

    margin-bottom: 18px;

    font-size: 12px;

    color:
        rgba(255,255,255,.55);

}


.setting-section input[type="text"] {

    display: block;

    width: 100%;

    margin-top: 8px;

    padding: 11px 13px;

    border:
        1px solid
        rgba(255,255,255,.1);

    border-radius: 10px;

    background:
        rgba(0,0,0,.25);

    color: white;

    outline: none;

}


.setting-section input[type="text"]:focus {

    border-color:
        var(--accent);

}


input[type="range"] {

    width: 100%;

    accent-color:
        var(--accent);

}


.range-row {

    display: grid;

    grid-template-columns:
        1fr 55px;

    gap: 12px;

    align-items: center;

    margin-top: 8px;

}


.range-row span {

    text-align: right;

    color:
        rgba(255,255,255,.7);

}


input[type="color"] {

    width: 100%;

    height: 40px;

    margin-top: 8px;

    padding: 3px;

    border:
        1px solid
        rgba(255,255,255,.1);

    border-radius: 10px;

    background: transparent;

}


.switch-row {

    display: flex !important;

    justify-content: space-between;

    align-items: center;

}


.switch-row input {

    width: 42px;
    height: 22px;

    accent-color:
        var(--accent);

}


/* =========================
   设置底部
========================= */

.settings-footer {

    display: flex;

    justify-content: space-between;

    gap: 12px;

    padding: 20px 28px;

    border-top:
        1px solid
        rgba(255,255,255,.07);

}


.secondary-button,
.primary-button {

    padding:
        11px 18px;

    border-radius: 11px;

    cursor: pointer;

    font-size: 13px;

}


.secondary-button {

    border:
        1px solid
        rgba(255,255,255,.1);

    background:
        transparent;

    color:
        rgba(255,255,255,.6);

}


.primary-button {

    border: 0;

    background:
        var(--accent);

    color:
        #17100a;

    font-weight: 600;

}


/* =========================
   手机
========================= */

@media (max-width: 650px) {

    .page {

        padding-top: 55px;

    }

    .services {

        grid-template-columns: 1fr;

    }

    .logo-area h1 {

        font-size:
            calc(48px * var(--ui-scale));

        letter-spacing: .11em;

    }

    .logo-area p {

        letter-spacing: .25em;

    }

}
/* =========================
   Theme Center
========================= */

.header-actions {

    display: flex;

    align-items: center;

    gap: 10px;

    margin-top:
        calc(38px * var(--ui-scale));

}


/* 主题按钮 */

.settings-button {

    border:
        1px solid transparent;

    background:
        transparent;

    color:
        rgba(255,255,255,.42);

    font-size:
        calc(13px * var(--ui-scale));

    cursor: pointer;

    padding:
        10px 16px;

    border-radius: 12px;

    transition:
        all .25s ease;

}


.settings-button:hover {

    color:
        var(--accent-light);

    background:
        rgba(255,255,255,.04);

    border-color:
        rgba(255,255,255,.07);

}


/* =========================
   主题中心遮罩
========================= */

.overlay {

    position: fixed;

    inset: 0;

    z-index: 10000;

    display: flex;

    justify-content: center;

    align-items: center;

    padding: 20px;

    background:
        rgba(0,0,0,.65);

    backdrop-filter:
        blur(8px);

    -webkit-backdrop-filter:
        blur(8px);

    opacity: 0;

    pointer-events: none;

    transition:
        opacity .25s ease;

}


/* JS 打开时 */

.overlay.show {

    opacity: 1;

    pointer-events: auto;

}


/* =========================
   主题中心面板
========================= */

.theme-panel {

    width:
        min(760px, 100%);

    max-height:
        min(850px, 90vh);

}


/* 主题中心关闭按钮 */

.theme-panel
.settings-header
button {

    width: 36px;

    height: 36px;

    border: 0;

    border-radius: 50%;

    background:
        rgba(255,255,255,.06);

    color:
        rgba(255,255,255,.65);

    font-size: 24px;

    cursor: pointer;

}


/* =========================
   新建主题
========================= */

.theme-toolbar {

    padding:
        18px 28px 0;

    display: flex;

    justify-content: flex-end;

}


/* =========================
   主题列表
========================= */

.theme-list {

    padding:
        0 28px 28px;

    overflow-y: auto;

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;

}


/* =========================
   主题卡片
========================= */

.theme-card {

    position: relative;

    padding: 18px;

    border-radius: 18px;

    background:
        rgba(255,255,255,.045);

    border:
        1px solid
        rgba(255,255,255,.08);

    transition:
        .2s ease;

}


.theme-card:hover {

    transform:
        translateY(-2px);

    border-color:
        var(--accent);

}


.theme-card.active {

    border-color:
        var(--accent);

    box-shadow:
        0 0 0 1px
        rgba(217,164,65,.15),

        0 10px 30px
        rgba(0,0,0,.2);

}


.theme-card-name {

    font-size: 17px;

    font-weight: 700;

    margin-bottom: 6px;

}


.theme-card-id {

    font-size: 11px;

    color:
        var(--muted);

    margin-bottom: 14px;

}


.theme-active {

    position: absolute;

    top: 14px;

    right: 14px;

    font-size: 11px;

    color:
        var(--accent-light);

}


/* =========================
   主题操作
========================= */

.theme-actions {

    display: flex;

    gap: 8px;

    flex-wrap: wrap;

}


.theme-actions button {

    border:
        1px solid
        rgba(255,255,255,.1);

    background:
        rgba(255,255,255,.04);

    color:
        var(--text);

    padding:
        7px 10px;

    border-radius: 9px;

    cursor: pointer;

    font-size: 12px;

}


.theme-actions button:hover {

    border-color:
        var(--accent);

}


.theme-actions .danger {

    color:
        #ff8c8c;

}


/* =========================
   手机
========================= */

@media (max-width: 700px) {

    .theme-list {

        grid-template-columns: 1fr;

    }

}


@media (max-width: 650px) {

    .header-actions {

        width: 100%;

        justify-content: center;

    }

}