/* ===== MAIN LAYOUT ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 32px;
}

/* ===== SECTION HEADER ===== */
.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text3);
}

.see-all {
    font-size: 13px;
    color: var(--text2);
    transition: color 0.15s;
}

.see-all:hover {
    color: var(--text);
}

/* ===== CATEGORY SCROLL ===== */
.cat-scroll-section {
    margin-bottom: 48px;
}

.cat-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.cat-scroll::-webkit-scrollbar {
    display: none;
}

.cat-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text2);
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s;
    flex-shrink: 0;
}

.cat-pill:hover {
    background: var(--text);
    color: #fff;
    border-color: var(--text);
}

/* ===== FEATURED ROW ===== */
.featured-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 48px;
}

.featured-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: border-color 0.15s;
}

.featured-card:hover {
    border-color: var(--text);
}

.featured-card .img-box {
    aspect-ratio: 16 / 9;
}

.featured-card .img-box::before {
    padding-top: 56.25%;
}

.featured-card img {
    transition: transform 0.3s;
}

.featured-card:hover img {
    transform: scale(1.03);
}

.featured-card-body {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.featured-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.featured-card-cat {
    font-size: 12px;
    color: var(--text3);
    margin-top: 2px;
}

.play-arrow {
    width: 36px;
    height: 36px;
    background: var(--text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    flex-shrink: 0;
    transition: background 0.15s;
}

.featured-card:hover .play-arrow {
    background: var(--accent);
}

/* ===== GAME GRID ===== */
.games-section {
    margin-bottom: 48px;
}

.game-grid-big {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.game-tile {
    background: var(--bg2);
    cursor: pointer;
    text-decoration: none;
    display: block;
    transition: background 0.15s;
    position: relative;
    overflow: hidden;
}

.game-tile:hover {
    background: var(--bg);
}

.game-tile .img-box {
    aspect-ratio: 1;
}

.game-tile .img-box::before {
    padding-top: 100%;
}

.game-tile img {
    transition: transform 0.3s;
}

.game-tile:hover img {
    transform: scale(1.04);
}

.game-tile-info {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--border);
}

.game-tile-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.game-tile-cat {
    font-size: 11px;
    color: var(--text3);
}

/* ===== RESPONSIVE — MAIN ===== */
@media (max-width: 900px) {
    .game-grid-big {
        grid-template-columns: repeat(3, 1fr);
    }

    .featured-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 769px) {
    main {
        max-width: 100%;
        padding: 24px 16px 40px;
    }

    .cat-scroll-section {
        margin-bottom: 32px;
    }

    .cat-pill {
        padding: 7px 14px;
        font-size: 12px;
    }

    .featured-row {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 32px;
    }

    .featured-card-body {
        padding: 12px;
    }

    .featured-card-title {
        font-size: 14px;
    }

    .play-arrow {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    .games-section {
        margin-bottom: 32px;
    }

    .game-grid-big {
        grid-template-columns: repeat(2, 1fr);
    }

    .game-tile-info {
        padding: 8px 10px 10px;
    }

    .game-tile-title {
        font-size: 12px;
    }

    .game-tile-cat {
        font-size: 10px;
    }

    .section-label {
        font-size: 10px;
    }

    .see-all {
        font-size: 12px;
    }
}

/* ===== PAGE HEADER ===== */
.page-header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 32px;
    padding-bottom: 20px;
}

.page-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.page-title {
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 800;
    letter-spacing: -1px;
    color: var(--text);
}

/* ===== NO DATA ===== */
.nodata {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    gap: 16px;
    text-align: center;
}

.nodata-icon {
    font-size: 48px;
}

.nodata-text {
    font-size: 16px;
    color: var(--text2);
}

.nodata-btn {
    padding: 10px 24px;
    background: var(--text);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    transition: opacity 0.15s;
}

.nodata-btn:hover {
    opacity: 0.8;
}

/* ===== CATEGORY GRID ===== */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 48px;
}

.cat-card {
    background: var(--bg2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    text-decoration: none;
    transition: background 0.15s;
    gap: 12px;
}

.cat-card:hover {
    background: var(--bg);
}

.cat-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.cat-card-arrow {
    font-size: 14px;
    color: var(--text3);
    transition: transform 0.15s;
}

.cat-card:hover .cat-card-arrow {
    transform: translateX(3px);
    color: var(--text);
}

/* ===== DETAIL ===== */
.detail-wrap {
    margin-bottom: 48px;
}

.detail-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: start;
}

.detail-banner {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.detail-banner::before {
    padding-top: 56.25%;
}

.detail-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-cat {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text3);
}

.detail-score {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
}

.detail-title {
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--text);
    line-height: 1.15;
}

.detail-desc {
    font-size: 14px;
    color: var(--text2);
    line-height: 1.7;
}

.detail-actions {
    display: flex;
    gap: 10px;
}

.detail-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    background: var(--text);
    color: #fff;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    transition: opacity 0.15s;
}

.detail-play-btn:hover {
    opacity: 0.8;
}

.detail-specs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.detail-specs span {
    font-size: 12px;
    color: var(--text3);
    background: var(--bg);
    border: 1px solid var(--border);
    padding: 4px 10px;
    border-radius: 6px;
}

/* ===== RESPONSIVE — EXTRA ===== */
@media (max-width: 769px) {
    .page-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .cat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-hero {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .detail-play-btn {
        width: 100%;
        justify-content: center;
    }
}
