/* ===== GAMES PAGE ===== */

/* Top Bar */
.games-topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0 8px;
    margin-top: 80px;
}

.games-back {
    color: white;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    transition: opacity 0.2s;
    white-space: nowrap;
}

.games-back:hover {
    opacity: 1;
}

.games-topbar h1 {
    font-size: 20px;
    font-weight: 700;
    background: var(--gradient-2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.games-topbar h1 span {
    font-size: 13px;
    font-weight: 400;
    opacity: 0.6;
    -webkit-text-fill-color: rgba(255,255,255,0.6);
}

/* Product Section */
.product-section {
    margin-bottom: 16px;
}

.product-hint {
    font-size: 12px;
    opacity: 0.5;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-scroll {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.product-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.product-pill:hover {
    background: rgba(255, 255, 255, 0.1);
}

.product-pill.active {
    border-color: var(--accent-color);
    background: rgba(250, 193, 35, 0.08);
    box-shadow: 0 0 12px rgba(250, 193, 35, 0.15);
}

.product-pill img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 6px;
}

.product-pill-name {
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    max-width: 70px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-pill-count {
    font-size: 9px;
    opacity: 0.4;
    margin-top: 2px;
}

/* Active Product Header */
.games-active-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    margin-bottom: 12px;
}

.games-active-header img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.games-active-header h2 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 0;
    background: none;
    -webkit-text-fill-color: white;
}

.games-active-header span {
    font-size: 12px;
    opacity: 0.5;
}

/* Game Type Tabs */
.game-type-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.game-type-tabs .category {
    padding: 6px 16px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Search */
.games-search {
    position: relative;
    margin-bottom: 14px;
}

.games-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.4;
    font-size: 14px;
}

.games-search input {
    width: 100%;
    padding: 10px 14px 10px 38px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: white;
    font-family: 'Kanit', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.games-search input:focus {
    border-color: var(--accent-color);
}

.games-search input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Games Grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Game Card */
.game-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s;
}

.game-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.game-card-img {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

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

.game-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
}

.game-badge-hot {
    background: rgba(239, 68, 68, 0.9);
    color: white;
    animation: pulse 2s infinite;
}

.game-badge-warm {
    background: rgba(245, 158, 11, 0.9);
    color: white;
}

.game-card-body {
    padding: 8px;
}

.game-card-body h4 {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.game-card-rate {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.game-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.game-bar-fill {
    height: 100%;
    border-radius: 2px;
}

.bar-hot {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.bar-warm {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.bar-normal {
    background: rgba(255, 255, 255, 0.25);
}

.game-card-rate span {
    font-size: 10px;
    font-weight: 700;
    color: var(--accent-color);
    min-width: 26px;
    text-align: right;
}

.game-card-players {
    font-size: 9px;
    opacity: 0.4;
}

/* Game Card Stats */
.game-card-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 4px;
}

.gc-stat {
    font-size: 9px;
    opacity: 0.6;
    line-height: 1.5;
}

.gc-stat i {
    width: 11px;
    font-size: 8px;
    color: var(--accent-color);
    opacity: 1;
}

.gc-stat b {
    color: var(--accent-color);
    opacity: 1;
    font-weight: 600;
}

.gc-time {
    font-size: 8px;
    opacity: 0.4;
    font-weight: 400;
}

.gc-free-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

.gc-free-bar {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.gc-free-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    transition: width 1s ease;
}

/* NEW badge */
.game-badge-new {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;
    animation: pulse 2s infinite;
}

.game-play-btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: 6px;
    padding: 5px 0;
    background: var(--gradient-2);
    color: #333;
    font-family: 'Kanit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.game-play-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 2px 10px rgba(250, 193, 35, 0.3);
}

/* Load More */
.load-more-wrap {
    text-align: center;
    margin: 20px 0;
}

.load-more-wrap .btn {
    font-size: 13px;
    padding: 10px 30px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .games-topbar {
        margin-top: 70px;
    }

    .product-scroll {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }

    .product-pill {
        padding: 8px 4px;
    }

    .product-pill img {
        width: 34px;
        height: 34px;
    }

    .product-pill-name {
        font-size: 9px;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .product-scroll {
        grid-template-columns: repeat(5, 1fr);
    }

    .games-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

@media (min-width: 769px) {
    .games-topbar {
        margin-top: 90px;
    }

    .games-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 12px;
    }

    .game-card-body h4 {
        font-size: 13px;
    }

    .product-scroll {
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
    }

    .product-pill img {
        width: 50px;
        height: 50px;
    }
}

@media (min-width: 1024px) {
    .product-scroll {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
