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

.game-thumb-main > .new-tag {
    top: 18px;
    bottom: auto;
    left: 24px;
}

.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;
    }
}
