body {
    background-color: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.site-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 16px 0;
    margin-bottom: 24px;
}

.site-header .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    text-decoration: none;
}

.site-header .site-title:hover {
    color: #0d6efd;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 32px;
    color: #333;
}

.main {
    margin-bottom: 48px;
}

.box {
    background: #fff;
    border-radius: 12px;
    padding: 48px 32px 56px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.item {
    /* background: #fafafa; */
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}

a:hover .item {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.item .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.85rem;
    color: #333;
    margin-bottom: 0;
    word-break: break-word;
    text-align: center;
    line-height: 1.3;
}

.item .logo img {
    width: 72px;
    height: 72px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.item .desc {
    display: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Detail page */
.game-detail {
    text-align: center;
    padding-bottom: 16px;
}

.game-detail .game-icon {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    margin-bottom: 16px;
}

.game-detail .game-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.game-detail .game-desc {
    color: #666;
    margin-bottom: 24px;
}

.btn-start-game {
    padding: 12px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
}

.game-frame-wrap {
    display: none;
    margin-top: 32px;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #000;
}

.game-frame-wrap.active {
    display: block;
}

.game-frame-toolbar {
    display: flex;
    justify-content: flex-end;
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

.game-frame-wrap iframe {
    width: 100%;
    height: 600px;
    border: none;
    display: block;
    background: #000;
}

.game-frame-wrap:fullscreen,
.game-frame-wrap:-webkit-full-screen,
.game-frame-wrap:-moz-full-screen {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.game-frame-wrap:fullscreen .game-frame-toolbar,
.game-frame-wrap:-webkit-full-screen .game-frame-toolbar,
.game-frame-wrap:-moz-full-screen .game-frame-toolbar {
    flex-shrink: 0;
}

.game-frame-wrap:fullscreen iframe,
.game-frame-wrap:-webkit-full-screen iframe,
.game-frame-wrap:-moz-full-screen iframe {
    flex: 1;
    height: auto;
    min-height: 0;
}

.more-games {
    margin-top: 64px;
    padding: 48px 0 56px;
    border-top: 2px solid #eee;
}

.more-games .section-title {
    margin-top: 0;
    margin-bottom: 32px;
}

.more-games .item {
    margin-bottom: 0;
}

.main .box .row.g-4 .item {
    margin-bottom: 0;
}

/* Homepage pyramid layout: 1-2-3-4-4-3-2-1 */
.game-list-pyramid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.game-list-pyramid .game-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.game-list-pyramid .game-cell {
    flex: 0 0 auto;
    width: 200px;
}

.game-list-pyramid .game-cell .item {
    margin-bottom: 0;
    padding: 8px;
}

.game-list-pyramid .item .logo {
    gap: 14px;
    font-size: 1rem;
}

.game-list-pyramid .item .logo img {
    width: 140px;
    height: 140px;
    border-radius: 18px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.back-link:hover {
    color: #0d6efd;
}

@media (max-width: 768px) {
    .box {
        padding: 32px 16px 40px;
    }

    .item {
        padding: 10px 8px;
    }

    .game-detail .game-desc {
        display: none;
    }

    .item .logo {
        font-size: 0.8rem;
    }

    .item .logo img {
        width: 64px;
        height: 64px;
    }

    .game-frame-wrap iframe {
        height: 400px;
    }

    .game-list-pyramid {
        gap: 14px;
    }

    .game-list-pyramid .game-row {
        gap: 12px;
    }

    .game-list-pyramid .game-cell {
        width: 130px;
    }

    .game-list-pyramid .item .logo img {
        width: 96px;
        height: 96px;
    }
}
