:root {
    --color-primary: #EA580C;
    --color-primary-dark: #C2410C;
    --color-primary-light: #FFEDD5;
    --color-accent: #DC2626;
    --color-accent-dark: #B91C1C;
    --color-bg: #FFF7ED;
    --color-surface: #FFFFFF;
    --color-surface-alt: #FFFBF5;
    --color-text: #7C2D12;
    --color-text-muted: #9A3412;
    --color-border: #FED7AA;
    --shadow-sm: 0 2px 8px rgba(234, 88, 12, 0.1);
    --shadow-md: 0 2px 12px rgba(234, 88, 12, 0.12);
    --shadow-card: 0 4px 16px rgba(234, 88, 12, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(234, 88, 12, 0.2);
    --header-gradient: linear-gradient(135deg, #EA580C 0%, #DC2626 100%);
}

body {
    background-color: var(--color-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--color-text);
}

.site-header {
    background: var(--header-gradient);
    box-shadow: var(--shadow-sm);
    padding: 16px 0;
    margin-bottom: 24px;
}

.site-header .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.site-header .site-title:hover {
    color: rgba(255, 255, 255, 0.85);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 32px;
    color: var(--color-text);
}

.main {
    margin-bottom: 48px;
}

.box {
    background: var(--color-surface);
    border-radius: 16px;
    padding: 48px 32px 56px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
}

.item {
    display: flex;
    flex-direction: column;
    background: var(--color-surface-alt);
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

a:hover .item {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-primary-light);
}

.item img,
.item .game-thumb {
    display: block;
    width: 100%;
    max-width: 100%;
    aspect-ratio: 1;
    border-radius: 10px;
    object-fit: cover;
}

.item .logo {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
    text-align: center;
    word-break: break-word;
    line-height: 1.3;
}

.item .logo img {
    margin-bottom: 10px;
}

.item .game-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text);
    text-align: center;
    margin-top: 10px;
    word-break: break-word;
    line-height: 1.3;
}

.item .desc {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-top: 8px;
    text-align: center;
}

#game-list a,
.more-games a {
    display: block;
    height: 100%;
    min-width: 0;
}

#game-list > [class*="col-"],
.more-games > [class*="col-"] {
    min-width: 0;
}

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

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

.game-detail .game-icon {
    width: 280px;
    height: 280px;
    border-radius: 24px;
    object-fit: cover;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    border: 3px solid var(--color-primary-light);
}

.game-detail .game-name {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.game-detail .game-desc {
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

.btn-start-game {
    padding: 12px 48px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--color-accent) 0%, #F97316 100%);
    border: none;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-start-game:hover,
.btn-start-game:focus {
    background: linear-gradient(135deg, var(--color-accent-dark) 0%, #EA580C 100%);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.45);
    transform: translateY(-1px);
}

.game-frame-wrap {
    display: none;
    position: relative;
    margin-top: 32px;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--color-border);
}

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

.game-frame-wrap .btn-fullscreen {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: rgba(234, 88, 12, 0.75);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.game-frame-wrap .btn-fullscreen:hover {
    background: rgba(234, 88, 12, 0.95);
}

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

.game-frame-wrap:fullscreen,
.game-frame-wrap:-webkit-full-screen,
.game-frame-wrap.is-fullscreen {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 0;
    background: #000;
}

.game-frame-wrap:fullscreen iframe,
.game-frame-wrap:-webkit-full-screen iframe,
.game-frame-wrap.is-fullscreen iframe {
    width: 100%;
    height: 100%;
}

.more-games {
    margin-top: 64px;
    padding: 48px 0 56px;
    border-top: 2px solid var(--color-border);
}

.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;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    text-decoration: none;
    margin-bottom: 20px;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.back-link:hover {
    color: var(--color-primary);
}

.ad-banner {
    display: none;
    margin: 28px auto 40px;
    box-sizing: border-box;
}
.ad-banner.is-visible {
    display: flex !important;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
}
.ad-banner__frame {
    width: 300px;
    max-width: 300px;
    margin: 0 auto;
    overflow: hidden;
    flex-shrink: 0;
    line-height: 0;
}
.ad-banner .ad-slot {
    width: 300px !important;
    max-width: 300px !important;
    min-width: 300px;
    margin: 0 auto !important;
    overflow: hidden !important;
    text-align: center;
    line-height: 0;
}
.ad-banner .ad-slot > div,
.ad-banner .ad-slot iframe {
    max-width: 300px !important;
}
.ad-banner .ad-slot iframe {
    width: 300px !important;
}
@media (max-width: 768px) {
    .box {
        padding: 32px 16px 40px;
    }

    .item {
        padding: 6px;
    }

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

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

    .item .game-name {
        margin-top: 8px;
    }

    .item .logo img {
        margin-bottom: 8px;
    }

    .game-detail .game-icon {
        width: 220px;
        height: 220px;
    }

    .game-frame-wrap iframe {
        height: 400px;
    }
    .ad-banner > div {
        max-width: 300px;
        width: 100%;
    }
}
