.wrapper {
    width: 100%;
    max-width: 980px;
}

#menu {
    height: auto;
    min-height: 40px;
    padding: 8px 5px;
    overflow-x: auto;
    white-space: nowrap;
}

#menu a {
    display: inline-block;
    border-radius: 3px;
}

#menu a.active {
    color: #ffff00;
    background: rgba(0, 0, 0, 0.20);
}

.header-main-row {
    display: flex;
    align-items: center;
}

.live-date-wrap {
    padding-right: 25px;
}

.live-date {
    display: block;
    margin-bottom: 12px;
    color: #222;
}

.banner-wrap {
    padding: 0 0 10px;
}

.site-banner {
    width: 100%;
}

.results-wrapper {
    padding: 0 20px 12px;
    background: #f1f1f1;
}

.result-page-heading {
    padding: 18px 10px 0;
    text-align: center;
}

.result-page-heading h1 {
    margin: 0;
    color: #222;
    font-size: 24px;
    font-weight: bold;
}

.result-page-heading p {
    margin: 4px 0 0;
    text-align: center;
    color: #666;
}

.result-grid {
    display: flex;
    flex-wrap: wrap;
}

.result-column {
    display: flex;
    float: none;
}

.result-card {
    width: 100%;
    min-height: 382px;
    background: #f1f1f1;
}

.result-date {
    display: block;
    padding: 10px;
    font-weight: 600;
}

.result-date span {
    float: right;
}

.prize-label {
    display: block;
    line-height: 30px;
    text-align: right;
    font-size: 16px;
}

.prize-balls {
    display: block;
    min-height: 32px;
}

.result-small-number {
    min-height: 24px;
    font-size: 14px;
    line-height: 24px;
}

.empty-results {
    margin: 20px 10px;
    padding: 35px 20px;
    text-align: center;
    color: #555;
    border: 1px dashed #aaa;
    background: #fff;
}

@media screen and (max-width: 991px) {
    .header-main-row {
        display: block;
    }

    .live-date-wrap {
        padding: 5px 20px 18px;
        text-align: center;
    }

    #logo {
        float: none;
        text-align: center;
    }
}

@media screen and (max-width: 767px) {
    #middle {
        padding: 10px;
    }

    .results-wrapper {
        padding-left: 10px;
        padding-right: 10px;
    }

    .result-column {
        width: 100%;
    }

    .bukaan {
        margin: 10px 4px;
    }

    #clock {
        font-size: 42px;
    }
}

/* Final result-card cleanup */
.result-card {
    overflow: hidden;
}

.prize-list {
    padding: 3px 12px 10px;
}

.prize-row {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 43px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.prize-row:last-child {
    border-bottom: 0;
}

.prize-label {
    flex: 0 0 76px;
    width: 76px;
    padding-right: 12px;
    line-height: 1.2;
    text-align: right;
    font-size: 15px;
    white-space: nowrap;
}

.prize-balls {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    min-width: 143px;
    min-height: 34px;
    white-space: nowrap;
}

.result-ball,
.prize-balls .bola,
.prize-balls .bola1 {
    box-sizing: border-box;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 5px 0 0;
    line-height: 22px;
    font-size: 17px;
    font-weight: 700;
}

.result-section-title {
    float: none;
    clear: both;
    box-sizing: border-box;
    margin: 0;
}

.result-number-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 42px;
    padding: 5px 10px 8px;
}

.result-number-grid .result-small-number {
    min-height: 28px;
    padding: 2px 8px;
    line-height: 24px;
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

.consolation-grid {
    min-height: 66px;
}

.heading-kicker {
    display: inline-block;
    margin-bottom: 4px;
    color: #d30000;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.history-heading {
    padding-top: 28px;
}

.live-draw-section {
    padding: 4px 0 10px;
    border-bottom: 2px solid #ddd;
}

.live-draw-heading h1 {
    color: #b80000;
}

.live-draw-grid {
    max-width: 760px;
    margin-right: auto;
    margin-left: auto;
}

.live-draw-grid .result-card {
    min-height: 420px;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.live-result-date {
    background: #fff;
}

.live-status {
    color: #df0000;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
}

.live-status i {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-radius: 50%;
    background: #df0000;
    animation: livePulse 1s ease-in-out infinite;
}

.live-draw-message {
    margin: 9px 12px 3px;
    padding: 7px 10px;
    text-align: center;
    color: #555;
    border: 1px dashed #bbb;
    border-radius: 4px;
    background: #fafafa;
    font-size: 12px;
}

.live-digit {
    font-family: xdigital, Tahoma, sans-serif;
    transform: translateZ(0);
}

.live-small-number {
    display: inline-block;
    min-width: 48px;
    font-family: xdigital, Tahoma, sans-serif;
    font-size: 18px;
    font-weight: normal;
    letter-spacing: 2px;
}

.live-refresh-note {
    padding: 5px 10px 10px;
    text-align: center;
    color: #777;
    font-size: 11px;
}

@keyframes livePulse {
    0%, 100% { opacity: 0.35; transform: scale(0.85); }
    50% { opacity: 1; transform: scale(1.15); }
}

@media screen and (max-width: 767px) {
    .live-draw-grid {
        max-width: 430px;
    }

    .live-draw-grid .result-card {
        min-height: 405px;
    }

    .prize-list {
        padding-right: 8px;
        padding-left: 8px;
    }

    .prize-label {
        flex-basis: 70px;
        width: 70px;
        padding-right: 8px;
        font-size: 14px;
    }

    .prize-balls {
        gap: 4px;
        min-width: 132px;
    }

    .result-ball,
    .prize-balls .bola,
    .prize-balls .bola1 {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
        padding-top: 4px;
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .live-status i {
        animation: none;
    }
}


/* ===== Final layout refinement: labels left, numbers right, clearer prize separators ===== */
.result-card {
    overflow: hidden;
}

.result-card .prize-list {
    padding: 4px 14px 10px;
}

.result-card .prize-row {
    display: grid;
    grid-template-columns: minmax(88px, 1fr) auto;
    align-items: center;
    column-gap: 14px;
    min-height: 52px;
    padding: 6px 0;
    border-bottom: 1px solid #b7b7b7;
}

.result-card .prize-row:first-child {
    border-top: 1px solid #b7b7b7;
}

.result-card .prize-label {
    display: block;
    width: auto;
    min-width: 88px;
    padding: 0;
    margin: 0;
    text-align: left;
    line-height: 1.3;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
}

.result-card .prize-balls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: 148px;
    min-height: 34px;
    white-space: nowrap;
}

.result-card .result-ball,
.result-card .prize-balls .bola,
.result-card .prize-balls .bola1 {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 5px 0 0;
    line-height: 22px;
    font-size: 17px;
    font-weight: 700;
}

.result-card .result-section-title {
    width: 100%;
    float: none;
    clear: both;
    box-sizing: border-box;
    margin: 2px 0 0;
    padding: 10px 14px;
    text-align: left;
    font-size: 15px;
}

.result-card .result-number-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 12px;
    min-height: 42px;
    padding: 6px 14px 10px;
}

.result-card .result-number-grid .result-small-number {
    min-height: 28px;
    padding: 2px 0;
    line-height: 24px;
    text-align: right;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
}

.result-card .consolation-grid {
    min-height: 72px;
}

.live-draw-message {
    margin: 12px 14px 8px;
    padding: 10px 12px;
    text-align: left;
    color: #555;
    border: 1px dashed #bbb;
    border-radius: 4px;
    background: #fafafa;
    font-size: 12px;
    line-height: 1.5;
}

.live-refresh-note {
    padding: 6px 14px 14px;
    text-align: left;
    color: #777;
    font-size: 11px;
    line-height: 1.5;
}

.live-draw-grid .result-card {
    min-height: 430px;
}

@media screen and (max-width: 767px) {
    .result-card .prize-list {
        padding-right: 10px;
        padding-left: 10px;
    }

    .result-card .prize-row {
        grid-template-columns: minmax(76px, 1fr) auto;
        column-gap: 10px;
        min-height: 48px;
        padding: 6px 0;
    }

    .result-card .prize-label {
        min-width: 76px;
        font-size: 14px;
    }

    .result-card .prize-balls {
        gap: 4px;
        min-width: 132px;
    }

    .result-card .result-ball,
    .result-card .prize-balls .bola,
    .result-card .prize-balls .bola1 {
        flex-basis: 30px;
        width: 30px;
        height: 30px;
        padding-top: 4px;
        font-size: 16px;
    }

    .result-card .result-section-title {
        padding-right: 10px;
        padding-left: 10px;
        font-size: 14px;
    }

    .result-card .result-number-grid {
        padding-right: 10px;
        padding-left: 10px;
        gap: 0 10px;
    }

    .live-draw-message,
    .live-refresh-note {
        margin-right: 10px;
        margin-left: 10px;
        padding-right: 10px;
        padding-left: 10px;
    }
}


.live-countdown { display: block; margin-top: 5px; color: #b80000; font-weight: 800; letter-spacing: .02em; }
