/**
 * 壹手设计工具箱 - 年度统计样式
 * 优雅灰色系主题
 */

/* 主容器 */
.iyesbox-ys-wrap {
    max-width: 1140px !important;
    margin: 0 auto !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif !important;
}

/* 头部 */
.iyesbox-ys-header {
    text-align: center !important;
    margin: 30px 0 25px !important;
}

.iyesbox-ys-year-line {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

.iyesbox-ys-year {
    font-size: clamp(3.2rem, 9vw, 5.5rem) !important;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    color: #333 !important;
    line-height: 1.2 !important;
}

.iyesbox-ys-year-sub {
    font-size: 1.2rem !important;
    font-weight: 400 !important;
    margin-top: 4px !important;
    color: #999 !important;
}

/* 卡片网格 */
.iyesbox-ys-cards {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 18px !important;
    margin-bottom: 50px !important;
}

@media (max-width: 991px) {
    .iyesbox-ys-cards {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
    }
}

/* 卡片样式 - 上浅下深渐变 */
.iyesbox-ys-card {
    border: 1px solid #e0e0e0 !important;
    border-radius: 12px !important;
    padding: 24px 12px !important;
    text-align: center !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8f8f8 100%) !important;
    transition: transform 0.3s, box-shadow 0.3s !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.iyesbox-ys-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08) !important;
}

.iyesbox-ys-card .iyesbox-ys-num {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: #666 !important;
    line-height: 1 !important;
}

.iyesbox-ys-card .iyesbox-ys-unit {
    font-size: 1.15rem !important;
    font-weight: 400 !important;
    color: #999 !important;
    margin-left: 3px !important;
}

.iyesbox-ys-card .iyesbox-ys-txt {
    font-size: 0.9rem !important;
    margin-top: 6px !important;
    color: #aaa !important;
}

/* 矩阵网格 */
.iyesbox-ys-matrix {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    margin: 20px 0 !important;
}

/* 矩阵项 */
.iyesbox-ys-matrix-item {
    position: relative !important;
    overflow: hidden !important;
    background: #f5f5f5 !important;
    border-radius: 8px !important;
    aspect-ratio: 22 / 10 !important;
    display: block !important;
    text-decoration: none !important;
    line-height: 0 !important;
}

/* 第一项占满整行 */
.iyesbox-ys-matrix-item.iyesbox-ys-first {
    grid-column: 1 / -1 !important;
    aspect-ratio: 22 / 10 !important;
}

/* 图片容器 */
.iyesbox-ys-matrix-item img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.4s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.iyesbox-ys-matrix-item:hover img {
    transform: scale(1.05) !important;
}

/* 遮罩层 */
.iyesbox-ys-matrix-overlay {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: flex-end !important;
    padding: 16px !important;
    opacity: 0 !important;
    transition: opacity 0.35s ease !important;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 60%) !important;
    color: #fff !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
    z-index: 2 !important;
}

.iyesbox-ys-matrix-item:hover .iyesbox-ys-matrix-overlay {
    opacity: 1 !important;
}

/* ===========================================
   排名角标 - 背景透明度逐步递减（文字不透明）
   =========================================== */

/* 排名角标基础样式 */
.iyesbox-ys-rank-corner {
    position: absolute !important;
    left: 12px !important;
    top: 12px !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    z-index: 3 !important;
    display: inline-block !important;
    line-height: 1.2 !important;
    letter-spacing: 0.5px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

/* TOP01 - 完全不透明背景 */
.iyesbox-ys-matrix-item:nth-child(1) .iyesbox-ys-rank-corner {
    background: #FF4600 !important;
}

/* TOP02 - 90% 不透明背景 */
.iyesbox-ys-matrix-item:nth-child(2) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.9) !important;
}

/* TOP03 - 80% 不透明背景 */
.iyesbox-ys-matrix-item:nth-child(3) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.8) !important;
}

/* TOP04 - 70% 不透明背景 */
.iyesbox-ys-matrix-item:nth-child(4) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.7) !important;
}

/* TOP05 - 60% 不透明背景 */
.iyesbox-ys-matrix-item:nth-child(5) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.6) !important;
}

/* TOP06 - 50% 不透明背景 */
.iyesbox-ys-matrix-item:nth-child(6) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.5) !important;
}

/* TOP07 - 40% 不透明背景 */
.iyesbox-ys-matrix-item:nth-child(7) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.4) !important;
}

/* TOP08 - 30% 不透明背景 */
.iyesbox-ys-matrix-item:nth-child(8) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.3) !important;
}

/* TOP09 - 20% 不透明背景，文字加深 */
.iyesbox-ys-matrix-item:nth-child(9) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.2) !important;
    color: #FF6B40 !important;
}

/* TOP10 - 10% 不透明背景，文字加深，加边框 */
.iyesbox-ys-matrix-item:nth-child(10) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.1) !important;
    color: #FF8C66 !important;
    border: 1px solid rgba(255, 70, 0, 0.3) !important;
}

/* 响应式 */
@media (max-width: 768px) {
    .iyesbox-ys-matrix {
        grid-template-columns: 1fr !important;
    }
    .iyesbox-ys-matrix-item.iyesbox-ys-first {
        aspect-ratio: 22 / 10 !important;
    }
    .iyesbox-ys-rank-corner {
        padding: 3px 8px !important;
        font-size: 10px !important;
    }
}

/* ===========================================
   暗色模式
   =========================================== */
html[data-theme="dark"] .iyesbox-ys-year {
    color: #e0e0e0 !important;
}

html[data-theme="dark"] .iyesbox-ys-year-sub {
    color: #888 !important;
}

html[data-theme="dark"] .iyesbox-ys-card {
    background: linear-gradient(180deg, #2a2a2a 0%, #242424 100%) !important;
    border-color: #404040 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

html[data-theme="dark"] .iyesbox-ys-card .iyesbox-ys-num {
    color: #ccc !important;
}

html[data-theme="dark"] .iyesbox-ys-card .iyesbox-ys-unit {
    color: #888 !important;
}

html[data-theme="dark"] .iyesbox-ys-card .iyesbox-ys-txt {
    color: #888 !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item {
    background: #2a2a2a !important;
}

/* 暗色模式角标 - 背景透明度微调，保持可见性 */
html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(1) .iyesbox-ys-rank-corner {
    background: #FF4600 !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(2) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.9) !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(3) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.8) !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(4) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.7) !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(5) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.6) !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(6) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.5) !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(7) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.45) !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(8) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.4) !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(9) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.35) !important;
    color: #FFBA8F !important;
}

html[data-theme="dark"] .iyesbox-ys-matrix-item:nth-child(10) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.3) !important;
    color: #FFBA8F !important;
    border: 1px solid rgba(255, 70, 0, 0.4) !important;
}

/* ===========================================
   兼容 .dark 类
   =========================================== */
html.dark .iyesbox-ys-year {
    color: #e0e0e0 !important;
}

html.dark .iyesbox-ys-year-sub {
    color: #888 !important;
}

html.dark .iyesbox-ys-card {
    background: linear-gradient(180deg, #2a2a2a 0%, #242424 100%) !important;
    border-color: #404040 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
}

html.dark .iyesbox-ys-card .iyesbox-ys-num {
    color: #ccc !important;
}

html.dark .iyesbox-ys-card .iyesbox-ys-unit {
    color: #888 !important;
}

html.dark .iyesbox-ys-card .iyesbox-ys-txt {
    color: #888 !important;
}

html.dark .iyesbox-ys-matrix-item {
    background: #2a2a2a !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(1) .iyesbox-ys-rank-corner {
    background: #FF4600 !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(2) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.9) !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(3) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.8) !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(4) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.7) !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(5) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.6) !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(6) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.5) !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(7) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.45) !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(8) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.4) !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(9) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.35) !important;
    color: #FFBA8F !important;
}

html.dark .iyesbox-ys-matrix-item:nth-child(10) .iyesbox-ys-rank-corner {
    background: rgba(255, 70, 0, 0.3) !important;
    color: #FFBA8F !important;
    border: 1px solid rgba(255, 70, 0, 0.4) !important;
}
