* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: Arial, sans-serif;
}
#d0 {
    display: grid;
    /* 首页的样式，各个页面有自己的布局，需要分别设定
    grid-template-rows: 1fr 2fr 2fr 1fr 5fr 1fr 1fr 1.2fr;
    */
    grid-row-gap: 1px; /* 单独控制上下间隙 */
    grid-column-gap: 3px; /* 保持左右间隙不变 */
    padding: 3px; /* 减小内边距 */
    background-color: lightyellow;
    height: 100vh;
    width: 100%;
    box-sizing: border-box;
}
.row {
     border: 0.1px solid whitesmoke;
     background-color: lightyellow;
     border-radius: 5px;
}
.cell {
     display: flex;
     align-items: center;
     justify-content: center;
     text-align: center;
     background-color: darkcyan;
     color: white;
     font-weight: bold;
     border-radius: 4px;
     font-size: calc(2.2vh + 0.8vw);
     line-height: 1.2;
}
.cell-font-tiny {
     display: flex;
     align-items: center;
     justify-content: center;
     text-align: center;
     background-color: darkcyan;
     color: white;
     font-weight: bold;
     border-radius: 4px;
     font-size: calc(2vh + 0.7vw);
     line-height: 1.2;
}
.cell-font-tiny-2 {
     display: flex;
     align-items: center;
     justify-content: center;
     text-align: center;
     background-color: darkcyan;
     color: white;
     font-weight: bold;
     border-radius: 4px;
     font-size: calc(1.7vh + 0.6vw);
     line-height: 1.2;
}
.cell-font-tin-2 {
     display: flex;
     align-items: center;
     justify-content: center;
     text-align: center;
     background-color: darkcyan;
     color: white;
     border-radius: 4px;
     font-size: calc(1.7vh + 0.6vw);
     line-height: 1.2;
}
.cell-font-tin-3 {
     display: flex;
     align-items: center;
     justify-content: center;
     text-align: center;
     background-color: darkcyan;
     color: white;
     border-radius: 4px;
     font-size: calc(1.5vh + 0.5vw);
     line-height: 1.2;
}
#newsMarqueeInner {
     font-size: calc(2vh + 0.7vw);
     line-height: 1.2;
}

/* 极窄屏幕适配 - 宽度小于768px时字体更小 */
@media (max-width: 768px) {
    .cell {
        font-size: calc(1.8vh + 0.5vw);
        line-height: 1.2;
    }
    .cell-font-tiny {
        font-size: calc(1.6vh + 0.4vw);
        line-height: 1.2;
    }
    .cell-font-tiny-2 {
        font-size: calc(1.4vh + 0.3vw);
        line-height: 1.2;
    }
    .cell-font-tin-2 {
        font-size: calc(1.4vh + 0.3vw);
        line-height: 1.2;
    }
    .cell-font-tin-3 {
        font-size: calc(1.2vh + 0.25vw);
        line-height: 1.2;
    }
    #newsMarqueeInner {
        font-size: calc(1.6vh + 0.4vw);
        line-height: 1.2;
    }
}

.row-dy-1 {
    display: grid;
    grid-template-rows: 1fr;
}
.row-dy-2 {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
}
.row-dy-3 {
    display: grid;
    grid-template-rows: repeat(3, 1fr);
}
.row-dy-4 {
    display: grid;
    grid-template-rows: repeat(4, 1fr);
}
.row-dy-5 {
    display: grid;
    grid-template-rows: repeat(5, 1fr);
}
.row-dy-6 {
    display: grid;
    grid-template-rows: repeat(6, 1fr);
}
.row-dy-7 {
    display: grid;
    grid-template-rows: repeat(7, 1fr);
}
.row-dy-8 {
    display: grid;  
    grid-template-rows: repeat(8, 1fr);
}
.col-dy-1 {
    display: grid;
    grid-template-columns: 1fr;
}
.col-dy-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
}
.col-dy-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}
.col-dy-4 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
}
.col-dy-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
}
#d2,#d3,#d4,#d5,#d6,#d7,#d8{
    border:1px solid red;
}

#d2a, #d2b {
    height: 100%;
}
@keyframes marquee {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

#debug-info-box {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    background: rgba(0, 0, 0, 0.98) !important;
    color: #0f0 !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    font-family: monospace !important;
    font-size: 2vh !important;
    overflow-y: auto !important;
    z-index: 99999 !important;
    display: block !important;
}
