/* ===== 开奖大厅 (.dh-*) 列表页 + 走势图 (.tr-*) ===== */

#drawHallPage {
    margin-top: -44px;
    background: #f2f3f5;
    min-height: calc(100vh - 70px);
}

#drawHallPage[hidden] { display: none; }

.dh-topbar {
    height: 54px;
    background: #ff4941;
    display: flex;
    align-items: center;
    padding: 0 14px;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.dh-topbar .dh-spacer {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
}

.dh-title {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

.dh-filter {
    width: 36px; height: 36px;
    background: transparent; border: 0; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    flex: 0 0 36px;
}

.dh-filter svg {
    width: 22px; height: 22px;
    fill: #fff;
}

.dh-list {
    padding: 10px 12px 20px;
}

.dh-card {
    background: #fff;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 10px;
    display: grid;
    grid-template-columns: 54px 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
        "icon name right"
        "icon sub  right";
    gap: 2px 12px;
    align-items: center;
    cursor: pointer;
    border: 1px solid #f0f0f0;
}

.dh-card:active {
    background: #fafafa;
}

.dh-card-icon {
    grid-area: icon;
    width: 54px;
    height: 54px;
    object-fit: contain;
    align-self: center;
}

.dh-card-name {
    grid-area: name;
    font-size: 17px;
    font-weight: 600;
    color: #222;
    align-self: end;
}

.dh-card-sub {
    grid-area: sub;
    font-size: 13px;
    color: #999;
    align-self: start;
}

.dh-card-right {
    grid-area: right;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #bbb;
}

.dh-card-trend {
    color: #e53935;
    font-size: 13px;
    border-bottom: 1px solid #e53935;
    padding-bottom: 1px;
    cursor: pointer;
    user-select: none;
}

.dh-card-chev {
    font-size: 18px;
    color: #bbb;
    line-height: 1;
    margin-left: 4px;
}

/* ========== 走势图页 ========== */

.trend-page {
    position: fixed;
    inset: 0;
    background: #f2f3f5;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: 0 0 24px rgba(0, 0, 0, .15);
    overflow-y: auto;
}

.trend-page[hidden] { display: none; }

.tr-topbar {
    height: 54px;
    background: #ff4941;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 4px;
    flex: 0 0 auto;
    position: sticky;
    top: 0;
    z-index: 2;
}

.tr-back, .tr-home {
    width: 36px; height: 36px;
    background: transparent; border: 0; padding: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}

.tr-back svg, .tr-home svg {
    width: 22px; height: 22px;
}

.tr-title {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 17px;
    font-weight: 600;
    margin: 0;
}

.tr-body {
    padding: 14px 12px 30px;
}

.tr-section-head {
    font-size: 14px;
    color: #555;
    margin: 6px 4px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tr-section-head::before {
    content: '';
    width: 3px;
    height: 14px;
    background: #ff4941;
    border-radius: 1px;
}

.tr-chart-card {
    background: #fff;
    border-radius: 6px;
    padding: 14px 10px 10px;
    margin-bottom: 12px;
    border: 1px solid #f0f0f0;
}

.tr-chart-svg {
    display: block;
    width: 100%;
    height: auto;
}

.tr-chart-axis-label {
    font-size: 10px;
    fill: #aaa;
}

.tr-chart-line {
    fill: none;
    stroke: #ff4941;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.tr-chart-area {
    fill: url(#trGradient);
    opacity: 0.25;
}

.tr-chart-dot {
    fill: #ff4941;
    stroke: #fff;
    stroke-width: 1;
}

.tr-chart-grid {
    stroke: #eee;
    stroke-width: 1;
    stroke-dasharray: 2 3;
}

.tr-chart-baseline {
    stroke: #ccc;
    stroke-width: 1;
}

.tr-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.tr-stat-cell {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 6px;
    padding: 12px 8px;
    text-align: center;
}

.tr-stat-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.tr-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.tr-stat-value.pos { color: #e53935; }
.tr-stat-value.neg { color: #2aa7ea; }

.tr-bar-card {
    background: #fff;
    border-radius: 6px;
    padding: 14px 14px 10px;
    border: 1px solid #f0f0f0;
}

.tr-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
}

.tr-bar-row:last-child { margin-bottom: 0; }

.tr-bar-label {
    flex: 0 0 60px;
    color: #333;
    font-weight: 600;
}

.tr-bar-bg {
    flex: 1;
    height: 14px;
    background: #f2f3f5;
    border-radius: 7px;
    overflow: hidden;
    position: relative;
}

.tr-bar-fill {
    height: 100%;
    border-radius: 7px;
    transition: width 0.4s ease;
}

.tr-bar-fill.c-big { background: linear-gradient(90deg, #ff8e6a, #e53935); }
.tr-bar-fill.c-small { background: linear-gradient(90deg, #8ccfff, #2aa7ea); }
.tr-bar-fill.c-odd { background: linear-gradient(90deg, #ffc16a, #f28c00); }
.tr-bar-fill.c-even { background: linear-gradient(90deg, #a0e6a8, #2ab94e); }

.tr-bar-value {
    flex: 0 0 44px;
    text-align: right;
    color: #555;
    font-size: 12px;
}

.tr-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
    font-size: 14px;
}
