/* 字体调用 */
* {
    font-family: 'yrdzstmedium', 'youmaozai', Arial, Roboto, pingfang SC, helvetica neue, microsoft yahei ui, microsoft yahei, simsun, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

li {
    list-style: none;
}

img {
    vertical-align: top;
    border: none;
}

a {
    text-decoration: none;
}

/* 响应式优化 */
html {
    font-size: 62.5%;
}

html {
    width: 100%;
    height: 100%;
}

body {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
}

.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.15em;
    fill: currentColor;
    overflow: hidden;
}

.header {
    width: 100%;
    height: 3rem;
    border-bottom: 0.1rem solid rgb(193, 38, 207);
    display: flex;
    justify-content: space-between;
    background: linear-gradient(to right, rgba(67, 198, 172, 0.2), rgba(205, 211, 142, 0.6));
    align-items: center;
}

.header button {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-right: 0.1rem solid rgb(193, 38, 207);
    display: flex;
    justify-content: center;
    align-items: center;
}

.windows-active {
    /* 使用 filter 生成器计算出你想要的激活颜色 */
    /* 例如，从黑色变为蓝色 */
    filter: invert(38%) sepia(98%) saturate(1531%) hue-rotate(189deg) brightness(98%) contrast(89%);
}

.header button img {
    width: 3rem;
    height: 100%;
    padding: 0;
}

.header .top-left {
    display: flex;
    align-items: center;
    text-align: center;
    line-height: 3rem;
    max-width: 30%;
    min-width: 0;
}

.top-left .nav-links {
    color: #e44373;
    line-height: 3rem;
    display: flex;
}
.top-left .nav-links .nav-item {
    max-width: 8rem;
}

.top-left .nav-links a {
    padding: 0 1rem;
    height: 100%;
    border-right: 0.1rem solid #e639ac;
    color: #e44373;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-left .nav-links .nav-item:hover {
    background: linear-gradient(to right, rgba(151, 150, 240, 0.8), rgba(251, 199, 212, 1));
    color: transparent;
    -webkit-background-clip: text;
    animation: ran 25s linear infinite;
}

.top-left .nav-links .active {
    background: linear-gradient(to right, rgba(151, 150, 240, 0.8), rgba(251, 199, 212, 1));
    color: transparent;
    -webkit-background-clip: text;
    animation: ran 25s linear infinite;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.word {
    color: #2792C3;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.top-right {
    min-width: 0;
}

.top-right ul {
    display: flex;
    align-items: center;
    text-align: center;
    line-height: 3rem;
}

.top-right ul li {
    height: 100%;
    padding-left: 1.1rem;
    padding-right: 1.1rem;
    border-right: 0.1rem solid #e639ac;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 0.1rem solid #cccccc;
    color: #e44373;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 日历链接样式 */
.top-right ul li a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-decoration: none;
}

/* 控制右侧图片大小 */
.top-right ul li img {
    width: 2.4rem;
    height: 2.4rem;
}

/* 日历图标容器 */
.calendar-icon-wrapper {
    position: relative;
    width: 2.4rem;
    height: 2.4rem;
    display: inline-block;
    flex-shrink: 0;
}

/* 日历背景图 */
.calendar-icon-wrapper .calendar-bg {
    width: 100%;
    height: 100%;
    display: block;
}

/* 日历日期数字 */
.calendar-icon-wrapper .calendar-date {
    position: absolute;
    top: 62%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.1rem;
    font-weight: bold;
    color: #D4237A;
    pointer-events: none;
    line-height: 1;
    user-select: none;
}

/* 微信二维码弹出层 - 使用更具体的 ID 选择器 */
.top-right #bigwx {
    width: 15rem;
    height: 15rem;
    position: absolute;
    top: 3.2rem;
    right: 0;
    display: none;
}

/* 展开盒子 定义宽高，边框阴影， 绝对定位， 默认隐藏 */
.top-right #new-date {
    width: 70rem;
    height: 15rem;
    border: 0.1rem solid #cccccc;
    box-shadow: -0.2rem 0.2rem #cccccc;
    position: absolute;
    top: 3rem;
    right: 0;
    display: none;
}

/* 表格 */
.top-right #new-date table {
    text-align: center;
    border-collapse: collapse;
    margin: 0 auto;
}

.top-right #new-date table th {
    width: 300rem;
    height: 7.5rem;
}

.top-right #new-date table th:first-child {
    width: 5rem;
}


/* 侧边导航Main 宽高定义， 背景， 绝对定位， 默认定位页面外左， 伸缩布局， 主轴竖向*/

.main {
    flex-grow: 1;
    overflow-y: auto;
}

.main .main-left {
    background: linear-gradient(to bottom, rgba(67, 198, 172, 0.9), rgba(205, 211, 142, 0.9));
    height: 100%;
    width: 18rem;
    position: fixed;
    top: 0;
    left: -20rem;
    display: flex;
    flex-direction: column;
    z-index: 999;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}

.main .main-left ul {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.main .main-left ul li {
    padding: 1.2rem 1.5rem;
    font-size: 1.4rem;
    color: #333;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s ease;
}

.main .main-left ul li:first-child {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: bold;
    color: #e44373;
}

.main .main-left ul li a {
    color: #333;
    text-decoration: none;
    display: block;
    font-weight: 500;
}

.main .main-left ul li:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.search-box {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-wrapper {
    position: relative;
    width: 100%;
    max-width: 40%;
    min-width: 30%;
    margin: 20px;
    display: flex;
}



.search-input {
    width: 100%;
    height: 50px;
    padding: 0 20px 0 50px; /* 左边距留出图标空间 */
    font-size: 1.6rem;

    /* 核心样式 */
    border: 1px solid #ddd;
    border-radius: 1.4rem; /* height 的一半，形成完美圆角 */
    background-color: #f8f9fa;
    color: #333;

    /* 移除默认轮廓并添加过渡 */
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 自定义占位符颜色 */
.search-input::placeholder {
    color: #aaa;
}

/* 聚焦时的样式 */
.search-input:focus {
    border-color: #007bff;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1); /* 添加柔和的发光效果 */
}

/* 图标样式 */
.input-wrapper .search-icon {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: #aaa; /* 图标颜色 */
    transition: fill 0.3s ease;
}

.input-wrapper .search-icon-right {
    position: absolute;
    top: 50%;
    right: 18px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: #aaa; /* 图标颜色 */
    transition: fill 0.3s ease;
    cursor: pointer;
    border-radius: 50%;
}

.search-icon-right:hover {
    transform: translateY(-50%) scale(1.1); /* 悬浮时轻微放大 */
}

/* --- 下拉菜单容器样式 --- */
.engine-dropdown {
    position: absolute;
    top: calc(100% + 10px); /* 位于输入框下方 10px 处 */
    right: 0;

    width: 180px; /* 下拉菜单宽度 */
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    list-style: none;
    padding: 8px 0;
    margin: 0;
    z-index: 10;

    /* 核心动画：默认隐藏 */
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none; /* 隐藏时不可交互 */
    transition: opacity 0.2s ease, transform 0.2s ease;
}

/* --- .is-open 状态：显示下拉菜单 --- */
.engine-dropdown.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* --- 下拉菜单项样式 --- */
.dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dropdown-item:hover {
    background-color: #f0f2f5;
}

.dropdown-item img {
    height: 20px;
    margin-right: 10px;
}

.dropdown-item span {
    font-size: 14px;
}


/* 聚焦时，图标颜色也跟着改变 */
.search-input:focus + .search-icon,
.input-wrapper:focus-within .search-icon { /* :focus-within 也很棒 */
    fill: #007bff;
}

.search-box .search-button {
    background-color: transparent;
}

footer {
    width: 100%;
    text-align: center;
    font-size: 1rem;
    color: #333;
    background-color: transparent;
    height: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
    vertical-align: middle;
}


@media (max-width: 768px) {
    html {
        /* 16px * 56.25% ≈ 9px. 现在在这个断点下 1rem = 9px */
        font-size: 56.25%;
    }

    .header-center {
        display: none;
    }

    /* 移动端隐藏导航链接 */
    .top-left .nav-links {
        display: none;
    }

    /* 移动端显示菜单按钮 */
    .header button {
        display: flex;
    }

    /* 优化菜单按钮区域 */
    .header .top-left {
        max-width: auto;
        min-width: auto;
    }

    .top-right ul li {
        padding: 0;
    }

    /* 隐藏 IP 地址 */
    .top-right ul li.ip {
        display: none;
    }

    /* 隐藏二维码图标 */
    .top-right ul li img[alt="公众号"] {
        display: none;
    }

    /* 隐藏包含二维码图标的 li */
    .top-right ul li:has(img[alt="公众号"]) {
        display: none;
    }

    /* 隐藏二维码弹出层 */
    .top-right #bigwx {
        display: none !important;
    }

    /* 优化顶部右侧区域 */
    .top-right ul {
        gap: 0;
    }

    /* 优化日历图标的显示 */
    .top-right ul li:has(.calendar-icon-wrapper) {
        padding-left: 0.8rem;
        padding-right: 0.8rem;
    }

    /* 移动端日历图标适配 */
    .calendar-icon-wrapper {
        width: 2.2rem;
        height: 2.2rem;
    }

    .calendar-icon-wrapper .calendar-date {
        font-size: 0.9rem;
    }

    /* 移动端侧边栏优化 */
    .main .main-left {
        width: 70%;
        max-width: 25rem;
        height: 100%;
        left: -100%;
        background: linear-gradient(to bottom, rgba(67, 198, 172, 0.95), rgba(205, 211, 142, 0.95));
        backdrop-filter: blur(10px);
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    }

    .main .main-left ul {
        padding: 2rem 0;
    }

    .main .main-left ul li {
        padding: 1.5rem 2rem;
        font-size: 1.6rem;
        color: #333;
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    }

    .main .main-left ul li a {
        color: #333;
        font-weight: 500;
    }

    .main .main-left ul li:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

    .input-wrapper {
        min-width: 80%;
        max-width: 90%;
    }

    footer{
        word-break: break-word;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }
}

/* 侧边栏遮罩层 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
}
