/* ============================================
   Shillong Morning Teer — Public Styles v3.0
   Dark theme matching TeerMorning.org design
   ============================================ */

/* ── RESULT MAIN CARD (Today's Result) ── */
.result-main {
    background: #0a1e2c;
    border: 2px solid #0cc0df;
    border-radius: 18px;
    padding: 18px 14px;
    margin-bottom: 16px;
}

.rm-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.rm-head-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #0cc0df;
}

.rm-date {
    font-size: 11px;
    color: #4a7a8a;
    background: #0f2a3a;
    padding: 3px 10px;
    border-radius: 20px;
}

.rm-rounds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.round-block {
    background: #0d2535;
    border-radius: 12px;
    padding: 16px 10px;
    text-align: center;
    border: 1px solid #1a3a4a;
}

.rb-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #0cc0df;
    margin-bottom: 2px;
}

.rb-time {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    color: #4a7a8a;
    margin-bottom: 10px;
}

.rb-time svg {
    flex-shrink: 0;
}

.rb-number {
    font-size: 38px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: 4px;
}

.rb-number.pending {
    font-size: 22px;
    color: #2a5a70;
    margin-top: 10px;
    letter-spacing: 1px;
}

/* ── COUNTDOWN ── */
.trs-countdown-box {
    background: #081622;
    border: 1px solid #1a3a4a;
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
    margin-top: 4px;
}

.trs-cd-label {
    font-size: 11px;
    color: #4a7a8a;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.trs-cd-value {
    font-size: 24px;
    font-weight: 700;
    color: #0cc0df;
    font-variant-numeric: tabular-nums;
}

.trs-cd-sub {
    font-size: 11px;
    color: #4a7a8a;
    margin-top: 2px;
}

/* Countdown pulse animation */
.trs-cd-value {
    animation: trs-cd-pulse 2s ease-in-out infinite;
}

@keyframes trs-cd-pulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

/* Loading gif inside result card */
.trs-loading-gif {
    width: 24px;
    height: 24px;
    vertical-align: middle;
}

/* Live GIF */
.trs-live-gif {
    width: 28px;
    height: auto;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ── GAME OFF ── */
.trs-game-off {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    color: #fca5a5;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
    white-space: nowrap;
}

/* ── EVENT MESSAGE ── */
.trs-event-message {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: #fbbf24;
    background: rgba(255, 255, 255, 0.08);
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* ── DATE BADGE ── */
.trs-result-date {
    display: inline;
    background: transparent;
    color: #4a7a8a;
    padding: 0;
    border: none;
    border-radius: 0;
    font-weight: 600;
    font-size: 12px;
    margin: 0;
    letter-spacing: 0;
}

/* ============================================
   PREVIOUS RESULTS TABLE (History)
   ============================================ */
.trs-history-wrapper {
    max-width: 760px;
    margin: 0 auto;
    padding: 0;
}

.trs-history-table-wrapper {
    overflow-x: auto;
}

/* Section header for previous results */
.trs-sec-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
}

.trs-sec-bar {
    width: 4px;
    height: 24px;
    background: #0cc0df;
    border-radius: 4px;
    flex-shrink: 0;
}

.trs-sec-head h3 {
    font-size: 16px;
    font-weight: 700;
    color: #0d1f2d;
    margin: 0;
}

.trs-sec-badge {
    margin-left: auto;
    font-size: 10px;
    color: #0cc0df;
    background: #e0f8fc;
    padding: 2px 9px;
    border-radius: 20px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Result table */
.rtable-wrap {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #d0eef5;
    overflow: hidden;
}

table.rt {
    width: 100%;
    border-collapse: collapse;
}

table.rt thead tr {
    background: #0cc0df;
}

table.rt thead th {
    padding: 11px 10px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #0d1f2d;
    text-align: center;
}

table.rt thead th:first-child {
    text-align: left;
    padding-left: 14px;
}

table.rt tbody tr {
    border-bottom: 1px solid #e8f6fa;
}

table.rt tbody tr:last-child {
    border-bottom: none;
}

table.rt tbody tr.today-row {
    background: #e4f9fd;
}

table.rt tbody td {
    padding: 11px 10px;
    text-align: center;
    font-size: 13px;
    color: #334;
}

table.rt tbody td:first-child {
    text-align: left;
    padding-left: 14px;
    font-size: 12px;
    color: #555;
}

.rp {
    background: #0d1f2d;
    color: #0cc0df;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 12px;
    border-radius: 8px;
    display: inline-block;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.today-badge {
    display: inline-block;
    background: #0cc0df;
    color: #0d1f2d;
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 4px;
    vertical-align: middle;
    text-transform: uppercase;
}

.event-msg-cell {
    color: #d97706;
    font-weight: 600;
    font-size: 12px;
    font-style: italic;
}

/* View more link */
.trs-view-more {
    text-align: center;
    margin-top: 12px;
}

.trs-view-more a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #0cc0df;
    background: #e4f9fd;
    padding: 9px 20px;
    border-radius: 20px;
    border: 1px solid #b0e8f5;
    text-decoration: none;
}

.trs-view-more a:hover {
    background: #d0f2f8;
}

/* ============================================
   COMMON NUMBERS
   ============================================ */
.trs-common-numbers {
    width: 100%;
    margin: 0 auto;
}

.cn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.cn-card {
    background: #fff;
    border: 1px solid #d0eef5;
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
}

.cn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.cn-type {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 4px;
}

.cn-num {
    font-size: 28px;
    font-weight: 700;
    color: #0cc0df;
    font-variant-numeric: tabular-nums;
    letter-spacing: 3px;
}

.cn-desc {
    font-size: 10px;
    color: #aaa;
    margin-top: 2px;
}

.trs-common-table {
    display: none; /* We use cn-grid instead */
}

/* ============================================
   LUCKY NUMBERS
   ============================================ */
.trs-lucky-numbers {
    width: 100%;
    margin: 0 auto;
}

.lucky-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.lucky-item {
    background: #fff;
    border: 1px solid #d0eef5;
    border-radius: 10px;
    padding: 12px 8px;
    text-align: center;
}

.lucky-num {
    font-size: 22px;
    font-weight: 700;
    color: #0d1f2d;
    font-variant-numeric: tabular-nums;
}

.lucky-label {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

/* ── UPDATE TIME ── */
.trs-update-time {
    display: inline-block;
    background: transparent;
    color: #4a7a8a;
    padding: 3px 10px;
    font-size: 11px;
    border: 1px solid #d0eef5;
    border-radius: 4px;
    margin: 8px auto;
    text-align: center;
    width: fit-content;
    font-weight: 600;
    opacity: 0.8;
}

.trs-update-time:hover {
    opacity: 1;
    border-color: #0cc0df;
    color: #0cc0df;
}

/* ============================================
   STATISTICS
   ============================================ */
.trs-statistics {
    margin-bottom: 20px;
}

.trs-statistics h4 {
    font-size: 17px;
    font-weight: 800;
    color: #0d1f2d;
    margin-bottom: 12px;
}

.trs-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.trs-stat-card {
    background: #fff;
    border: 1px solid #d0eef5;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.trs-stat-card .stat-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #4a7a8a;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 4px;
}

.trs-stat-card .stat-value {
    display: block;
    font-size: 22px;
    font-weight: 900;
    color: #0d1f2d;
}

/* ============================================
   CALENDAR VIEW
   ============================================ */
.trs-calendar-view {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.trs-month-calendar {
    flex: 1 1 480px;
    background: #fff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #d0eef5;
}

.trs-month-calendar h4 {
    text-align: center;
    font-size: 16px;
    font-weight: 800;
    color: #0d1f2d;
    margin-bottom: 12px;
}

.trs-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #d0eef5;
    padding: 1px;
    border-radius: 8px;
}

.calendar-header {
    background: #0d1f2d;
    color: #0cc0df;
    padding: 8px 2px;
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.calendar-header:first-child {
    border-top-left-radius: 7px;
}

.calendar-header:last-child {
    border-top-right-radius: 7px;
}

.calendar-day {
    background: #fff;
    min-height: 60px;
    padding: 4px;
    position: relative;
}

.calendar-day:hover {
    background: #e4f9fd;
}

.calendar-day.empty {
    background: #fafafa;
}

.day-number {
    display: block;
    font-weight: 700;
    font-size: 12px;
    color: #0d1f2d;
    margin-bottom: 2px;
}

.day-results {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 10px;
}

.fr-result,
.sr-result {
    display: block;
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

.fr-result {
    background: rgba(12, 192, 223, 0.15);
    color: #0a8a9e;
}

.sr-result {
    background: rgba(13, 31, 45, 0.08);
    color: #1a2a3a;
}

.day-event {
    font-size: 9px;
    color: #d97706;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 2px;
}

/* ============================================
   LIST VIEW
   ============================================ */
.trs-list-view {
    max-width: 760px;
    margin: 0 auto;
}

.trs-list-view .month-header {
    font-size: 15px;
    font-weight: 800;
    color: #0d1f2d;
    margin: 16px 0 8px;
    padding-bottom: 5px;
    border-bottom: 2px solid #0cc0df;
    display: inline-block;
}

.trs-list-view .result-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.trs-list-view .result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #e8f6fa;
    font-size: 14px;
}

.trs-list-view .result-item:hover {
    background: #e4f9fd;
}

.trs-list-view .result-date {
    color: #475569;
    font-weight: 500;
    font-size: 13px;
}

.trs-list-view .result-values {
    display: flex;
    gap: 12px;
}

.trs-list-view .result-values .fr,
.trs-list-view .result-values .sr {
    font-size: 13px;
    color: #475569;
}

.trs-list-view .result-values strong {
    color: #0d1f2d;
    font-size: 15px;
}

.trs-list-view .event-message {
    color: #d97706;
    font-weight: 600;
    font-size: 13px;
}

/* ── ERROR / NO DATA ── */
.trs-error,
.trs-no-data {
    text-align: center;
    color: #4a7a8a;
    font-size: 14px;
    padding: 20px;
    background: #e4f9fd;
    border-radius: 8px;
    border: 1px solid #d0eef5;
}

/* ============================================
   RESPONSIVE — TABLET
   ============================================ */
@media (max-width: 768px) {
    .trs-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .lucky-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-day {
        min-height: 52px;
        padding: 3px;
    }

    .day-number {
        font-size: 11px;
    }

    .day-results {
        font-size: 9px;
    }
}

/* ============================================
   RESPONSIVE — MOBILE
   ============================================ */
@media (max-width: 480px) {
    .rm-rounds {
        gap: 8px;
    }

    .round-block {
        padding: 12px 8px;
    }

    .rb-number {
        font-size: 35px;
        letter-spacing: 3px;
    }

    .rb-number.pending {
        font-size: 18px;
    }

    .rb-label {
        font-size: 9px;
        letter-spacing: 1.5px;
    }

    .rb-time {
        font-size: 10px;
    }

    .result-main {
        padding: 14px 10px;
    }

    .rm-head-title {
        font-size: 10px;
        letter-spacing: 1.5px;
    }

    .rm-date {
        font-size: 10px;
    }

    .trs-countdown-box {
        padding: 10px 12px;
    }

    .trs-cd-value {
        font-size: 20px;
    }

    table.rt thead th {
        font-size: 9px;
        padding: 10px 6px;
    }

    table.rt tbody td {
        padding: 9px 6px;
        font-size: 12px;
    }

    table.rt tbody td:first-child {
        font-size: 11px;
        padding-left: 10px;
    }

    .rp {
        font-size: 13px;
        padding: 3px 9px;
        letter-spacing: 1.5px;
    }

    .cn-grid {
        gap: 8px;
    }

    .cn-card {
        padding: 12px 8px;
    }

    .cn-num {
        font-size: 22px;
    }

    .cn-type {
        font-size: 9px;
    }

    .lucky-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }

    .lucky-num {
        font-size: 20px;
    }

    .trs-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .trs-stat-card {
        padding: 8px;
    }

    .trs-stat-card .stat-label {
        font-size: 10px;
    }

    .trs-stat-card .stat-value {
        font-size: 18px;
    }

    .calendar-header {
        font-size: 9px;
        padding: 5px 1px;
    }

    .calendar-day {
        min-height: 48px;
        padding: 2px;
    }

    .day-number {
        font-size: 10px;
    }

    .day-results {
        font-size: 8px;
    }

    .day-event {
        font-size: 7px;
    }

    .trs-list-view .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
        padding: 7px 10px;
    }

    .trs-list-view .result-date {
        font-size: 12px;
    }

    .trs-list-view .result-values strong {
        font-size: 14px;
    }
}