
/* =========================================================
   ETMAIGAMES.COM - MODERN HOMEPAGE STYLES (index.css)
   Fully responsive for Mobile, Tablet, and Desktop
   ========================================================= */

/* --- Layout Grid Defaults --- */
.item-1 {
    grid-area: 1 / 1 / 3 / 3 !important;
}

.item-2 {
    grid-area: 6 / 1 / 8 / 3;
}

.ad-1 {
    grid-row: 4;
    grid-column: 1 / -1;
    width: 100%;
}

.ads-tips {
    color: #8e9aaf;
    font-size: 12px;
}

.ads-container {
    width: 100%;
    max-width: 100%;
    min-height: 380px;
    margin: 0 auto;
    padding: 0;
    position: relative;
}

.tops-ads.ads {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.ads-label {
    text-align: center;
}

/* --- Auto-Sliding Category Slider Bar (Only Categories) --- */
.category-slider-wrapper {
    width: 100%;
    background: linear-gradient(180deg, #150f2e 0%, #0a0817 100%);
    border-bottom: 1px solid rgba(168, 85, 247, 0.2);
    padding: 12px 0;
    margin: 0;
    position: relative;
    overflow: hidden;
    display: block;
    box-sizing: border-box;
}

/* Gradient fade on left & right edges for seamless aesthetic */
.category-slider-wrapper::before,
.category-slider-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px;
    z-index: 5;
    pointer-events: none;
}

.category-slider-wrapper::before {
    left: 0;
    background: linear-gradient(90deg, #0a0817 0%, transparent 100%);
}

.category-slider-wrapper::after {
    right: 0;
    background: linear-gradient(270deg, #0a0817 0%, transparent 100%);
}

.category-slider-track {
    display: flex;
    flex-wrap: nowrap;
    width: -webkit-max-content;
    width: -moz-max-content;
    width: max-content;
    -webkit-animation: categoryContinuousScroll 60s linear infinite !important;
    animation: categoryContinuousScroll 60s linear infinite !important;
    will-change: transform;
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

.category-slider-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 12px;
    flex-shrink: 0;
}

@-webkit-keyframes categoryContinuousScroll {
    0% {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    100% {
        -webkit-transform: translate3d(-50%, 0, 0);
        transform: translate3d(-50%, 0, 0);
    }
}

@keyframes categoryContinuousScroll {
    0% {
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    100% {
        -webkit-transform: translate3d(-50%, 0, 0);
        transform: translate3d(-50%, 0, 0);
    }
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    background: rgba(168, 85, 247, 0.08);
    border: 1px solid rgba(168, 85, 247, 0.22);
    color: #e9d5ff;
    padding: 8px 18px;
    border-radius: 22px;
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.tag-pill:hover,
.tag-pill.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(217, 70, 239, 0.35));
    border-color: #c084fc;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(168, 85, 247, 0.45);
    transform: translateY(-2px);
}

/* --- Section Heading --- */
/* --- Section Heading --- */
.section-header {
    width: 100%;
    box-sizing: border-box;
    margin: 16px 0 20px 0;
    padding: 14px 20px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(168, 85, 247, 0.12) 0%, rgba(217, 70, 239, 0.04) 100%);
    border: 1px solid rgba(168, 85, 247, 0.25);
    border-left: 4px solid #d946ef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.section-heading {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-size: clamp(18px, 3vw, 24px);
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #f3e8ff 40%, #f0abfc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.5px;
    filter: drop-shadow(0 2px 10px rgba(168, 85, 247, 0.4));
}

.section-sub {
    font-size: 13px;
    color: #e9d5ff;
    font-weight: 600;
    background: rgba(168, 85, 247, 0.15);
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

/* --- Main Layout Container (Full Width on Desktop) --- */
.game-home-layout {
    width: 100%;
    max-width: 100% !important;
    padding: 12px 24px 30px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* --- Responsive Game Grid --- */
.game-list-2 {
    display: grid;
    grid-gap: 16px;
    padding: 4px 0;
    width: 100%;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

@media (min-width: 480px) {
    .game-list-2 {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        grid-gap: 16px;
    }
}

@media (min-width: 768px) {
    .game-list-2 {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        grid-gap: 18px;
    }
}

@media (min-width: 1200px) {
    .game-home-layout {
        padding: 12px 30px 40px !important;
    }
    .game-list-2 {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        grid-gap: 20px;
    }
}

@media (min-width: 1600px) {
    .game-home-layout {
        padding: 14px 40px 50px !important;
    }
    .game-list-2 {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        grid-gap: 24px;
    }
}

@media (max-width: 380px) {
    .game-list-2 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-gap: 10px;
    }
}

/* --- Game Item Card Styling --- */
.game-item {
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    transition: all 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: linear-gradient(180deg, rgba(34, 21, 62, 0.8) 0%, rgba(16, 11, 33, 0.95) 100%);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid rgba(168, 85, 247, 0.22);
    backdrop-filter: blur(8px);
}

.game-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 18px 36px rgba(10, 5, 22, 0.8), 0 0 25px rgba(168, 85, 247, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border-color: rgba(217, 70, 239, 0.8);
    background: linear-gradient(180deg, rgba(46, 28, 84, 0.9) 0%, rgba(22, 14, 46, 0.98) 100%);
}

.game-item:active {
    transform: translateY(-3px) scale(0.99);
}

.game-item .game-icon {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 17px 17px 0 0;
    width: 100%;
    background: #110b24;
}

.game-item .game-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.game-item:hover .game-icon img {
    transform: scale(1.1);
}

/* Play button overlay on hover */
.game-item .game-icon::after {
    content: "▶";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.6);
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f43f5e 100%);
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 0 25px rgba(217, 70, 239, 0.8), inset 0 2px 4px rgba(255, 255, 255, 0.5);
    z-index: 2;
    padding-left: 3px;
    pointer-events: none;
}

.game-item:hover .game-icon::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.game-item .game-icon::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 6, 24, 0.2) 0%, rgba(10, 6, 24, 0.6) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

.game-item:hover .game-icon::before {
    opacity: 1;
}

.game-item .game-title,
.text-ellipsis-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    -webkit-box-pack: center;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
    overflow-wrap: break-word;
}

.game-item .game-title {
    color: #f8fafc;
    padding: 0 8px;
    font-size: 12.5px;
    line-height: 1.3;
    text-align: center;
    font-weight: 600;
    margin: 0;
    height: 38px;
    max-height: 38px;
    box-sizing: border-box;
    transition: all 0.25s ease;
}

@media (min-width: 600px) {
    .game-item .game-title {
        font-size: 13.5px;
        line-height: 1.3;
        height: 40px;
        max-height: 40px;
        padding: 0 10px;
    }
}

.game-item:hover .game-title {
    color: #f0abfc;
    text-shadow: 0 0 12px rgba(217, 70, 239, 0.6);
}

/* TOP badges for first 5 games */
.game-list-2 .game-item:nth-child(-n+5) {
    border: 1px solid rgba(217, 70, 239, 0.55);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(168, 85, 247, 0.35);
    background: linear-gradient(180deg, rgba(42, 24, 78, 0.85) 0%, rgba(18, 12, 38, 0.95) 100%);
}

.game-list-2 .game-item:nth-child(-n+5)::before {
    content: "👑 TOP";
    position: absolute;
    top: 10px;
    left: -22px;
    background: linear-gradient(90deg, #ec4899, #a855f7);
    color: #fff;
    font-size: 9.5px;
    font-weight: 800;
    padding: 3px 25px;
    text-align: center;
    transform: rotate(-45deg);
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.8px;
}

/* --- Responsive Media Grid Area (Large Displays) --- */
@media (min-width: 640px) {
    .item-1 {
        grid-area: 1 / 1 / 3 / 3 !important;
    }
    .item-2 {
        grid-area: 3 / 3 / 5 / 5;
    }
}

@media (min-width: 768px) {
    .item-1 {
        grid-area: 1 / 1 / 3 / 3 !important;
    }
    .item-2 {
        grid-area: 3 / 4 / 5 / 6;
    }
}

@media (min-width: 1280px) {
    .item-1 {
        grid-area: 1 / 1 / 3 / 3 !important;
    }
    .item-2 {
        grid-area: 2 / 5 / 4 / 7;
    }
}

/* ============================================================
   COMPLETE CSS RESET & ISOLATION FOR ADVERTISEMENT CONTAINERS
   Ensures:
   - No parent CSS affects the ad box (all: unset / isolated)
   - Zero fixed width or height, zero clipping (overflow: visible)
   - Ads never get cut off on mobile or desktop
   - No background colors, borders, shadows, or filters
   ============================================================ */
.ads-container,
.tops-ads,
.ads,
.banner-ad {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    filter: none !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    margin: 8px auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 380px !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    box-sizing: border-box !important;
    transform: none !important;
    contain: none !important;
    clip-path: none !important;
}

[id^="div-gpt-ad"] {
    display: block !important;
    margin: 0 auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    text-align: center !important;
}

/* Google Publisher Tag rendered divs & iframes */
[id^="div-gpt-ad"] > div {
    display: inline-block !important;
    margin: 0 auto !important;
    overflow: visible !important;
}

[id^="div-gpt-ad"] iframe {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    margin: 0 auto !important;
    vertical-align: middle !important;
    display: block !important;
}

/* Subtle Advertisement text disclaimer without any boxes */
.ads-label {
    text-align: center !important;
    margin: 2px 0 0 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
}

.ads-label span {
    font-size: 10px !important;
    color: rgba(255, 255, 255, 0.4) !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    background: transparent !important;
}

/* ============================================================
   MOBILE VIEW SPACING OPTIMIZATION & HEADER REMOVAL
   - Completely removes the top header on mobile screens (< 768px)
   - Eliminates unnecessary top & bottom whitespace
   ============================================================ */
@media screen and (max-width: 767px) {
    header.header,
    .header {
        display: block !important;
        box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.7);
    }

    .header-con {
        height: 52px !important;
        padding: 0 12px !important;
    }

    .logo img {
        height: 36px !important;
    }

    body {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .category-slider-wrapper {
        padding: 8px 0 !important;
        margin: 0 !important;
        border-top: none !important;
    }

    .ads-container,
    .tops-ads,
    .ads {
        margin: 4px auto !important;
        padding: 0 !important;
    }

    .game-home-layout {
        padding: 6px 10px 20px !important;
        margin: 0 auto !important;
    }

    .section-header {
        display: none !important;
    }

    .game-list-2 {
        grid-gap: 10px !important;
        padding: 0 !important;
    }
}


