:root {
    --theme-color: #f2e4ce;
    --theme-brightness: 100%;
}

/* 页面主体 */
body {
    margin: 0;
    padding: 0;
    color: #4a4035;
    background-color: var(--theme-color);
    font-family: "Microsoft YaHei", Arial, sans-serif;
}

/* 背景亮度层 */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: var(--theme-color);
    filter: brightness(var(--theme-brightness));
}

/* 页首 */
.animated-header {
    position: relative;
    height: 190px;
    margin-bottom: 30px;
    overflow: hidden;
    text-align: center;
    color: #765b3d;
    background: var(--theme-color);
}

.header-wave,
.footer-wave {
    position: absolute;
    left: -50%;
    width: 200%;
    height: 100px;
    border-radius: 45%;
}

.header-wave {
    bottom: -62px;
    background: #fffdf8;
    animation: waveMove 9s linear infinite;
}

.header-wave-two {
    bottom: -50px;
    background: rgba(255, 250, 241, 0.72);
    animation-duration: 12s;
    animation-direction: reverse;
}

.header-text {
    position: relative;
    z-index: 2;
    padding-top: 52px;
    animation: textIn 1.5s ease-out both;
}

.header-text span,
.header-text small,
.footer-text span,
.footer-text small {
    display: block;
}

.header-text span {
    margin-bottom: 12px;
    font-size: 30px;
    font-weight: bold;
    letter-spacing: 4px;
    text-shadow: 0 2px 8px rgba(125, 91, 46, 0.16);
}

.header-text small,
.footer-text small {
    font-size: 14px;
    letter-spacing: 2px;
    color: #9a7950;
}

/* 页脚 */
.animated-footer {
    position: relative;
    height: 180px;
    margin-top: 50px;
    overflow: hidden;
    text-align: center;
    color: #765b3d;
    background: var(--theme-color);
}

.footer-wave {
    top: -52px;
    background: #fffdf8;
    animation: waveMove 8s linear infinite;
}

.footer-wave-two {
    top: -40px;
    background: rgba(255, 250, 241, 0.72);
    animation-duration: 11s;
    animation-direction: reverse;
}

.footer-text {
    position: relative;
    z-index: 2;
    padding-top: 88px;
    animation: textIn 1.8s ease-out both;
}

.footer-text span {
    margin-bottom: 10px;
    font-size: 21px;
    font-weight: bold;
    letter-spacing: 3px;
}

/* 右下角主题控制面板 */
.theme-panel {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    width: 170px;
    padding: 14px;
    color: #5f4932;
    background: rgba(255, 250, 241, 0.96);
    border: 1px solid rgba(135, 101, 61, 0.25);
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(100, 75, 45, 0.18);
    font-size: 13px;
}

.theme-panel label {
    display: block;
    margin-bottom: 12px;
}

.theme-panel label:last-child {
    margin-bottom: 0;
}

.theme-panel input[type="color"] {
    display: block;
    width: 100%;
    height: 30px;
    margin-top: 6px;
    padding: 2px;
    cursor: pointer;
    border: 1px solid #d7c1a2;
    border-radius: 5px;
    background: #fff;
}

.theme-panel input[type="range"] {
    display: block;
    width: 100%;
    margin-top: 9px;
    accent-color: #a98250;
    cursor: pointer;
}

/* 动画 */
@keyframes waveMove {
    from {
        transform: translateX(0) rotate(0deg);
    }

    to {
        transform: translateX(25%) rotate(360deg);
    }
}

@keyframes textIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(0.88);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 手机端适配 */
@media screen and (max-width: 600px) {
    .animated-header {
        height: 160px;
    }

    .header-text {
        padding-top: 42px;
    }

    .header-text span {
        font-size: 23px;
        letter-spacing: 2px;
    }

    .header-text small,
    .footer-text small {
        font-size: 11px;
    }

    .animated-footer {
        height: 155px;
    }

    .footer-text {
        padding-top: 78px;
    }

    .footer-text span {
        font-size: 18px;
    }

    .theme-panel {
        right: 10px;
        bottom: 10px;
        width: 145px;
        padding: 10px;
        font-size: 12px;
    }
}