/* ============================================================================
 * Part 3: DSE Placement Table Styles
 * ============================================================================ */

.dse-placement-container {
    display: flex;
    gap: 20px;
    margin: 0;
    flex-wrap: nowrap;
}

.dse-placement-table {
    border-collapse: collapse;
    width: 33.333%;
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin: 0;
    table-layout: fixed;
}

.dse-placement-table th,
.dse-placement-table td {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* 统一设置每列的宽度 */
.dse-placement-table th:nth-child(1),
.dse-placement-table td:nth-child(1) {
    width: 30%;
}

.dse-placement-table th:nth-child(2),
.dse-placement-table td:nth-child(2) {
    width: 25%;
}

.dse-placement-table th:nth-child(3),
.dse-placement-table td:nth-child(3) {
    width: 25%;
}

.dse-placement-table th:nth-child(4),
.dse-placement-table td:nth-child(4) {
    width: 20%;
}

.dse-placement-table th {
    background-color: steelblue;
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: bold;
    font-size: 0.9rem;
}

.dse-placement-table td {
    padding: 10px 8px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.9rem;
}

.dse-placement-table tr:nth-child(even) {
    background-color: #f9fafb;
}

.dse-placement-table tr:nth-child(odd) {
    background-color: white;
}

.dse-placement-table tr:first-child td {
    text-align: center;
}

.dse-placement-table td:first-child {
    font-weight: 600;
}

@media (max-width: 768px) {
    .dse-placement-container {
        flex-direction: column;
    }
    
    .dse-placement-table {
        width: 100%;
    }
    
    .dse-placement-table th,
    .dse-placement-table td {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .dse-placement-table th,
    .dse-placement-table td {
        font-size: 0.8rem;
    }
}

/* ============================================================================
 * DSE Uni Stats Styles
 * ============================================================================ */

.hk-sp-dse-stats-wrap {
    display: block;
    margin-bottom: 30px;
}
.hk-sp-dse-chart-container {
    position: relative;
    height: 320px;
    width: 100%;
    margin-bottom: 25px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    box-sizing: border-box;
}
.hk-sp-dse-table-container {
    width: 100%;
    overflow-x: auto;
}
.hk-sp-dse-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 0;
    table-layout: fixed; /* Fixed layout for mobile */
}
.hk-sp-dse-stats-table th {
    background: steelblue;
    color: white;
    padding: 10px 5px;
    text-align: center;
    white-space: normal; /* Allow wrap */
    word-wrap: break-word;
    vertical-align: middle;
    border: 1px solid #dee2e6; /* Unified border color */
}
.hk-sp-dse-stats-table td {
    padding: 10px 5px;
    border: 1px solid #dee2e6; /* Unified border color */
    text-align: center;
    vertical-align: middle;
    white-space: normal; /* Allow wrap */
    word-wrap: break-word;
}

/* Column widths for mobile */
.hk-sp-dse-stats-table th:first-child { width: 34%; text-align: left; padding-left: 8px; }
.hk-sp-dse-stats-table th:nth-child(2) { width: 22%; }
.hk-sp-dse-stats-table th:nth-child(3) { width: 22%; }
.hk-sp-dse-stats-table th:nth-child(4) { width: 22%; }

/* Zebra Stripes - Apply to TD directly */
.hk-sp-dse-stats-table tr:nth-child(odd) td { background-color: #fafafa; }
.hk-sp-dse-stats-table tr:nth-child(even) td { background-color: white; }

/* Hover Effect */
.hk-sp-dse-stats-table tr:hover td { background-color: #e2e6ea !important; }

.hk-sp-dse-stats-table td:first-child { 
    text-align: left; 
    padding-left: 8px;
    font-weight: 600; 
    color: #2c3e50;
}
@media (max-width: 600px) {
    .hk-sp-dse-chart-container { height: 260px; }
    .hk-sp-dse-stats-table { font-size: 0.8rem; }
    .hk-sp-dse-stats-table th, .hk-sp-dse-stats-table td { padding: 8px 2px; }
}
