@media (max-width:992px) {
    :root {
        --primary-gradient: linear-gradient(135deg, #ff6b6b, #ee5a24);
        --secondary-gradient: linear-gradient(135deg, #4facfe, #032e6e);
        --gold-gradient: linear-gradient(135deg, #ffd700, #ffed4e);
        --white: #ffffff;
        --shadow-light: rgba(0, 0, 0, 0.1);
        --text-primary: #2c3e50;
        --text-secondary: #34495e;
    }

    body {
        background: linear-gradient(135deg, rgb(255, 249, 235) 0%, rgb(255, 243, 233) 100%);
        min-height: 100vh;
        font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        margin: 0;
        padding: 0;
    }

    .layout-wrapper {
        max-width: 100%;
        padding: 0 20px;
    }

    .page-header {
        background: linear-gradient(135deg, #ff6b6b, #ee5a24);
        color: white;
        padding: 25px;
        border-radius: 20px 20px 0 0;
        position: relative;
        overflow: hidden;
    }

    .page-title-h1 {
        font-size: 2rem;
        font-weight: 900;
        color: white;
        margin-bottom: 10px;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
        position: relative;
        z-index: 2;
    }

    .bg-dark-vietlott {
        background: linear-gradient(135deg, #2c3e50, #34495e);
        color: white;
        padding: 25px;
        border-radius: 16px;
        box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
        position: relative;
        overflow: hidden;
    }

    .util-w-10 {
        width: 10%;
        padding: 2px;
    }

    .lottery-ball {
        width: 42px;
        height: 42px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 13px;
        color: white;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        margin: 1px;
    }

    .lottery-ball.keno {
        background: linear-gradient(135deg, #4facfe, #00f2fe);
    }

    .nav-tabs {
        border: none;
        margin-bottom: 0;
    }

    .nav-tabs .nav-item {
        margin-right: 5px;
    }

    .nav-tabs .nav-link {
        background: linear-gradient(135deg, #667eea, #764ba2);
        color: white;
        border: none;
        border-radius: 10px 10px 0 0;
        padding: 12px 20px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .nav-tabs .nav-link:hover {
        background: linear-gradient(135deg, #ff6b6b, #ee5a24);
        color: white;
    }

    .util-bg-orange {
        background: linear-gradient(135deg, #ff6b6b, #ee5a24) !important;
    }

    .util-bg-orange .nav-link {
        background: transparent !important;
        color: white !important;
    }

    .comp-box {
        background: var(--white);
        border-radius: 16px;
        padding: 25px;
        margin-bottom: 25px;
        box-shadow: 0 8px 32px var(--shadow-light);
    }

    .comp-box-title {
        font-size: 1.5em;
        font-weight: bold;
        margin-bottom: 20px;
        text-align: center;
        position: relative;
        padding-bottom: 10px;
    }

    .comp-table {
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        width: 100%;
    }

    .comp-table tbody tr:hover {
        background: rgba(79, 172, 254, 0.1);
    }

    .comp-table td {
        padding: 12px 15px;
        border: 1px solid #e1e8ed;
        text-align: center;
    }

    .btn-green {
        background: linear-gradient(135deg, #27ae60, #2ecc71);
        border: none;
        color: white;
        font-weight: bold;
        padding: 15px 30px;
        border-radius: 50px;
        box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
        width: 100%;
    }

    .btn-green:hover {
        background: linear-gradient(135deg, #2ecc71, #27ae60);
        box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
        color: white;
    }

    .comp-article-content {
        background: var(--white);
        border-radius: 16px;
        padding: 25px;
        box-shadow: 0 8px 32px rgba(238, 90, 36, 0.2);
        margin-bottom: 25px;
        position: relative;
    }

    .util-text-red {
        color: #e74c3c !important;
    }

    .util-text-nowrap {
        white-space: nowrap;
    }

    .js-keno-item {
        display: flex;
        align-items: flex-start;
        margin-bottom: 15px;
        padding-bottom: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .js-keno-item .util-small {
        min-width: 120px;
    }

    .js-keno-item .util-flex.util-flex-wrap {
        flex: 1;
        justify-content: flex-start;
        align-items: center;
    }

    .js-keno-item .util-ms-3 {
        min-width: 100px;
    }
}

@media (max-width:768px) {
    .js-keno-result-box {
        margin-top: 0px !important;
    }

    .layout-wrapper {
        padding: 0 15px;
    }

    .layout-row.util-g-0.util-g-md-3 {
        margin-top: 120px !important;
    }

    .page-header {
        padding: 20px 15px;
        border-radius: 15px 15px 0 0;
    }

    .page-title-h1 {
        font-size: 1.5rem;
        text-align: center;
        line-height: 1.3;
    }

    .bg-dark-vietlott {
        padding: 20px 15px;
    }

    .lottery-ball {
        width: 35px;
        height: 35px;
        font-size: 12px;
        margin: 1px;
    }

    .util-w-10 {
        width: calc(20% - 4px);
        padding: 1px;
    }

    .js-keno-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .js-keno-item .util-small.util-me-3 {
        margin-right: 0 !important;
        margin-bottom: 10px;
        width: 100%;
        min-width: auto;
    }

    .js-keno-item .util-flex.util-flex-wrap {
        width: 100%;
        margin-bottom: 10px;
        justify-content: center;
    }

    .js-keno-item .util-ms-3 {
        margin-left: 0 !important;
        width: 100%;
        min-width: auto;
    }

    .comp-box {
        padding: 20px 15px;
        margin-bottom: 20px;
        border-radius: 12px;
    }

    .comp-article-content {
        padding: 20px 15px;
        border-radius: 12px;
    }

    .nav-tabs {
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap;
        padding-bottom: 5px;
    }

    .nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .nav-tabs .nav-item {
        flex-shrink: 0;
        margin-right: 3px;
        margin-bottom: 0;
    }

    .nav-tabs .nav-link {
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 8px;
    }

    .btn-green {
        padding: 12px 24px;
        font-size: 14px;
    }

    .comp-box-title {
        font-size: 1.3rem;
    }

    .comp-table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width:576px) {
    .layout-wrapper {
        padding: 0 10px;
    }

    .page-header {
        padding: 15px 10px;
        border-radius: 12px 12px 0 0;
    }

    .page-title-h1 {
        font-size: 1.3rem;
    }

    .bg-dark-vietlott {
        padding: 15px 10px;
    }

    .lottery-ball {
        width: 30px;
        height: 30px;
        font-size: 10px;
    }

    .util-w-10 {
        width: calc(16.66% - 4px);
        padding: 1px;
    }

    .comp-box {
        padding: 15px 10px;
        border-radius: 10px;
    }

    .comp-article-content {
        padding: 15px 10px;
        border-radius: 10px;
    }

    .nav-tabs .nav-link {
        padding: 6px 8px;
        font-size: 10px;
    }

    .comp-box-title {
        font-size: 1.2rem;
    }

    .btn-green {
        padding: 10px 20px;
        font-size: 13px;
    }

    .util-small {
        font-size: 0.75rem;
    }

    .js-keno-item .util-text-nowrap {
        white-space: normal;
    }
}

@media (max-width:480px) {
    .layout-wrapper {
        padding: 0;
    }

    .lottery-ball {
        width: 28px;
        height: 28px;
        font-size: 9px;
    }

    .util-w-10 {
        width: calc(14.28% - 2px);
        padding: 1px;
    }

    .page-header {
        padding: 12px 8px;
    }

    .page-title-h1 {
        font-size: 1.1rem;
    }

    .bg-dark-vietlott {
        padding: 12px 8px;
    }

    .comp-box {
        padding: 0;
        margin: 0 !important;
    }

    .comp-article-content {
        padding: 12px 8px;
    }

    .nav-tabs .nav-link {
        padding: 5px 6px;
        font-size: 9px;
    }

    .comp-box-title {
        font-size: 1.1rem;
    }
}

@media (max-width:375px) {
    .lottery-ball {
        width: 26px;
        height: 26px;
        font-size: 8px;
    }

    .util-w-10 {
        width: calc(12.5% - 2px);
    }

    .page-title-h1 {
        font-size: 1rem;
    }
}

@media (hover:none) and (pointer:coarse) {
    .lottery-ball:hover {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

@media (-webkit-min-device-pixel-ratio:2),
(min-resolution:192dpi) {
    .lottery-ball {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .comp-box {
        box-shadow: 0 4px 16px var(--shadow-light);
    }
}