/* 99gamez v0.4.1 UI refresh */
:root {
    --card-radius: 14px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 14px;
}

.card.game-card {
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: transform .12s ease, box-shadow .12s ease;
}

.card.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.card.game-card .image {
    aspect-ratio: 16 / 9;
    background: #0a0a0a;
    display: block;
    overflow: hidden;
}

.card.game-card .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card.game-card .meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge {
    display: inline-block;
    font-size: 11px;
    line-height: 1;
    padding: 4px 6px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #363636;
}

.home-hero {
    border-radius: 18px;
    background: radial-gradient(60% 100% at 20% 0%, #3e8ed0 0%, rgba(62, 142, 208, .2) 60%, transparent 100%),
        radial-gradient(40% 100% at 100% 0%, #ff3860 0%, rgba(255, 56, 96, .15) 60%, transparent 100%);
}

.home-hero .title,
.home-hero .subtitle {
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .25);
}

.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-pills a {
    font-size: 12px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #f0f0f0;
    color: #363636;
}

.category-pills a:hover {
    background: #e6e6e6;
}

.section-slim {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.separator {
    height: 1px;
    background: #efefef;
    margin: 18px 0;
}

@media (min-width: 1280px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    }
}

/* -------------------------------
   Navbar badges (moved from header)
----------------------------------*/
.nav-icon-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    line-height: 18px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 0 0 2px #fff;
}

.nav-badge.dot {
    width: 10px;
    height: 10px;
    min-width: 10px;
    padding: 0;
    line-height: 10px;
}

@media (max-width: 768px) {
    .navbar .buttons .button {
        padding-left: .75rem;
        padding-right: .75rem;
    }

    .navbar-end .navbar-item.is-hidden-mobile {
        display: none !important;
    }
}

/* -------------------------------
   Live Search (autosuggest)
   (moved from header)
----------------------------------*/
.searchbar {
    flex: 1 1 auto;
    max-width: 520px;
}

.search-wrap {
    position: relative;
}

.search-input {
    padding-left: 2rem;
}

.search-ico {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
}

/* Suggest box */
.search-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
    padding: 6px;
    display: none;
    z-index: 50;
    max-height: 70vh;
    overflow: auto;
}

.search-suggest.open {
    display: block;
}

/* Items */
.sug-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
}

.sug-item:hover,
.sug-item.is-active {
    background: #f8fafc;
}

.sug-thumb {
    width: 56px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
}

.sug-meta {
    min-width: 0;
}

.sug-title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sug-sub {
    font-size: 11px;
    color: #6b7280;
}

.sug-type {
    font-size: 10px;
    color: #6b7280;
    margin-left: auto;
}

/* Highlight */
.search-highlight {
    background: #fff3bf;
    padding: 0 2px;
    border-radius: 3px;
}

/* Mobile tweaks */
@media (max-width:480px) {
    .searchbar {
        max-width: none;
        width: 100%;
    }

    .sug-thumb {
        width: 48px;
        height: 34px;
    }
}