/* =========================================
   XSTT Live Banner — xstt-live.css
   ========================================= */

#xstt-banner {
    margin-bottom: 20px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 20px rgba(192,57,43,.18);
    border: 2px solid #c0392b;
    background: #fff;
    animation: xstt-fadein .4s ease;
}

@keyframes xstt-fadein {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.xstt-header {
    background: linear-gradient(135deg, #c0392b, #e74c3c);
    color: #fff;
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.xstt-live-badge {
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: .5px;
    animation: xstt-blink 1.2s infinite;
}

@keyframes xstt-blink {
    0%,100% { opacity: 1; }
    50%      { opacity: .5; }
}

.xstt-status-text {
    flex: 1;
    font-size: .85rem;
    opacity: .9;
}

.xstt-delay-note {
    font-size: .78rem;
    opacity: .75;
    white-space: nowrap;
}

/* Body */
.xstt-body {
    padding: 14px 16px;
    min-height: 120px;
}

/* Loading */
.xstt-loading {
    text-align: center;
    padding: 30px 0;
    color: #999;
}
.xstt-spinner {
    width: 36px; height: 36px;
    border: 4px solid #eee;
    border-top-color: #c0392b;
    border-radius: 50%;
    animation: xstt-spin .7s linear infinite;
    margin: 0 auto 10px;
}
@keyframes xstt-spin { to { transform: rotate(360deg); } }

/* Results grid */
.xstt-results {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

/* Bảng từng đài */
.xstt-dai {
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.xstt-dai-title {
    background: #c0392b;
    color: #fff;
    font-weight: 700;
    font-size: .88rem;
    padding: 7px 12px;
    text-align: center;
}

.xstt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .87rem;
}
.xstt-table tr:nth-child(even) { background: #fafafa; }
.xstt-table td {
    padding: 5px 10px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.xstt-table td:first-child {
    color: #777;
    font-size: .78rem;
    width: 75px;
    white-space: nowrap;
}
.xstt-table td:last-child {
    font-weight: 700;
    color: #333;
    letter-spacing: 1px;
}

/* Giải đặc biệt */
.xstt-table tr.is-db td:last-child {
    color: #c0392b;
    font-size: 1.25rem;
    background: #fff5f5;
}

/* Số chưa quay */
.xstt-pending { color: #ccc; font-weight: 400; }

/* Error */
.xstt-error {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px 14px;
    color: #856404;
    font-size: .88rem;
    text-align: center;
}

@media (max-width: 480px) {
    .xstt-results { grid-template-columns: 1fr; }
    .xstt-header  { gap: 8px; }
}
