﻿/* =========================
   LOTTERY GLOBAL
========================= */

.lottery-page {
    max-width: 1220px;
    margin: 0 auto;
    padding: 14px;
    color: #0f172a;
}

.lottery-hero,
.lottery-top {
    background: linear-gradient(135deg, #071431, #132845);
    color: #fff;
    border-radius: 18px;
    padding: 24px 30px;
    margin-bottom: 14px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .16);
}

    .lottery-hero span,
    .lottery-top span {
        display: inline-flex;
        background: #ef233c;
        padding: 6px 14px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 900;
    }

    .lottery-hero h1,
    .lottery-top h1 {
        margin: 12px 0 6px;
        font-size: 32px;
        line-height: 1.15;
    }

    .lottery-hero p,
    .lottery-top p {
        margin: 0;
        color: #e0ecff;
        font-size: 15px;
        font-weight: 700;
    }

.lottery-box {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 18px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .05);
    margin-bottom: 14px;
}

.lottery-box-head {
    margin-bottom: 14px;
}

.lottery-head-icon {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.head-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #fee2e2;
    color: #dc2626;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex: 0 0 auto;
}

.lottery-box-head h2 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
}

.lottery-box-head p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.45;
}

/* =========================
   LAYOUT PC
========================= */

.lottery-home-grid {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr) 225px;
    gap: 14px;
    align-items: start;
}

.lottery-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 14px;
    align-items: start;
}

/* =========================
   LIVE
========================= */

.lottery-live-layout,
.lottery-live {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr) 150px;
    gap: 16px;
    align-items: center;
    background: linear-gradient(90deg, #fff7f7, #fff);
    border: 1px dashed #fca5a5;
    border-radius: 18px;
    padding: 18px;
    margin-bottom: 14px;
}

.live-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.live-dot {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: radial-gradient(circle, #dc2626 44%, #fecaca 46%, #fee2e2 75%);
    box-shadow: 0 0 0 7px rgba(220, 38, 38, .08);
}

.live-left h2 {
    margin: 0;
    font-size: 19px;
}

.live-left p {
    margin: 5px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.45;
}

.live-ads,
.ads-box {
    min-height: 110px;
    border: 1px dashed #f87171;
    border-radius: 15px;
    color: #dc2626;
    background: #fff;
    font-size: 22px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ads-box.small {
        margin-top: 14px;
        min-height: 240px;
        font-size: 16px;
    }

.lottery-live-frame {
    margin-top: 10px;
    background: #fff;
    border: 1px dashed #fecaca;
    border-radius: 14px;
    padding: 8px;
    overflow-x: auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}

    .lottery-live-frame #box_kqxs_minhngoc {
        margin: 0 auto;
    }

/* =========================
   SEARCH BAR: PC / DEFAULT
========================= */

.lottery-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    width: 100%;
}

    .lottery-search select,
    .lottery-search input[type="date"] {
        box-sizing: border-box;
        height: 38px;
        border: 1px solid #cbd5e1;
        border-radius: 10px;
        background: #fff;
        color: #0f172a;
        font-size: 13px;
        font-weight: 800;
        padding: 0 10px;
        outline: none;
        box-shadow: 0 4px 10px rgba(15, 23, 42, .03);
        transition: border-color .2s, box-shadow .2s;
    }

    .lottery-search select {
        appearance: none;
        -webkit-appearance: none;
        padding-right: 34px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.75' d='m1 1 5 5 5-5'/%3E%3C/svg%3E");
        background-position: right 11px center;
        background-repeat: no-repeat;
    }

    .lottery-search input[type="date"] {
        color-scheme: light;
    }

        .lottery-search input[type="date"]::-webkit-datetime-edit,
        .lottery-search input[type="date"]::-webkit-datetime-edit-fields-wrapper,
        .lottery-search input[type="date"]::-webkit-datetime-edit-text,
        .lottery-search input[type="date"]::-webkit-datetime-edit-month-field,
        .lottery-search input[type="date"]::-webkit-datetime-edit-day-field,
        .lottery-search input[type="date"]::-webkit-datetime-edit-year-field {
            color: #0f172a;
            font: inherit;
        }

    .lottery-search select {
        width: 170px;
        min-width: 120px;
    }

    .lottery-search input[type="date"] {
        width: 145px;
        min-width: 130px;
    }

        .lottery-search select:focus,
        .lottery-search input[type="date"]:focus {
            border-color: #dc2626;
            box-shadow: 0 0 0 3px rgba(220, 38, 38, .08);
        }

    .lottery-search button {
        height: 38px;
        min-width: 92px;
        border: 0;
        border-radius: 10px;
        padding: 0 14px;
        background: linear-gradient(135deg, #071431, #1f2937);
        color: #fff;
        font-size: 13px;
        font-weight: 900;
        cursor: pointer;
        white-space: nowrap;
        box-shadow: 0 6px 14px rgba(15, 23, 42, .12);
        transition: transform .2s, box-shadow .2s, background .2s;
    }

        .lottery-search button:hover {
            transform: translateY(-1px);
            background: linear-gradient(135deg, #dc2626, #991b1b);
            box-shadow: 0 8px 18px rgba(220, 38, 38, .16);
        }

.date-search input[type="date"] {
    flex: 1;
    width: auto;
}

.detail-search select {
    flex: 1;
    width: auto;
}

.detail-search input[type="date"] {
    flex: 0 0 150px;
}

/* =========================
   DAILY LEFT LIST
========================= */

.daily-title {
    margin: 16px 0 10px;
    font-size: 14px;
    font-weight: 900;
    color: #0f172a;
}

.daily-list {
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.daily-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 11px;
    border-bottom: 1px dashed #e2e8f0;
    color: #111827;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
}

    .daily-item:last-child {
        border-bottom: 0;
    }

    .daily-item span:before {
        content: "📍";
        margin-right: 6px;
    }

    .daily-item em {
        font-style: normal;
        color: #64748b;
        font-size: 13px;
        font-weight: 800;
    }

    .daily-item:hover {
        background: linear-gradient(90deg, #fee2e2, #fff);
        color: #dc2626;
    }

/* =========================
   RESULT CARDS
========================= */

.lottery-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.lottery-card {
    border: 1px dashed #cbd5e1;
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, #fff, #fcfcfd);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .04);
}

.lottery-card-head {
    padding: 12px 14px 7px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px dashed #e2e8f0;
}

    .lottery-card-head h2 {
        margin: 0;
        font-size: 17px;
        color: #dc2626;
    }

    .lottery-card-head p {
        margin: 3px 0 0;
        color: #64748b;
        font-size: 12px;
    }

    .lottery-card-head span {
        color: #64748b;
        font-size: 12px;
        white-space: nowrap;
    }

.lottery-card table {
    width: 100%;
    border-collapse: collapse;
}

.lottery-card td {
    padding: 6px 13px;
    border-bottom: 1px dashed #eef2f7;
    vertical-align: top;
}

.lottery-card tr:last-child td {
    border-bottom: 0;
}

.lottery-card td:first-child {
    width: 48px;
    color: #334155;
    font-weight: 900;
    background: #f8fafc;
}

.lottery-card b {
    display: inline-block;
    margin: 1px 4px 1px 0;
    color: #111827;
    font-size: 15px;
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 7px;
    padding: 2px 6px;
}

.lottery-card td.db b {
    color: #dc2626;
    background: #fff1f2;
    border-color: #fecaca;
    font-size: 18px;
    font-weight: 900;
}

.lottery-note,
.lottery-empty {
    margin-top: 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 13px;
    padding: 12px;
    color: #475569;
    font-weight: 800;
}

/* =========================
   RIGHT PROVINCE LIST
========================= */

.province-tags {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.province-list-group {
    border: 1px dashed #dbe3ef;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

    .province-list-group h3 {
        margin: 0;
        padding: 10px 12px;
        background: #fff1f2;
        color: #dc2626;
        font-size: 15px;
        font-weight: 900;
        border-bottom: 1px dashed #fecaca;
    }

.province-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-bottom: 1px dashed #e5e7eb;
    color: #0f172a;
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

    .province-list-item:last-child {
        border-bottom: 0;
    }

    .province-list-item span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .province-list-item em {
        flex: 0 0 auto;
        font-style: normal;
        font-size: 12px;
        font-weight: 800;
        color: #64748b;
        background: #f8fafc;
        border: 1px dashed #cbd5e1;
        border-radius: 999px;
        padding: 3px 7px;
    }

    .province-list-item:hover {
        background: linear-gradient(90deg, #fff1f2, #fff);
        color: #dc2626;
    }

        .province-list-item:hover em {
            color: #dc2626;
            border-color: #fca5a5;
            background: #fff;
        }

.tag-group {
    border: 1px dashed #dbe3ef;
    border-radius: 14px;
    padding: 10px;
    background: #fff;
}

    .tag-group h3 {
        margin: 0 0 8px;
        color: #dc2626;
        font-size: 15px;
    }

    .tag-group a,
    .date-tags a {
        display: inline-flex;
        justify-content: center;
        min-width: 74px;
        margin: 3px;
        padding: 6px 8px;
        border: 1px dashed #cbd5e1;
        border-radius: 9px;
        color: #0f172a;
        text-decoration: none;
        font-size: 12px;
        font-weight: 900;
        background: #fff;
    }

        .tag-group a:hover,
        .date-tags a:hover {
            background: #dc2626;
            color: #fff;
            border-color: #dc2626;
        }

/* =========================
   TABLET
========================= */

@media (min-width: 768px) and (max-width: 1100px) {
    .lottery-page {
        padding: 12px;
    }

    .lottery-home-grid {
        grid-template-columns: 260px minmax(0, 1fr);
    }

    .lottery-col-right {
        grid-column: 1 / -1;
    }

    .lottery-detail-grid,
    .lottery-live-layout,
    .lottery-live {
        grid-template-columns: 1fr;
    }

    .lottery-detail-ads,
    .live-ads {
        display: none;
    }

    .lottery-result-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .lottery-search {
        gap: 8px;
    }

        .lottery-search select {
            width: 165px;
        }

        .lottery-search input[type="date"] {
            width: 140px;
        }

        .lottery-search button {
            min-width: 86px;
            padding: 0 12px;
        }

    .date-search input[type="date"] {
        flex: 1;
    }

    .detail-search select {
        flex: 1;
    }

    .detail-search input[type="date"] {
        flex: 0 0 145px;
    }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 767px) {
    .lottery-page {
        padding: 10px;
    }

    .lottery-hero,
    .lottery-top {
        padding: 18px;
        border-radius: 16px;
    }

        .lottery-hero h1,
        .lottery-top h1 {
            font-size: 25px;
        }

    .lottery-home-grid,
    .lottery-detail-grid,
    .lottery-live-layout,
    .lottery-live {
        grid-template-columns: 1fr;
    }

    .lottery-detail-ads,
    .live-ads {
        display: none;
    }

    .lottery-box {
        padding: 13px;
        border-radius: 16px;
    }

    .lottery-search {
        gap: 6px;
    }

        .lottery-search select {
            flex: 1 1 auto;
            width: auto;
            min-width: 0;
            height: 36px;
            font-size: 12px;
            padding: 0 8px;
        }

        .lottery-search input[type="date"] {
            flex: 0 0 118px;
            width: 118px;
            min-width: 118px;
            height: 36px;
            font-size: 12px;
            padding: 0 7px;
        }

        .lottery-search button {
            flex: 0 0 auto;
            min-width: 74px;
            height: 36px;
            padding: 0 9px;
            border-radius: 9px;
            font-size: 12px;
            box-shadow: 0 5px 12px rgba(15, 23, 42, .10);
        }

    .date-search input[type="date"] {
        flex: 1 1 auto;
        width: auto;
        min-width: 118px;
    }

    .date-search button {
        min-width: 86px;
    }

    .detail-search select {
        flex: 1 1 100%;
        width: 100%;
    }

    .detail-search input[type="date"] {
        flex: 1 1 auto;
        width: auto;
        min-width: 118px;
    }

    .detail-search button {
        min-width: 86px;
    }

    .lottery-result-grid {
        grid-template-columns: 1fr;
    }

    .lottery-card-head {
        flex-direction: column;
    }

    .daily-item,
    .province-list-item {
        min-height: 42px;
        padding: 9px 10px;
        font-size: 13px;
    }

        .province-list-item em,
        .daily-item em {
            font-size: 11px;
            padding: 3px 6px;
        }
}

/* =========================
   VERY SMALL MOBILE
========================= */

@media (max-width: 380px) {
    .lottery-search {
        flex-wrap: wrap;
    }

        .lottery-search select {
            flex: 1 1 100%;
            width: 100%;
        }

        .lottery-search input[type="date"] {
            flex: 1 1 calc(100% - 92px);
            width: auto;
        }

        .lottery-search button {
            flex: 0 0 86px;
        }
}
/*==========================
    STATISTICS BANNER
==========================*/

.lottery-stats-banner {
    margin: 40px 0;
    padding: 35px;
    border-radius: 16px;
    background: linear-gradient(135deg,#ffffff,#f5f7fb);
    border: 1px solid #e8e8e8;
    box-shadow: 0 10px 25px rgba(0,0,0,.05);
}

.stats-banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.stats-banner-left {
    flex: 1;
}

.stats-badge {
    display: inline-block;
    background: #d60000;
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.stats-banner-left h2 {
    margin: 0 0 12px;
    font-size: 30px;
    font-weight: 700;
    color: #111;
}

.stats-banner-left p {
    margin: 0;
    color: #666;
    line-height: 1.8;
    max-width: 750px;
}

.stats-banner-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    background: #d60000;
    color: #fff;
    text-decoration: none;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 700;
    transition: .25s;
    white-space: nowrap;
}

    .stats-btn:hover {
        background: #b70000;
        transform: translateY(-3px);
        color: #fff;
        box-shadow: 0 10px 20px rgba(214,0,0,.25);
    }

/* Tablet */

@media(max-width:991px) {
    .stats-banner-content {
        flex-direction: column;
        text-align: center;
    }

    .stats-banner-left h2 {
        font-size: 24px;
    }

    .stats-btn {
        width: 100%;
    }
}

/* Mobile */

@media(max-width:576px) {
    .lottery-stats-banner {
        padding: 20px;
        margin: 25px 0;
    }

    .stats-banner-left h2 {
        font-size: 22px;
    }

    .stats-banner-left p {
        font-size: 14px;
    }

    .stats-btn {
        padding: 14px;
        font-size: 15px;
    }
}

.last2-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

    .last2-table td {
        width: 10%;
        border: 1px solid #ddd;
        text-align: center;
        padding: 6px 0;
        font-weight: 700;
        background: #fafafa;
    }
