@import url('https://fonts.googleapis.com/css2?family=Prompt:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');

@font-face {
    font-family: "Buran USSR";
    src: url("../fonts/Buran_USSR.ttf") format("truetype");
}

body {
    font-family: "Sarabun", sans-serif;
    cursor: url(../cursor/point.cur), auto !important;
}

::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-thumb {
    background: #A33838;
    border-radius: 9px;
}

::-webkit-scrollbar-thumb:hover {
    background: #850D0D;
}

.btn:hover,
a:hover,
.playgame:hover {
    cursor: url(../cursor/link.cur), auto !important;
}

.navbar-brand>img {
    height: 45px;
}

.main-header {
    font-family: "Buran USSR" !important;
    background: black !important;
    box-shadow: none;
    border: 10px solid;
    border-image-slice: 1;
    border-width: 3px;
    border-image-source: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
    border-left: 0;
    border-right: 0;
    border-top: 0;
}

.navbar-nav .nav-link {
    font-size: 18px !important;
    color: #ffffff !important;
    transition: 0.3s;
}

.navbar-nav .nav-link:hover {
    color: black !important;
    background-image: url(../images/bg-submenu.png);
    background-size: auto 100%;
    background-repeat: no-repeat;
    background-position: left center;
    padding-left: 15px;
}

.dropdown-menu {
    background-color: black !important;
}

.dropdown-menu .dropdown-item {
    color: #FFFFFF !important;
    transition: 0.3s;
}

.dropdown-menu .dropdown-item:hover {
    color: black !important;
    background: url(../images/bg-submenu.png);
    background-repeat: no-repeat;
    background-size: 100% auto;
    background-position: center;
    padding-left: 40px;
}

.btn-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 5;
}

.btn-modal-close>img {
    width: 35px;
}

#pageModal-serverlist {
    background: url(../images/bg-serverlist.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

#pageModal-download,
#pageModal-contact {
    background: url(../images/bg-contact.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

#pageModal-login,
#pageModal-register,
#pageModal-profile,
#pageModal-forgotpass,
#pageModal-reset-password {
    background: url(../images/bg-login.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

#pageModal-topup, 
#pageModal-gold,
#pageModal-topupHistory,
#pageModal-exchangeHistory {
    background: url(../images/bg-topup.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

.notification-modal .modal-body {
    background: url(../images/bg-contact.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

#pageModal-ranking {
    height: 100%;
    min-height: 800px;
    background: url(../images/rank/Plate.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

.swal-modal {
    background: url(../images/bg-contact.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

.swal-icon--success:after,
.swal-icon--success:before,
.swal-icon--success__hide-corners {
    display: none;
}

.swal-footer {
    text-align: center;
}

.swal-button {
    width: 236px;
    height: 64px;
    
    background-image: url(../images/btn.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

    border: none;
    color: black;
    font-family: "Buran USSR", sans-serif;
    font-size: 2.4rem;
    /*font-weight: 700;*/

    cursor: pointer;
    outline: none;
    position: relative;

    background-color: unset;

    display: flex;
    justify-content: center;
    align-items: center;
}

.swal-button:hover {
    background-image: url(../images/btn-hover.png);
}

.swal-button:not([disabled]):hover {
    background-color: unset;
}

.swal-button:focus {
    outline: none;
    box-shadow: none;
}

.swal-title {
    font-weight: unset;
    background: url(../images/topic.png);
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position: center;
    text-align: center;
    color: #FFFFFF;
    font-size: 20px;
    padding: 5px 15px;
}

.swal-text {
    color: black;
    text-align: center;
}

.swal-title:not(:first-child) {
    padding-bottom: 5px;
}

.swal-title:not(:last-child) {
    margin-top: 20px;
    margin-bottom: 13px;
}

.swal-content__input {
    background: url(../images/input-bg.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    border: 0 !important;
    font-size: 16px;
    text-align: center;
}

.topic {
    background: url(../images/topic.png);
    background-repeat: no-repeat;
    background-size: auto 100%;
    background-position: center;
    text-align: center;
    color: #FFFFFF;
    font-family: "Buran USSR", sans-serif;
    font-size: 20px;
    padding: 5px 15px;
}

.btn-server-select {
    position: relative;
    background: url(../images/bg-server-select.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    width: 100%;
    transition: 0.3s;
    text-align: left;
}

.btn-server-select:hover {
    background: url(../images/bg-server-selected.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
}

.btn-server-select>span {
    font-family: "Buran USSR";
    font-size: 22px;
    text-transform: uppercase;
    padding-left: 10px;
}

.btn-server-select>img {
    position: absolute;
    bottom: 0;
    right: 0;
    z-index: 5;
    height: 55px;
    width: auto;
}

.btn-server-select.selected {
    background: url(../images/bg-server-selected.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
}

.btn-download:hover>img {
    transition: 0.3s;
    transform: scale(1.1);
}

.btn-payment-select {
    height: 150px;
    background: url(../images/topup-idle.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    padding: 10px;
    transition: 0.3s;
}

.btn-payment-select:hover, .btn-payment-select.selected {
    background: url(../images/topup-select.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

.content {
    background: url(../images/background/bg-masthead.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.content>.section {
    position: relative;
    overflow-x: hidden;
    min-height: 100dvh;
    display: flex;
    align-items: start;
    padding-top: 100px;
}

.playgame {
    transition: 0.5s;
}

.playgame:hover {
    transform: scale(1.1);
}

.form-control {
    margin: auto;
    width: 75%;
    background: url(../images/input-bg.png);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    border: 0 !important;
    font-size: 16px;
    text-align: center;
}

.form-control::placeholder {
    color: #d80505 !important;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: calc(100dvh - 10px);
    top: 0;
    background-image: url('');
    background-repeat: repeat;
    background-size: cover;
    background-position: 50% 50%;
    z-index: 99;
    pointer-events: none;
}

.form-auth {
    position: relative;
    z-index: 3;
}

.prop {
    position: absolute;
    z-index: 2;
}

.prop-login {
    top: -100px;
    left: -220px;
    width: 350px;
}

.prop-topup-l {
    bottom: 0px;
    left: -110px;
    width: 250px;
}

.prop-topup-r {
    bottom: 10px;
    right: -120px;
    width: 250px;
}

.prop-contact {
    bottom: 2%;
    right: 2%;
}

.prop-contact>img {
    width: 150px;
    transition: 0.3s;
}

.prop-contact>img:hover {
    transform: scale(1.1);
}

.qr-frame {
    background: url(../images/topup-idle.png);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    padding: 10px;
    width: 35%;
}

.modal-backdrop {
    background-color: #000000 !important;
    opacity: 0.8 !important;
}

#all-server {
    max-height: 250px;
    overflow-y: scroll;
    padding-top: 10px;
}

@media only screen and (min-width: 768px) {

    /* Small Size */
    .banner {
        width: 75%;
    }

    .navbar-brand:hover {
        transform: scale(1.1);
        transition: 0.3s;
    }

    .main-header {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .navbar-nav .nav-link {
        text-transform: uppercase;
        min-width: 150px;
    }

    .navbar-nav .nav-link:hover {
        background-image: url(../images/bg-menu-hover.png);
        background-size: 100% 100%;
        background-repeat: no-repeat;
        background-position: center;

    }

    .nav-item {
        text-align: center;
    }

    .content>.section {
        min-height: 100vh;
        /* align-items: center; */
    }

    #particles-js {
        height: calc(100vh - 10px);
    }
}

@media only screen and (min-width: 992px) {
    /* Medium Size */

}

@media only screen and (min-width: 1200px) {
    /* Large Size */

}

@media only screen and (min-width: 1600px) {
    /* Large Size */

}

@-webkit-keyframes logo {
    0% {
        transform: scale(1)
    }

    30% {
        transform: scale(.80)
    }

    60% {
        transform: scale(1)
    }
}

@keyframes logo {
    0% {
        transform: scale(1)
    }

    30% {
        transform: scale(.80)
    }

    60% {
        transform: scale(1)
    }
}

@-webkit-keyframes blink {
    0% {
        filter: brightness(1);
        filter: contrast(1);
        -webkit-filter: brightness(1);
        -webkit-filter: contrast(1);
    }

    25% {
        filter: brightness(2);
        filter: contrast(2);
        -webkit-filter: brightness(2);
        -webkit-filter: contrast(2);
    }

    50% {
        filter: brightness(0.5);
        filter: contrast(0.5);
        -webkit-filter: brightness(0.5);
        -webkit-filter: contrast(0.5);
    }

    75% {
        filter: brightness(2);
        filter: contrast(2);
        -webkit-filter: brightness(2);
        -webkit-filter: contrast(2);
    }

    100% {
        filter: brightness(1);
        filter: contrast(1);
        -webkit-filter: brightness(1);
        -webkit-filter: contrast(1);
    }
}

@keyframes blink {
    0% {
        filter: brightness(1);
        filter: contrast(1);
        -webkit-filter: brightness(1);
        -webkit-filter: contrast(1);
    }

    25% {
        filter: brightness(2);
        filter: contrast(2);
        -webkit-filter: brightness(2);
        -webkit-filter: contrast(2);
    }

    50% {
        filter: brightness(0.5);
        filter: contrast(0.5);
        -webkit-filter: brightness(0.5);
        -webkit-filter: contrast(0.5);
    }

    75% {
        filter: brightness(2);
        filter: contrast(2);
        -webkit-filter: brightness(2);
        -webkit-filter: contrast(2);
    }

    100% {
        filter: brightness(1);
        filter: contrast(1);
        -webkit-filter: brightness(1);
        -webkit-filter: contrast(1);
    }
}

@-webkit-keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    50% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

.playGameContent {
    flex-grow: 1;
    text-align: center;
    background-color: #000000;
}

#flashContent {
    height: calc(100vh - 44px);
    background-image: url('./../../assets/images/background_not_support.webp');
    background-repeat: no-repeat;
    z-index: 0;
    text-align: center;
}

.btn-confirm {
    width: 236px;
    height: 64px;

    background-image: url(../images/btn.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

    border: none;
    color: black;
    font-family: "Buran USSR", sans-serif;
    font-size: 2.2rem;

    cursor: pointer;
    outline: none;
    position: relative;

    background-color: unset;

    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-confirm:hover {
    background-image: url(../images/btn-hover.png);
}

.btn-confirm:focus {
    outline: none;
    box-shadow: none;
}

.cf-turnstile {
    display: flex;
    justify-content: center;
}

.dt-container.no-header .dt-scroll {
    border-top: none;
}

.dt-container.no-footer .dt-scroll {
    border-bottom: none;
}

.dt-top {
    padding: 0 0 1rem;
}

.dt-bottom {
    padding: 0;
}

.dt-top > nav:first-child,
.dt-top > div:first-child,
.dt-bottom > nav:first-child,
.dt-bottom > div:first-child {
    float: left;
}

.dt-top > nav:last-child,
.dt-top > div:last-child,
.dt-bottom > nav:last-child,
.dt-bottom > div:last-child {
    float: right;
}

.dt-length select {
    width: auto;
    display: inline-block;
    padding-left: 1.125rem;
    padding-right: 2.125rem;
    margin-right: 0.25rem;
}

.dt-length select:focus {
    padding-left: calc(1.125rem + -1px);
    padding-right: calc(2.125rem + -1px);
}

.dt-info {
    margin: 7px 0;
}

/* PAGER */
.dt-paging .dt-paging-button:hover {
    background-color: #eeeeee !important;
}

.dt-paging .dt-paging-button.current,
.dt-paging .dt-paging-button.current:focus,
.dt-paging .dt-paging-button.current:hover {
    background-color: #6200ea;
    color: white;
}

.dt-paging .dt-paging-button.disabled,
.dt-paging .dt-paging-button.disabled:focus,
.dt-paging .dt-paging-button.disabled:hover {
    cursor: not-allowed;
    opacity: 0.4;
}

.dt-paging .dt-paging-button.pager {
    font-weight: bold;
}

/* TABLE */
table.dataTable {
    border-collapse: collapse;
}

table.dataTable > thead > tr > th,
table.dataTable > thead > tr > td,
table.dataTable > tfoot > tr > th,
table.dataTable > tfoot > tr > td,
table.dataTable > tbody > tr > th,
table.dataTable > tbody > tr > td {
    vertical-align: top;
    padding: 1rem 1rem;
}

table.dataTable > thead > tr > th {
    vertical-align: bottom;
    text-align: left;
    border-bottom: none;
}

table.dataTable > tfoot > tr > th {
    vertical-align: bottom;
    text-align: left;
}

table.dataTable th {
    vertical-align: bottom;
    text-align: left;
}

table.dataTable th a {
    text-decoration: none;
    color: inherit;
}

.dt-orderable .dt-ordering {
    display: inline-block;
    height: 100%;
    position: relative;
    width: 100%;
}

.dt-ordering::before,
.dt-ordering::after {
    content: "";
    height: 0;
    width: 0;
    position: absolute;
    right: 4px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    opacity: 0.2;
}

.dt-ordering::before {
    bottom: 2px;
    border-top: 4px solid black;
}

.dt-ordering::after {
    top: -2px;
    border-bottom: 4px solid black;
}

.dt-asc .dt-ordering::after,
.dt-desc .dt-ordering::before {
    opacity: 0.6;
}

.dt-empty {
    text-align: center;
}

.dt-top::after,
.dt-bottom::after {
    clear: both;
    content: " ";
    display: table;
}

div.dt-container .dt-paging .dt-paging-button {
  box-sizing: unset;
  display: unset;
  min-width: unset;
  padding: unset;
  margin-left: unset;
  text-align: unset;
  text-decoration: unset;
  cursor: unset;
  color: unset;
  border: unset !important;
  border-radius: unset;
  background: unset;
}

div.dt-container .dt-paging .ellipsis {
  padding: var(--bs-pagination-padding-y) var(--bs-pagination-padding-x);
}

div.dt-container .dt-paging .dt-paging-button:hover {
  color: unset;
  border: unset;
  background-color: #111;
  background: unset; /* Chrome,Safari4+ */
  background: unset; /* Chrome10+,Safari5.1+ */
  background: unset; /* FF3.6+ */
  background: unset; /* IE10+ */
  background: unset; /* Opera 11.10+ */
  background: unset; /* W3C */
}

div.dt-container div.dt-search select {
    margin-left: .5em;
    display: inline-block;
    width: auto;
}

.dt-processing.card {
    background-color: transparent;
    box-shadow: unset;
}

@media (max-width: 576px) {

    .modal-body {
        padding: 1rem !important;
        max-height: 100vh;
        overflow: visible !important;
    }
}

/* ===== Mobile UI fixes (<= 767.98px) — desktop unaffected ===== */
@media only screen and (max-width: 767.98px) {

    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .wrapper,
    .content {
        overflow-x: hidden;
    }

    /* Header / Navbar */
    .main-header {
        padding: 5px 0 !important;
    }

    .navbar-brand > img {
        height: 38px;
    }

    .navbar-toggler {
        padding: .25rem .5rem;
        font-size: 1rem;
    }

    .navbar-nav {
        padding: 8px 0;
    }

    .navbar-nav .nav-link {
        font-size: 16px !important;
        padding: 10px 12px !important;
        text-align: center;
        justify-content: center;
    }

    .navbar-nav .nav-link.d-flex {
        justify-content: center !important;
    }

    .navbar-nav .dropdown-menu {
        text-align: center;
        border: 0;
        margin: 0 auto;
    }

    .navbar-nav .dropdown-menu .dropdown-item {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .navbar-nav .nav-link:hover {
        background-image: none;
        color: #ffd56b !important;
        padding-left: 12px;
    }

    .dropdown-menu {
        text-align: center;
    }

    .dropdown-menu .dropdown-item:hover {
        background: rgba(255,255,255,0.08);
        color: #ffd56b !important;
        padding-left: 12px;
    }

    /* Main content section */
    .content > .section {
        padding-top: 80px;
        padding-bottom: 30px;
        padding-left: 10px;
        padding-right: 10px;
        align-items: center;
    }

    /* Play game button */
    #playgame,
    a#playgame {
        display: inline-block;
        max-width: 90%;
    }

    .playgame,
    img.playgame {
        max-width: 100% !important;
        width: auto !important;
        height: auto !important;
        display: inline-block;
    }

    .playgame:hover {
        transform: none;
    }

    /* Ensure container itself never exceeds viewport */
    .container,
    .container-fluid {
        max-width: 100% !important;
        padding-left: 12px;
        padding-right: 12px;
    }

    /* Constrain any image to its parent */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Decorative props that overflow viewport — hide on mobile */
    .prop-login,
    .prop-topup-l,
    .prop-topup-r {
        display: none !important;
    }

    .prop-contact {
        bottom: 10px;
        right: 10px;
    }

    .prop-contact > img {
        width: 80px;
    }

    /* Modal — full screen friendly */
    .modal-dialog {
        margin: .5rem;
        max-width: calc(100vw - 1rem);
    }

    .modal-dialog.modal-lg,
    .modal-dialog.modal-xl {
        max-width: calc(100vw - 1rem);
    }

    .modal-content {
        max-width: 100%;
    }

    .modal-body {
        padding: 2.5rem !important;
        max-height: calc(100vh - 1rem);
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    .btn-modal-close {
        right: 15px;
        top: 15px;
    }

    .btn-modal-close > img {
        width: 28px;
    }

    /* Topic title scales down */
    .topic,
    .swal-title {
        font-size: 16px;
        background-size: 100% 100%;
        padding: 6px 10px;
        word-break: break-word;
    }

    /* Forms */
    .form-control {
        width: 100%;
        font-size: 14px;
        margin: auto;
    }

    .form-group label {
        font-size: 14px;
    }

    /* Buttons (login/register/etc are image buttons — keep responsive) */
    .btn-login img,
    .btn-register img,
    .btn-joinserver img {
        max-width: 200px;
        height: auto;
    }

    .btn-confirm,
    .swal-button {
        width: 180px;
        height: 50px;
        font-size: 1.5rem;
    }

    /* Server list — 2 columns on mobile, scroll after 2 rows */
    /*#pageModal-serverlist {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }*/

    #pageModal-serverlist .row {
        margin-left: -4px;
        margin-right: -4px;
    }

    #pageModal-serverlist .row > [class*="col-"] {
        padding-left: 4px;
        padding-right: 4px;
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Each section: exactly 2 rows visible, scroll if more */
    #recent-server,
    #new-server,
    #all-server {
        max-width: 100%;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Tighter row spacing + fixed col height so 2 rows fit exactly */
    #recent-server > [class*="col-"],
    #new-server > [class*="col-"],
    #all-server > [class*="col-"] {
        margin-bottom: 6px !important;
        padding-top: 0;
        padding-bottom: 0;
    }

    /* 2 rows × (50 button + 6 margin) = 112px */
    #recent-server,
    #new-server,
    #all-server {
        height: 112px;
        max-height: 112px;
    }

    .btn-server-select {
        width: 100%;
        max-width: 100%;
        height: 50px;
        min-height: 50px;
        padding-right: 40px;
    }

    .btn-server-select > span {
        font-size: 12px;
        padding-left: 6px;
        word-break: break-word;
        line-height: 1.1;
        display: inline-block;
    }

    .btn-server-select > img {
        height: 38px;
    }

    /* Download / contact / topup tiles — 2 per row on mobile */
    #pageModal-download .row > [class*="col-"],
    #pageModal-contact .row > [class*="col-"],
    #pageModal-topup .row > [class*="col-"] {
        flex: 0 0 50%;
        max-width: 50%;
        margin-bottom: 12px;
        text-align: center;
        padding-left: 6px;
        padding-right: 6px;
    }

    /* Full-width column inside topup (rate link) stays full */
    #pageModal-topup .row > .col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    #pageModal-download .btn-download,
    #pageModal-contact .btn-download {
        display: inline-block;
        width: 100%;
        max-width: 160px;
        margin: 0 auto;
    }

    #pageModal-download .btn-download img,
    #pageModal-contact .btn-download img {
        margin: 0 auto;
        display: block;
        max-width: 100%;
    }

    #pageModal-topup .btn-payment-select {
        max-width: 160px;
        margin: 0 auto;
        height: 100px;
    }

    .btn-payment-select {
        height: 110px;
        padding: 8px;
    }

    /* QR code frame — bigger so it's readable */
    .qr-frame {
        width: 70%;
    }

    /* DataTables — horizontal scroll instead of breaking layout */
    .dataTables_wrapper,
    .dt-container {
        overflow-x: auto;
    }

    table.dataTable {
        font-size: 13px;
    }

    table.dataTable > thead > tr > th,
    table.dataTable > thead > tr > td,
    table.dataTable > tbody > tr > th,
    table.dataTable > tbody > tr > td {
        padding: .5rem .5rem;
        white-space: nowrap;
    }

    .dt-top > nav:first-child,
    .dt-top > div:first-child,
    .dt-bottom > nav:first-child,
    .dt-bottom > div:first-child,
    .dt-top > nav:last-child,
    .dt-top > div:last-child,
    .dt-bottom > nav:last-child,
    .dt-bottom > div:last-child {
        float: none;
        text-align: center;
        margin-bottom: .5rem;
    }

    /* Particles background — keep contained */
    #particles-js {
        width: 100vw;
        max-width: 100%;
    }

    /* Turnstile captcha can overflow narrow viewports */
    .cf-turnstile {
        transform: scale(0.85);
        transform-origin: center top;
    }

    /* Background-attachment: fixed is buggy on mobile/iOS */
    .content {
        background-attachment: scroll;
    }
}

/* ===== Tablet range (768px – 1199px) — fix cramped iPad layout ===== */
@media only screen and (min-width: 768px) and (max-width: 1199.98px) {

    /* Server list: 3 per row instead of 4 so tiles aren't squished */
    #pageModal-serverlist .row > .col-md-3 {
        flex: 0 0 33.3333%;
        max-width: 33.3333%;
    }

    /* Server section: exactly 2 rows visible */
    #recent-server > [class*="col-"],
    #new-server > [class*="col-"],
    #all-server > [class*="col-"] {
        margin-bottom: 8px !important;
    }

    /* 2 rows × (60 button + 8 margin) = 136px */
    #recent-server,
    #new-server,
    #all-server {
        height: 136px;
        max-height: 136px;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 0;
        padding-bottom: 0;
    }

    .btn-server-select {
        height: 60px;
        min-height: 60px;
    }

    .btn-server-select > span {
        font-size: 16px;
    }

    .btn-server-select > img {
        height: 48px;
    }

    /* Download / Contact tiles: spacing on tablet */
    #pageModal-download .row > [class*="col-"],
    #pageModal-contact .row > [class*="col-"] {
        margin-bottom: 12px;
    }

    /* Topup payment tiles: 3 per row already fits, but limit width */
    #pageModal-topup .btn-payment-select {
        max-width: 200px;
        margin: 0 auto;
    }

    /* Modal sizing: not as wide as desktop, but bigger than mobile */
    .modal-dialog.modal-lg {
        max-width: 720px;
    }

    /* Decorative props: reposition so they don't escape modal */
    .prop-login {
        top: -60px;
        left: -100px;
        width: 200px;
    }

    .prop-topup-l {
        left: -50px;
        width: 180px;
    }

    .prop-topup-r {
        right: -50px;
        width: 180px;
    }
}

/* Extra-small phones */
@media only screen and (max-width: 380px) {

    .navbar-brand > img {
        height: 32px;
    }

    .topic,
    .swal-title {
        font-size: 14px;
    }

    .btn-confirm,
    .swal-button {
        width: 160px;
        height: 46px;
        font-size: 1.3rem;
    }

    .btn-payment-select {
        height: 95px;
    }

    .qr-frame {
        width: 85%;
    }
}

.page-link {
    color: #ffffff;
    background-color: #A33838;
    border: 1px solid #850D0D;
}

.page-link:hover {
    color: #ffffff;
    background-color: #850D0D;
    border-color: #850D0D;
}

.page-item.active .page-link {
    color: #ffffff;
    background-color: #850D0D;
    border-color: #850D0D;
}

.page-item.disabled .page-link {
    color: #ffffff;
    pointer-events: none;
    cursor: auto;
    background-color: #A33838;
    border-color: #850D0D;
}

.img-overlay-container {
    position: relative;
    display: block;
}

.img-overlay-text {
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 18px;
    font-weight: bold;
    pointer-events: none;
    white-space: nowrap;
}

/* ===== Top 3 Podium ===== */
.ranking-podium {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0;
    padding-top: 76px;
}

.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    flex: 1;
    max-width: 160px;
}

.podium-name {
    font-family: "Buran USSR", sans-serif;
    font-size: 16px;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    z-index: 1;
}

.podium-character {
    position: relative;
    margin-bottom: -15px;
}

.podium-char-img {
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

.podium-badge {
    position: relative;
    z-index: 3;
    margin-top: -20px;
}

.podium-badge img {
    width: auto;
    object-fit: contain;
}

/* Rank 1 - Center (tallest) */
.podium-1 {
    transform: translateY(10px);
}
.podium-1 .podium-char-img {
    height: 170px;
}
.podium-1 .podium-badge img {
    height: 90px;
}

/* Rank 2 - Left */
.podium-2 .podium-char-img {
    height: 145px;
}
.podium-2 .podium-badge img {
    height: 65px;
}

/* Rank 3 - Right */
.podium-3 .podium-char-img {
    height: 145px;
}
.podium-3 .podium-badge img {
    height: 50px;
}

.podium-3 .podium-name {
    transform: translateY(-62%);
}

/* ===== Ranking DataTable ===== */
.ranking-table-wrapper {
    position: relative;
    z-index: 2;
    padding: 0 5px 5px;
    margin-top: -8px;
}

/* Badge icons in table rows - overflow out of row */
.rank-badge-sm {
    height: 55px;
    width: auto;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}

/* Rank column needs relative positioning for absolute badge */
.ranking-datatable td.rank-col-rank,
.ranking-datatable th.rank-col-rank {
    position: relative;
    overflow: visible !important;
}

.ranking-datatable tbody tr {
    overflow: visible !important;
}

/* Header row */
.ranking-datatable thead th {
    background: transparent;
    color: #ffffff !important;
    font-family: "Buran USSR", sans-serif;
    font-size: 25px;
    /*font-style: italic;*/
    /*text-shadow: 0 2px 4px rgba(0,0,0,0.5);*/
    border: none !important;
    padding: 10px 12px !important;
    text-align: center;
    -webkit-text-stroke: 0.5px #000000;
    text-shadow: 0 0 1px rgba(0,0,0,0.3);
}

/* Data rows */
.ranking-datatable tbody tr {
    background: url(../images/rank/SlotPlate.png) no-repeat center / 100% 100% !important;
    border: none !important;
}

.ranking-datatable tbody td {
    font-family: "Buran USSR", sans-serif;
    font-size: 20px;
    color: #1a1a1a;
    /*font-weight: bold;*/
    /*font-style: italic;*/
    border: none !important;
    padding: 10px 12px !important;
    background: transparent !important;
    vertical-align: middle;
    -webkit-text-stroke: 0.5px #000000;
    text-shadow: 0 0 1px rgba(0,0,0,0.3);
}

/* Remove DataTable default borders & stripes */
.ranking-datatable,
.ranking-datatable thead,
.ranking-datatable tbody,
.ranking-datatable tr,
.ranking-datatable td,
.ranking-datatable th {
    border: none !important;
    border-collapse: separate !important;
    border-spacing: 0 3px !important;
}

table.ranking-datatable {
    border-collapse: separate !important;
    border-spacing: 0 3px !important;
}

.ranking-datatable tbody tr:hover {
    filter: brightness(1.05);
}

/* Pagination wrapper */
.ranking-pagination-wrapper {
    display: flex;
    justify-content: center;
    padding: 10px 0 5px;
}

.ranking-pagination-wrapper .dt-paging {
    display: flex;
    justify-content: center;
}

/* Override pagination buttons */
.ranking-pagination-wrapper .dt-paging-button {
    font-family: "Buran USSR", sans-serif !important;
    font-size: 16px !important;
    font-style: italic;
    color: #1a1a1a !important;
    font-weight: bold;
    background: none !important;
    border: none !important;
    padding: 4px 10px !important;
    cursor: pointer;
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.ranking-pagination-wrapper .dt-paging-button:hover {
    transform: scale(1.15);
    opacity: 1;
    background: none !important;
}

.ranking-pagination-wrapper .dt-paging-button.current {
    color: #8B0000 !important;
    opacity: 1;
    text-decoration: underline;
}

.ranking-pagination-wrapper .dt-paging-button.disabled {
    opacity: 0.4;
    cursor: default;
}

.dt-column-order {
    display: none;
}

img.s001 {
    transform: translate(0%, 3%);
}

.podium-2 img.s001 {
    transform: translate(0%, 0%);
}

.podium-3 img.s001 {
    transform: translate(0%, -10%);
}

img.s002 {
    transform: translateY(1%);
}

.podium-2 img.s002 {
    transform: translateY(1%);
}

.podium-3 img.s002 {
    transform: translateY(-8%);
}

img.s003 {
    transform: translate(6%, 10%);
}

.podium-2 img.s003 {
     transform: translate(6%, 5%);
}

.podium-3 img.s003 {
    transform: translate(6%, -2%);
}

img.s004 {
    transform: translateY(2%);
}

.podium-2 img.s004 {
    transform: translateY(-2%);
}

.podium-3 img.s004 {
    transform: translateY(-12%);
}

img.s005 {
    transform: translateY(2%);
}

.podium-2 img.s005 {
     transform: translateY(0%);
}

.podium-3 img.s005 {
    transform: translateY(-10%);
}

img.s006 {
    transform: translate(-16%, 0%);
}

.podium-2 img.s006 {
     transform: translate(-16%, -3%);
}

.podium-3 img.s006 {
    transform: translate(-16%, -12%);
}
/* ===== Ranking Responsive ===== */

/* Large Tablet / Small Desktop (max-width: 1024px) */
@media only screen and (max-width: 1024px) {
    #pageModal-ranking {
        min-height: 650px;
        padding: 8px !important;
    }

    .ranking-podium {
        padding-top: 120px;
    }

    .podium-item {
        max-width: 145px;
    }

    .podium-1 .podium-char-img {
        height: 140px;
    }
    .podium-2 .podium-char-img {
        height: 120px;
    }
    .podium-3 .podium-char-img {
        height: 120px;
    }

    .podium-1 .podium-badge img {
        height: 75px;
    }
    .podium-2 .podium-badge img {
        height: 55px;
    }
    .podium-3 .podium-badge img {
        height: 42px;
    }

     .podium-3 .podium-name {
        transform: translateY(-70%);
    }

    .podium-name {
        font-size: 12px;
    }

    .rank-badge-sm {
        height: 54px;
    }
}

/* Tablet (max-width: 768px) */
@media only screen and (max-width: 768px) {
    #pageModal-ranking {
        min-height: 520px;
        padding: 8px !important;
    }

    .ranking-podium {
        padding-top: 82px;
    }

    .podium-item {
        max-width: 145px;
    }

    .podium-1 {
        transform: translateY(8px);
    }

    .podium-1 .podium-char-img {
        height: 110px;
    }
    .podium-2 .podium-char-img {
        height: 95px;
    }
    .podium-3 .podium-char-img {
        height: 95px;
    }

    .podium-1 .podium-badge img {
        height: 60px;
    }
    .podium-2 .podium-badge img {
        height: 45px;
    }
    .podium-3 .podium-badge img {
        height: 35px;
    }

    .podium-3 .podium-name {
        transform: translateY(-46%);
    }

    .podium-badge {
        margin-top: -12px;
    }

    .podium-name {
        font-size: 14px;
        max-width: 120px;
    }

    .ranking-table-wrapper {
        padding: 0 10px 10px;
        margin-top: -6px;
    }

    .ranking-datatable thead th {
        font-size: 18px;
        padding: 8px 8px !important;
    }

    .ranking-datatable tbody td {
        font-size: 14px;
        padding: 8px 8px !important;
    }

    .rank-badge-sm {
        height: 41px;
    }
}

/* Small Tablet / Large Phone (max-width: 576px) */
@media only screen and (max-width: 576px) {
    #pageModal-ranking {
        min-height: 420px;
        padding: 8px !important;
    }

    .topic {
        display: none;
    }

    .btn-modal-close {
        right: 10px;
        top: 10px;
    }

    .ranking-podium {
        padding-top: 140px;
    }

    .podium-item {
        max-width: 108px;
    }

    .podium-1 {
        transform: translateY(5px);
    }

    .podium-1 .podium-char-img {
        height: 85px;
    }
    .podium-2 .podium-char-img {
        height: 72px;
    }
    .podium-3 .podium-char-img {
        height: 72px;
    }

    .podium-1 .podium-badge img {
        height: 48px;
    }
    .podium-2 .podium-badge img {
        height: 36px;
    }
    .podium-3 .podium-badge img {
        height: 28px;
    }

    .podium-3 .podium-name {
        transform: translateY(-60%);
    }

    .podium-badge {
        margin-top: -12px;
    }

    .podium-character {
        margin-bottom: -10px;
    }

    .podium-name {
        font-size: 9px;
        max-width: 90px;
    }

    .ranking-table-wrapper {
        padding: 0 5px 8px;
        overflow-x: auto;
        margin-top: -2px;
    }

    .ranking-datatable thead th {
        font-size: 16px;
        padding: 6px 5px !important;
    }

    .ranking-datatable tbody td {
        font-size: 11px;
        padding: 6px 5px !important;
    }

    .rank-badge-sm {
        height: 32px;
    }

    .ranking-pagination-wrapper .dt-paging-button {
        font-size: 13px !important;
        padding: 3px 6px !important;
    }
}

/* Mobile Phone (max-width: 480px) */
@media only screen and (max-width: 480px) {
    #pageModal-ranking {
        min-height: 360px;
        padding: 8px !important;
    }

    .topic {
        display: none;
    }

    .btn-modal-close {
        right: 10px;
        top: 10px;
    }

    .ranking-podium {
        padding-top: 130px;
    }

    .podium-item {
        max-width: 80px;
    }

    .podium-1 {
        transform: translateY(4px);
    }

    .podium-1 .podium-char-img {
        height: 68px;
    }
    .podium-2 .podium-char-img {
        height: 58px;
    }
    .podium-3 .podium-char-img {
        height: 58px;
    }

    .podium-1 .podium-badge img {
        height: 38px;
    }
    .podium-2 .podium-badge img {
        height: 28px;
    }
    .podium-3 .podium-badge img {
        height: 22px;
    }

    .podium-3 .podium-name {
        transform: translateY(-20%);
    }

    .podium-badge {
        margin-top: -8px;
    }

    .podium-character {
        margin-bottom: -6px;
    }

    .podium-name {
        font-size: 10px;
        max-width: 70px;
    }

    .ranking-datatable thead th {
        font-size: 14px;
        padding: 5px 4px !important;
    }

    .ranking-datatable tbody td {
        font-size: 11px;
        padding: 5px 4px !important;
    }

    .rank-badge-sm {
        height: 24px;
    }

    .ranking-pagination-wrapper .dt-paging-button {
        font-size: 11px !important;
        padding: 2px 4px !important;
    }
}