/* Kidmons Laravel tweaks (after legacy style.css) */
.game-thumb-main {
    position: relative;
}

.game-thumb-main > .new-tag {
    display: none;
}

.game-thumb-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    left: auto;
    z-index: 4;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    pointer-events: none;
}

.game-thumb-badge--new {
    background: #ffca28;
    color: #4e342e;
}

.game-thumb-badge--hot {
    background: #ff5722;
    color: #fff;
}

.game-thumb-badge--popular {
    background: #e91e63;
    color: #fff;
}

@media (max-width: 767px) {
    .game-thumb-badge {
        top: 3px;
        right: 3px;
        width: 18px;
        height: 18px;
        font-size: 9px;
    }
}

.game-data-list li.stars #stars img {
    width: 20px;
    height: 20px;
}

/* Header chrome above sidebar slime, teeth overlap and ad iframes */
.header {
    position: relative;
    z-index: 10000;
}

.header-up-teeth {
    position: relative;
    z-index: 9999;
}

.saliva {
    z-index: 2 !important;
}

.top-add,
.game-side-banner {
    position: relative;
    z-index: 1;
}

/* Language selector — dropdown + grid from languages table */
.header .lang-selector {
    position: absolute;
    right: 68px;
    top: 18px;
    z-index: 10001;
    float: none;
    max-width: none;
}

.header .lang-selector.open {
    z-index: 10002;
}

.header .lang-selector-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 8px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: linear-gradient(180deg, #ff6b6b 0%, #e04545 100%);
    box-shadow: 0 4px 0 #b03030, 0 6px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    max-width: 200px;
}

.header .lang-selector-toggle:hover,
.header .lang-selector-toggle:focus {
    color: #fff;
    outline: none;
    filter: brightness(1.05);
}

.header .lang-selector-toggle .fa-chevron-down {
    font-size: 11px;
    opacity: 0.9;
}

.header .lang-selector-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 110px;
}

.header .lang-selector-flag {
    display: block;
    width: 28px;
    height: 21px;
    min-width: 28px;
    min-height: 18px;
    object-fit: cover;
    border-radius: 3px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    flex-shrink: 0;
    background: #fff;
}

.header .lang-selector-panel {
    position: absolute;
    right: 0;
    left: auto;
    z-index: 10003 !important;
    min-width: 280px;
    max-width: min(92vw, 360px);
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px 8px;
    margin-top: 8px;
    border-radius: 12px;
    border: 2px solid #e04545;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    list-style: none;
}

.header .lang-selector.open .lang-selector-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
}

.header .lang-selector-panel > li {
    float: none;
    margin: 0;
}

.header .lang-selector-panel > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header .lang-selector-panel > li > a:hover,
.header .lang-selector-panel > li.active > a {
    background: #fff3f3;
    color: #c00;
}

.header .lang-selector-panel .lang-selector-flag {
    width: 24px;
    height: 18px;
}

.header .lang-selector-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media screen and (max-width: 767px) {
    .header .lang-selector {
        right: 16px;
        top: 72px;
    }

    .header .lang-selector-toggle {
        padding: 5px 10px 5px 6px;
        font-size: 12px;
        max-width: 160px;
    }

    .header .lang-selector-label {
        max-width: 72px;
    }

    .header .lang-selector-panel {
        min-width: 260px;
        grid-template-columns: 1fr;
        right: 0;
        left: auto;
    }
}

@media (min-width: 992px) {
    .header .lang-selector-toggle {
        max-width: 220px;
    }

    .header .lang-selector-label {
        max-width: 130px;
    }
}

/* Footer: CSS grid overrides legacy .footer .footer-inner-links ul { float:left } */
.footer .footer-inner-links.footer-inner-links-grid {
    clear: both;
    width: 100%;
}

.footer .footer-inner-links.footer-inner-links-grid .footer-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.25rem 1.75rem;
    clear: both;
    width: 100%;
}

@media (min-width: 768px) {
    .footer .footer-inner-links.footer-inner-links-grid .footer-link-row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.footer .footer-inner-links.footer-inner-links-grid .footer-link-row-apps {
    margin-top: 0.35rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

@media (min-width: 600px) {
    .footer .footer-inner-links.footer-inner-links-grid .footer-link-row-apps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.footer .footer-inner-links.footer-inner-links-grid .footer-link-column {
    float: none !important;
    width: auto !important;
    min-width: 0;
    margin: 0;
}

.footer .footer-inner-links.footer-inner-links-grid .footer-link-column ul {
    float: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 1.1rem;
    padding: 0;
    list-style: none;
}

.footer .footer-inner-links.footer-inner-links-grid .footer-link-column ul:last-child {
    margin-bottom: 0;
}

.footer .footer-inner-links.footer-inner-links-grid .footer-link-column ul > li {
    max-width: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: unset !important;
}

.footer .footer-inner-links.footer-inner-links-grid .footer-link-column h4 {
    margin: 0 0 0.5rem;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
    word-wrap: break-word;
}

.footer .footer-inner-links.footer-inner-links-grid .footer-link-column li a {
    line-height: 1.45;
    font-size: 13px;
    overflow-wrap: anywhere;
}

/* Core Web Vitals: reserve space for ads, stars, and thumbs (reduce CLS). */
.top-add,
.game-info .top-add {
    min-height: 180px;
}

.game-info .top-add--leaderboard {
    min-height: 90px;
    text-align: center;
}

.game-info .top-add--leaderboard ins.ads-game-leaderboard-970x90 {
    display: inline-block;
    width: 970px;
    height: 90px;
    max-width: 100%;
}

.game-side-banner {
    min-height: 600px;
}

.game-side-banner ins.adsbygoogle,
.top-add ins.adsbygoogle {
    display: inline-block;
    min-height: inherit;
}

.game-banner-ad-bottom.top-add--billboard {
    min-height: 250px;
    text-align: center;
}

.game-banner-ad-bottom ins.ads-game-billboard-970x250 {
    display: inline-block;
    width: 970px;
    height: 250px;
    max-width: 100%;
}

.game-data-list li.stars.stars-raty,
.game-data-list li.stars .stars {
    min-height: 22px;
    display: block;
}

.game-data-list li.stars .game-rating-meta {
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    font-weight: 600;
    line-height: 22px;
    vertical-align: top;
    white-space: nowrap;
}

.footer-decoration {
    min-height: 48px;
}

/* Game page: 160×600 side rails (wide viewports only; hidden on mobile/tablet). */
.game-page-rails {
    position: relative;
}

.game-side-rail {
    display: none;
    position: fixed;
    top: 110px;
    height: 600px;
    z-index: 1;
    pointer-events: auto;
}

.game-side-rail--160 {
    width: 160px;
}

.game-side-rail--120 {
    width: 120px;
}

.game-side-rail--left.game-side-rail--160 {
    left: max(4px, calc((100vw - 1200px) / 2 - 176px));
}

.game-side-rail--right.game-side-rail--120 {
    right: max(4px, calc((100vw - 1200px) / 2 - 136px));
}

@media (min-width: 1480px) {
    .game-side-rail {
        display: block;
    }
}

.game-side-rail ins.ads-side-160x600 {
    display: inline-block;
    width: 160px;
    height: 600px;
}

.game-side-rail ins.ads-side-120x600 {
    display: inline-block;
    width: 120px;
    height: 600px;
}

.game-thumb-main .responsive-cover img,
.game-thumb-main picture img {
    width: 100%;
    height: auto;
}

.square-2 .responsive-cover img,
.square-2 picture img {
    aspect-ratio: 530 / 250;
    object-fit: cover;
}

.square-1 .responsive-cover img,
.square-1 picture img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
}
