/* Login & Daftar table below banner */
.mobile-auth-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
}

.mobile-auth-table__cell {
    width: 50%;
    padding: 0;
    vertical-align: middle;
}

.mobile-auth-table__btn {
    position: relative;
    overflow: hidden;
    display: block;
    width: 100%;
    padding: 12px 8px;
    border: 0;
    border-radius: 0;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.2;
    color: #fff;
    cursor: pointer;
    box-sizing: border-box;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6), 0 0 10px rgba(212, 175, 55, 0.35);
    background-size: 220% 220%;
    animation: mobile-auth-glow 3.5s ease-in-out infinite;
}

.mobile-auth-table__btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 55%;
    height: 100%;
    background: linear-gradient(
        105deg,
        transparent 0%,
        rgba(255, 220, 130, 0.15) 35%,
        rgba(255, 255, 255, 0.55) 50%,
        rgba(255, 220, 130, 0.15) 65%,
        transparent 100%
    );
    transform: skewX(-18deg);
    animation: mobile-auth-shimmer 2.8s ease-in-out infinite;
    pointer-events: none;
}

.mobile-auth-table__btn--register {
    background-image: linear-gradient(
        135deg,
        #7a0a03 0%,
        #c41a0a 25%,
        #d71902 45%,
        #c9a227 62%,
        #9a0f04 82%,
        #6b0803 100%
    );
}

.mobile-auth-table__btn--register:hover,
.mobile-auth-table__btn--register:focus {
    color: #fff8e7;
    text-decoration: none;
}

.mobile-auth-table__btn--login {
    background-image: linear-gradient(
        135deg,
        #3a0504 0%,
        #5c0806 30%,
        #7a0a03 55%,
        #8b6914 75%,
        #4a0605 100%
    );
    animation-delay: 0.6s;
}

.mobile-auth-table__btn--login::after {
    animation-delay: 0.6s;
}

.mobile-auth-table__btn--login:hover,
.mobile-auth-table__btn--login:focus {
    color: #fff8e7;
    text-decoration: none;
}

@keyframes mobile-auth-shimmer {
    0% {
        left: -120%;
    }
    100% {
        left: 180%;
    }
}

@keyframes mobile-auth-glow {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Mobile layout fixes for desktop template viewed on small screens */
@media (max-width: 767px) {
    html,
    body {
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
        font-size: 13px;
    }

    img,
    picture img,
    .banner-img {
        max-width: 100%;
        height: auto;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 10px;
        padding-right: 10px;
        box-sizing: border-box;
    }

    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .row > [class*="col-"] {
        padding-left: 8px;
        padding-right: 8px;
        float: none;
        width: 100%;
        box-sizing: border-box;
    }

    /* Topbar */
    .topbar-container {
        padding: 6px 0;
    }

    .topbar-container .row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .topbar-left-container,
    .topbar-right-container {
        width: 100%;
    }

    .topbar-left-section {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        font-size: 11px;
    }

    .topbar-left-section [data-icon="live-chat"],
    .topbar-left-section [data-icon="android"] {
        height: 24px;
        width: 24px;
    }

    .topbar-left-section [data-icon] {
        height: 18px;
        width: 18px;
    }

    .topbar-left-section .telegram-btn {
        font-size: 11px;
        padding: 5px 8px;
        line-height: 1.3;
    }

    .topbar-left-section .topbar-item + .topbar-item {
        margin-left: 0;
        border-left: 0;
        padding-left: 0;
    }

    .topbar-right-container .login-panel {
        display: flex;
        justify-content: center;
        gap: 8px;
        width: 100%;
    }

    .login-panel .login-button,
    .login-panel .register-button {
        width: 84px;
        padding: 4px 10px;
        font-size: 12px;
        line-height: 22px;
        border-radius: 14px;
    }

    /* Site header */
    .site-header {
        padding: 8px 0;
    }

    .site-header .col-sm-3,
    .site-header .col-sm-9,
    .site-header .col-md-3,
    .site-header .col-md-9 {
        width: 100%;
        float: none;
    }

    .site-header .logo {
        max-width: 280px;
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-top: 76px;
        background-size: contain;
    }

    .site-header .logo > img,
    .site-header .logo > picture {
        height: 62px;
        margin: 10px auto;
    }

    .site-header .logo > picture img {
        height: 62px;
        width: auto;
        max-width: 100%;
    }

    /* Category navigation — horizontal scroll instead of squeezing 11 items */
    .menu-slide {
        width: 100%;
    }

    .menu-slide > i.glyphicon-chevron-left,
    .menu-slide > i.glyphicon-chevron-right {
        flex-shrink: 0;
        font-size: 14px;
    }

    .top-menu {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        flex-wrap: nowrap;
    }

    .top-menu::-webkit-scrollbar {
        display: none;
    }

    .top-menu > li {
        flex: 0 0 auto;
        flex-basis: auto;
        min-width: 84px;
        width: auto;
    }

    .top-menu > li > a {
        padding: 12px 4px;
        font-size: 10px;
        line-height: 1.3;
        white-space: normal;
    }

    .top-menu > li > a > img {
        height: 26px;
        width: 26px;
        margin-bottom: 4px;
    }

    .top-menu > li .game-list {
        display: none !important;
    }

    /* Banner */
    .banner,
    .banner .slick-slide img.banner-img {
        aspect-ratio: 16 / 7;
    }

    .banner img.banner-img {
        width: 100%;
        max-height: 50vw;
        object-fit: cover;
    }

    .nav-btn {
        width: 34px;
        height: 34px;
        padding: 6px;
    }

    .nav-btn.main-prev {
        left: 4px;
    }

    .nav-btn.main-next {
        right: 4px;
    }

    .mobile-auth-table__btn {
        padding: 12px 8px;
        font-size: 14px;
    }

    .home-info-container .container {
        padding-left: 8px;
        padding-right: 8px;
    }

    /* Announcement bar — stack vertically, wrap text */
    .announcement-container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 14px 12px;
        margin: 10px 0;
    }

    .announcement-container > [data-section="announcements"] {
        width: 100% !important;
        min-width: 0;
        overflow: hidden;
    }

    .announcement-container [data-icon="announcement"] {
        height: 26px;
        width: 26px;
    }

    .announcement-container > [data-section="title"] {
        font-size: 14px;
        font-weight: bold;
    }

    .announcement-container > [data-section="date"] {
        font-size: 12px;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    #announcement_list,
    #announcement_list.newsticker {
        position: static !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px;
        width: 100% !important;
        left: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        white-space: normal !important;
    }

    #announcement_list li,
    .announcement-list li {
        display: block !important;
        width: 100% !important;
        white-space: normal !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        font-size: 13px;
        line-height: 1.5;
        padding: 8px 10px;
        box-sizing: border-box;
    }

    #announcement_list .tick-clones {
        display: none !important;
    }

    [id^="ER_"] .tickercontainer,
    [id^="ER_"] .mask {
        width: 100% !important;
        overflow: visible !important;
        height: auto !important;
    }

    /* Section titles */
    .popular-game-title-container .container-title span,
    .home-game-list-container .container-title span,
    .widget-container .container-title span {
        padding: 6px 28px;
        font-size: 13px;
    }

    /* Game Populer — scrollable cards with readable size */
    .popular-game-title-container .container-content .game-list,
    .home-game-list-container .container-content .game-list {
        gap: 8px;
    }

    .popular-game-title-container .container-content,
    .home-game-list-container .container-content {
        padding: 8px;
        overflow: hidden;
    }

    .popular-game-title-container .container-content .game-list,
    .home-game-list-container .container-content .game-list {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        gap: 8px;
        padding-bottom: 4px;
    }

    .popular-game-title-container .container-content .game-list .games-group {
        display: flex;
        gap: 8px;
        width: auto !important;
        min-width: 0 !important;
        flex-shrink: 0;
    }

    .popular-game-title-container .container-content .game-list .game-item,
    .home-game-list-container .container-content .game-list .game-item {
        width: 118px !important;
        min-width: 118px !important;
        flex-shrink: 0;
    }

    .popular-game-title-container .container-content .game-list .game-item .game-name,
    .home-game-list-container .container-content .game-list .game-item .game-name {
        font-size: 11px;
        line-height: 1.3;
        white-space: normal;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        text-overflow: ellipsis;
        text-align: center;
        padding: 4px 2px;
    }

    /* Video Slots Popular */
    .popular-games {
        flex-direction: column;
        position: relative;
        overflow: hidden;
        padding: 10px;
    }

    .popular-games [data-section="left"],
    .popular-games [data-section="right"] {
        width: 100% !important;
        margin-right: 0;
    }

    .popular-games .animated-image,
    .popular-games .tab-pane .animated-image {
        display: none;
    }

    .popular-games .tab-pane {
        position: relative;
        overflow: hidden;
    }

    .popular-games #popular_providers {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-bottom: 0;
    }

    .popular-games #popular_providers::-webkit-scrollbar {
        display: none;
    }

    .popular-games #popular_providers > li {
        flex-shrink: 0;
    }

    .popular-games .nav-tabs > li > a picture img,
    .popular-games .nav-tabs > li > a img {
        max-height: 42px;
        width: auto;
        max-width: 100px;
        height: auto;
    }

    .popular-games .tab-content {
        width: 100%;
        margin-top: 8px;
    }

    .popular-games [data-section="left"] .section-title {
        font-size: 14px;
        height: auto;
        min-height: 44px;
        padding: 8px;
    }

    .popular-games .popular-game-list .game-item {
        width: 33.333%;
    }

    /* Jackpot / lottery row */
    .home-inner-container {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 24px;
    }

    .home-progressive-jackpot {
        flex-direction: column;
    }

    .home-progressive-jackpot .border-container {
        flex-direction: column;
        gap: 12px;
    }

    .home-progressive-jackpot .jackpot-container {
        font-size: 20px;
        letter-spacing: 2px;
    }

    .home-progressive-jackpot .jackpot-play-section {
        margin-left: 0;
        align-items: center;
    }

    .home-progressive-jackpot .jackpot-play-section .jackpot-play-text {
        font-size: 16px;
        text-align: center;
    }

    .progressive-jackpot .jackpot-container {
        font-size: 18px;
        letter-spacing: 2px;
        padding: 0 16px;
    }

    /* Sports sections */
    .sports-platform {
        flex-direction: column;
    }

    .sports-platform [data-section="players"],
    .sports-platform [data-section="matches"] {
        width: 100%;
    }

    /* Floating contact button — keep clear of content */
    .floating-action-button {
        bottom: 16px;
        left: 12px;
        z-index: 1000;
    }

    .floating-action-button .floating-action-button-item {
        width: 44px;
        height: 44px;
    }

    /* Footer columns */
    .footer-info-table-section .footer-info-column {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15);
        padding: 16px 0;
    }

    .footer-info-table-section .col-md-4:last-child .footer-info-column {
        border-bottom: none;
    }

    .telegram-banner-container {
        padding: 10px 0;
    }

    .widget-container .container-title span,
    .popular-game-title-container .container-title span {
        padding: 6px 24px;
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .topbar-left-section .telegram-btn {
        font-size: 10px;
        padding: 4px 6px;
    }

    .login-panel .login-button,
    .login-panel .register-button {
        width: 76px;
        font-size: 11px;
    }

    .site-header .logo {
        max-width: 260px;
        padding-top: 70px;
    }

    .site-header .logo > img,
    .site-header .logo > picture,
    .site-header .logo > picture img {
        height: 56px;
    }

    .popular-game-title-container .container-content .game-list .game-item,
    .home-game-list-container .container-content .game-list .game-item {
        width: 108px !important;
        min-width: 108px !important;
    }

    #announcement_list li,
    .announcement-list li {
        font-size: 12px;
    }
}
