/* 我真操了 */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 0;
    padding: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
    text-decoration: inherit;
    font-family: inherit;
    font-style: inherit;
    font-variant: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    word-spacing: inherit;
}

/* 引入 HarmonyOS Sans Black 字体，仅用于天气城市标题 */
@font-face {
    font-family: 'HarmonyOS Sans Black';
    src: url('https://fonts.cdnfonts.com/s/107783/HarmonyOS_Sans_Black.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

/* 引入 Better Grade 字体（英文副标题使用） */
@font-face {
    font-family: 'Better Grade';
    font-style: normal;
    font-weight: 400;
    src: local('Better Grade'), url('https://fonts.cdnfonts.com/s/116897/BetterGrade-Regular.woff') format('woff');
    font-display: swap;
}

.general-container {
    border-radius: 10px;
    background-color: #1e1e1e;
    padding: 16px;
    max-width: 1200px;
    margin: 0 auto 10px;
    position: relative;
}

.info-container {
    border-radius: 0;
    background: none;
    border: none;
    padding: 0;
    max-width: calc(1200px + 32px);
    margin: 0 auto 10px;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    /* 允许自动换行 */
    align-items: flex-start;
    /* 顶部对齐更自然 */
    gap: 12px;
}

.info-card,
.info-card-i,
.info-card-gg {
    display: inline-block;
    /* 不独占一行，基于内容宽度 */
    box-sizing: border-box;
    /* 内边距与边框计入卡片总宽度 */
    vertical-align: top;
    /* 多卡片时顶部对齐更自然 */
    border-radius: 10px;
    height: 100px;
    background-color: #1e1e1e;
    padding: 7px 10px;
    position: relative;
    white-space: normal;
    /* 允许内部文本换行 */
}



.info-card-i {
    display: inline-flex;
    justify-content: flex-start;
    flex-direction: row;
    align-items: center;
    gap: 12px;
}

/* 让中间卡片占据 info-container 剩余宽度 */
.info-card,
.info-card-gg {
    flex: 0 0 auto;
    /* 左右两侧卡片根据内容宽度 */
    min-width: 0;
    /* 允许内容收缩以触发文本换行 */
}

.info-card-i {
    flex: 1 1 auto;
    /* 中间卡片填充剩余空间 */
    min-width: 0;
    /* 允许在需要时收缩避免溢出 */
}

/* 当页面变窄（可能出现折行）时，强制三卡片各占一整行并占满 */
@media (max-width: 1000px) {
    .info-container {
        flex-direction: column;
        /* 改为纵向堆叠，彻底避免 2+1 */
    }

    .info-container>.info-card,
    .info-container>.info-card-i,
    .info-container>.info-card-gg {
        flex: 0 0 100%;
        /* 不缩不长，独占一行 */
        width: 100%;
        min-width: 0;
    }

    .info-card-gg {
        background-color: transparent;
        border: 1px solid transparent;
        height: auto !important;
    }

    /* 单行展示：图片宽度占据整行，高度自动，按原始比例展示 */
    .info-card-gg img {
        width: 100% !important;
        height: auto !important;
        border-radius: 10px;
    }

    /* 轮播容器与子元素在移动端自适应高度，随图片比例变化 */
    .carousel-container {
        height: auto !important;
        overflow: visible;
    }
    .carousel-wrapper {
        height: auto !important;
    }
    .carousel-slide {
        height: auto !important;
        min-width: 100%;
    }
    .carousel-slide img {
        width: 100% !important;
        height: auto !important;
    }
}

.info-card p {
    font-size: 0.8em;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    color: var(--ss-text-Label);
}

.emoji {
    font-family: 'Noto Color Emoji', sans-serif;
    font-size: 2.3rem;
}

/* 信息模块：状态行与进度条 */
.info-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
}

.info-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    width: 100%;
}

.info-stat-label {
    font-size: 14px;
    color: #ddd;
    flex: 0 0 40px;
    /* 固定标签宽度，统一进度条起点 */
    text-align: right;
    /* 标签右对齐更紧凑 */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-stat-progress {
    flex: 1 1 auto;
    height: 10px;
    background: #2a2a2a;
    border-radius: 6px;
    overflow: hidden;
}

.info-stat-progress-fill {
    width: var(--percent, 0%);
    height: 100%;
    background: linear-gradient(90deg, var(--ss-primary, #ff6a00) 0%, #ffd966 100%);
    transition: width 0.25s ease;
    border-radius: 6px;
}

.weather-container {
    display: flex;
    border-radius: 10px;
    background-color: #1e1e1e;
    padding: 10px 16px;
    max-width: 1200px;
    margin: 0 auto 10px;
    position: relative;
}

.weather-card {
    background-color: #262626;
    width: 77px;
    height: 6px;
    padding: 24px 16px;
    border-radius: 10px;
    left: 95px;
    top: 4px;
    position: relative;
    margin-right: 25px;
    display: block;
}

.weather-card-temp {
    background-color: #353535;  
    border-radius: 50px;
    left: -18px;
    bottom: 7px;
    width: 15px;
    height: 15px;
    padding: 20px 20px;
    display: block;
    position: absolute;
}

/* 天气模块城市标题使用 HarmonyOS 粗黑体 */
.weather-title {
    font-family: 'HarmonyOS Sans Black', 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    font-weight: 900;
    font-size: 2.3em;
    margin: -12px;
}

/* 中文主标题微调，避免负边距影响布局 */
.weather-title {
    margin: 0;
    display: inline-block;
}

/* 英文副标题：位于中文标题底部，左下偏移，红蓝渐变 */
.weather-title-sub {
    position: absolute;
    left: 2%;
    top: 44%;
    /* 依据容器内边距与中文标题高度估算的底部位置 */
    transform: translate(-6px, 6px);
    /* 向左下角微调 */
    margin: 0;
    font-size: 2.2em;
    /* 副标题相对主标题更小一些 */
    font-family: 'Better Grade', 'HarmonyOS Sans Black', 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    font-weight: 400;
    /* font-style: normal; */
    /* font-synthesis: none;  */
    background: linear-gradient(90deg, #ff6a00 0%, #2979ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.password-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

@media (max-width: 1279px) {

    .general-container,
    .weather-container,
    .info-container {
        margin: 10px;
    }
}

@media (max-width: 900px) {
    .password-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 800px) {
    .general-container {
        margin: 10px;
    }

    .password-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 639px) {
    .general-container {
        margin: 10px;
    }

    .password-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.password-card {
    position: relative;
    border-radius: 10px;
    background-color: #313131;
    border: 1px solid #5b5b5b;
    overflow: hidden;
    aspect-ratio: 276 / 102;
}

.password-card-image {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
    /* 从左至右渐变，右侧全透明 */
    mask: linear-gradient(to right, #000 50%, transparent 80%);
    -webkit-mask: linear-gradient(to right, #000 50%, transparent 80%);
    /* 禁止拖拽 */
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

.password-location {
    position: absolute;
    color: #ffa600;
    font-weight: 900;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
    user-select: none;
    right: 6%;
    top: 28%;
    transform: translateY(-50%);
    font-size: clamp(14px, 2.4vw, 18px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.password-code {
    position: absolute;
    color: #ffa600;
    font-weight: 900;
    line-height: 1;
    text-align: right;
    white-space: nowrap;
    user-select: none;
    right: 6%;
    top: 71%;
    transform: translateY(-50%);
    font-size: clamp(24px, 5.5vw, 40px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.error-msg {
    color: #ff6b6b;
    text-align: center;
    padding: 20px;
    font-size: 14px;
}

.cache-note {
    font-size: 12px;
    color: #888;
    text-align: center;
    margin-top: 8px;
}

/* 本周一个亿移动端适配：限制卡片高度与内容溢出 */
@media (max-width: 768px) {
    .weekly-container>* {
        max-height: 50px;
        overflow: hidden;
    }

    /* 直接图片型卡片的缩放 */
    .weekly-container>*>img {
        width: 50px !important;
        height: 50px !important;
        flex: 0 0 auto;
        object-fit: contain;
    }

    /* 含头像容器型卡片（例如 Liusy）的左侧区块限制 */
    .weekly-container>*>div:first-child {
        width: 50px !important;
        height: 50px !important;
        overflow: hidden;
    }

    .weekly-container>*>div:first-child img {
        width: 50px !important;
        height: 50px !important;
        object-fit: contain;
    }

    /* 文字区避免溢出并省略显示 */
    .weekly-container>*>div:last-child {
        min-width: 0;
        /* 让省略号在flex中生效 */
        overflow: hidden;
    }

    .weekly-container>*>div:last-child h3,
    .weekly-container>*>div:last-child div {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* B站角标（移动端适配） */
    .weekly-container .bili-badge {
        right: 0px !important;
        bottom: 0px !important;
        width: 22px !important;
        height: 22px !important;
    }
}

/* 标题 */
.container-title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
}

.title-update-time {
    color: #ccc;
    font-size: 14px;
    font-weight: 400;
    margin-left: 8px;
}

/* Lucide 渲染后会生成 svg.lucide，针对该类保证靠右 */
.container-title .lucide {
    margin-left: auto;
    flex-shrink: 0;
    color: #ccc;
    width: 22px;
    height: 22px;
}

/* 信息图标容器靠右，并用于承载提示框 */
.container-title .info-icon {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    outline: none;
}

/* Lucide 图标本身禁用指针事件，点击聚焦到容器 */
.container-title .info-icon .lucide {
    pointer-events: none;
}

/* 提示内容为真实元素，支持 HTML 换行 */
.container-title .info-icon .tooltip-content {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    /* 默认在图标下方，避免未计算时水平对齐 */
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.92);
    color: #ddd;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    /* 允许 <br> 换行 */
    text-align: left;
    /* 文本右对齐 */
    word-break: break-word;
    /* 长词在边界断行 */
    overflow-wrap: anywhere;
    /* 任意位置断行避免溢出 */
    display: block;
    width: max-content;
    min-width: 220px;
    max-width: min(420px, 85vw);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
}

.container-title .info-icon .tooltip-content::before {
    content: "";
    position: absolute;
    right: 12px;
    border-width: 6px;
    border-style: solid;
    top: -6px;
    /* 默认箭头在下方样式 */
    border-color: transparent transparent #444 transparent;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.container-title .info-icon.tooltip-bottom .tooltip-content {
    top: calc(100% + 8px);
    bottom: auto;
}

.container-title .info-icon.tooltip-top .tooltip-content {
    bottom: calc(100% + 8px);
    top: auto;
}

.container-title .info-icon.tooltip-bottom .tooltip-content::before {
    top: -6px;
    bottom: auto;
    border-color: transparent transparent #444 transparent;
}

.container-title .info-icon.tooltip-top .tooltip-content::before {
    bottom: -6px;
    top: auto;
    border-color: #444 transparent transparent transparent;
}

.container-title .info-icon:hover .tooltip-content,
.container-title .info-icon:hover .tooltip-content::before {
    opacity: 1;
    transform: translateY(0);
}

/* 移动端：点击（聚焦）后显示提示框，仅在触屏/无悬停设备启用 */
@media (hover: none),
(pointer: coarse) {

    .container-title .info-icon:focus .tooltip-content,
    .container-title .info-icon:focus .tooltip-content::before,
    .container-title .info-icon.tooltip-active .tooltip-content,
    .container-title .info-icon.tooltip-active .tooltip-content::before {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }
}

.update-badge {
    position: absolute;
    top: 8px;
    left: 12px;
    color: #aaa;
    font-size: 12px;
}

/* 天气数据单行显示，使用 HarmonyOS 粗黑体 */
.weather-info {
    display: inline-flex;
    gap: 10px;
    align-items: baseline;
    margin-top: 8px;
    color: #fff;
    font-family: 'HarmonyOS Sans Black', 'HarmonyOS Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    font-weight: 900;
    font-size: 1.5em;
}

.weather-info>span {
    display: inline-block;
}

#zz-chart-container,
#ss-chart-container {
    height: 250px;
    margin: 0 auto;
    border: 1px solid #262626;
    border-radius: 8px;
    padding: 10px;
    overflow: hidden;
    /* 防止 ECharts 旧尺寸画布溢出 */
}

#ss-chart-container {
    height: 300px;
}

.zz-bing-data-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.zz-bing-data-title,
.ss-bing-data-title {
    display: block;
    font-size: 18px;
    font-weight: 700;
    margin: 0;
    background-color: #171717;
    border: 1px solid #262626;
    padding: 10px;
    border-radius: 8px;
}

/* 修复轮播容器宽度问题 */
.info-card-gg {
    min-width: 300px !important;
    max-width: 300px !important;
    width: 300px !important;
}

@media (max-width: 1000px) {
    .info-card-gg {
        min-width: 0 !important;
        max-width: none !important;
        width: 100% !important;
    }
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100px;
    overflow: hidden;
}

/* 只有多个广告时才显示拖拽样式 */
.carousel-container:has(.carousel-clone) {
    cursor: grab;
}

.carousel-container:has(.carousel-clone):active {
    cursor: grabbing;
}

.carousel-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.carousel-wrapper.no-transition {
    transition: none;
}
.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    position: relative;
    min-width: 100%;
}
.carousel-slide img {
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border-radius: 10px;
}
.carousel-slide a {
    display: block;
    width: 100%;
    height: 100%;
}
.carousel-indicators {
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}
.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.carousel-indicator.active {
    background-color: rgba(255, 255, 255, 0.9);
}
.carousel-indicator:hover {
    background-color: rgba(255, 255, 255, 0.8);
}
