:root {
    --g7-primary: #00b489;
    --g7-primary-dark: #009670;
    --g7-accent: #ff6b35;
    --g7-bg: #f0f4f8;
    --g7-card: #ffffff;
    --g7-text: #1a1a2e;
    --g7-text-muted: #64748b;
    --g7-radius: 12px;
    --g7-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
    --g7-shadow-hover: 0 8px 28px rgba(15, 23, 42, 0.14);
}

body.index {
    background: var(--g7-bg);
    color: var(--g7-text);
}

.c.header.site-header {
    background: linear-gradient(135deg, var(--g7-primary) 0%, #008f72 50%, #007a8a 100%) !important;
    height: auto !important;
    min-height: 56px;
    padding: 0 !important;
    box-shadow: 0 4px 20px rgba(0, 180, 137, 0.35);
    position: sticky;
    top: 0;
    z-index: 2000;
    color: #fff;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    overflow: hidden;
}

.site-header .header-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 10px 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.site-header .brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.site-header .brand-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.site-header .brand-title {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.site-header .header-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    min-width: 0;
    overflow: visible;
}

.site-header .header-nav a {
    flex-shrink: 0;
    padding: 8px 4px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: background 0.2s, transform 0.15s;
    white-space: nowrap;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

.site-header .header-nav a:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.i.trending {
    margin-top: 20px;
    padding-bottom: 8px;
}

.i.trending .title {
    max-width: 1140px;
    margin: 0 auto 12px;
    padding: 0 16px;
    justify-content: space-between;
}

.i.trending .title .text span {
    font-size: 18px;
    font-weight: 700;
    color: var(--g7-text);
    position: relative;
    padding-left: 12px;
}

.i.trending .title .text span::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: var(--g7-primary);
    border-radius: 2px;
}

.i.trending .title .view-all {
    background: rgba(0, 180, 137, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
    transition: background 0.2s;
}

.i.trending .title .view-all:hover {
    background: rgba(0, 180, 137, 0.2);
}

.i.trending .title .view-all .content {
    color: var(--g7-primary-dark) !important;
    font-weight: 600;
}

.i.trending .title .view-all i {
    color: var(--g7-primary-dark) !important;
}

.i.trending .trending-list {
    gap: 12px;
    padding: 4px 16px 8px;
    scroll-snap-type: x mandatory;
}

.i.trending .trending-list .trending-items.game-card {
    width: 120px;
    height: auto;
    border-radius: var(--g7-radius);
    background: var(--g7-card);
    box-shadow: var(--g7-shadow);
    overflow: visible;
    scroll-snap-align: start;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.i.trending .trending-list .trending-items.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--g7-shadow-hover);
}

.i.trending .trending-list .trending-items.game-card .game-thumb {
    width: 120px;
    height: 120px;
    border-radius: var(--g7-radius) var(--g7-radius) 0 0;
    overflow: hidden;
    position: relative;
    background: #e2e8f0;
}

.i.trending .trending-list .trending-items.game-card .game-thumb .img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.i.trending .trending-list .trending-items.game-card:hover .game-thumb .img {
    transform: scale(1.06);
}

.i.trending .trending-list .trending-items.game-card .game-title {
    display: block;
    padding: 8px 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--g7-text);
    line-height: 1.3;
    text-align: center;
    max-width: 120px;
}

.i.grid {
    max-width: 1140px;
    margin: 24px auto 0;
    width: calc(100% - 32px) !important;
    background: var(--g7-card);
    border-radius: 16px;
    box-shadow: var(--g7-shadow);
    padding: 16px 0 20px;
}

.i.grid .grid-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--g7-text) !important;
    padding: 0 16px 12px !important;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 12px;
}

.i.grid .container {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px !important;
    padding: 0 12px !important;
    justify-content: unset !important;
}

.i.grid .container .item {
    border: none !important;
    border-radius: var(--g7-radius) !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.i.grid .container .item:hover {
    transform: translateY(-3px);
    box-shadow: var(--g7-shadow-hover) !important;
    border: none !important;
}

.i.grid .rect {
    background: linear-gradient(145deg, #f8fafc, #eef2f7) !important;
    border-radius: var(--g7-radius) !important;
    padding: 16px 10px !important;
    box-shadow: none !important;
    border: 1px solid #e2e8f0;
    transition: border-color 0.2s;
}

.i.grid .container .item:hover .rect {
    border-color: var(--g7-primary);
    background: linear-gradient(145deg, #ecfdf5, #d1fae5) !important;
}

.i.grid .rect .icon {
    width: 36px !important;
    height: 36px;
    margin-bottom: 4px;
}

.i.grid .rect .icon img {
    width: 100%;
    height: auto;
}

.i.grid .container .item .title {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--g7-text) !important;
}

.cf.footer {
    margin-top: 32px;
    background: var(--g7-text);
    color: rgba(255, 255, 255, 0.85);
}

.cf.footer .top .description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

.cf.footer .bottom .title {
    color: rgba(255, 255, 255, 0.5);
}

.cf.footer .bottom .legal .policy-title,
.cf.footer .bottom .legal .terms-services-title,
.cf.footer .bottom .legal .contact-us-title {
    color: rgba(255, 255, 255, 0.8);
}

.cf.footer .bottom .legal .policy i,
.cf.footer .bottom .legal .terms-services i,
.cf.footer .bottom .legal .contact-us i {
    color: var(--g7-primary);
}

.cf.footer .bottom .legal .contact-us {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cf.footer .bottom .legal .contact-us a {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cf.footer .bottom .legal .contact-us-title {
    font-size: 14px;
    font-weight: 400;
    letter-spacing: .05em;
    line-height: 20px;
    text-transform: capitalize;
}

.cf.footer .bottom .legal .contact-us i {
    font-size: 10px;
    font-style: normal;
    font-weight: 900;
    line-height: 16px;
}

@media screen and (min-width: 1280px) {
    .cf.footer .bottom .contact-us {
        margin-bottom: 0 !important;
    }
}

.ccbt .back-to-top {
    background: var(--g7-primary) !important;
    box-shadow: 0 4px 16px rgba(0, 180, 137, 0.4);
}

@media screen and (min-width: 768px) {
    .site-header .header-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px 24px;
    }

    .site-header .brand-link {
        justify-content: flex-start;
    }

    .site-header .header-nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
        width: auto;
        flex: 1;
        min-width: 0;
    }

    .site-header .header-nav a {
        padding: 6px 14px;
        font-size: 13px;
        overflow: visible;
        text-overflow: unset;
    }

    .i.trending .trending-list .trending-items.game-card {
        width: 140px;
    }

    .i.trending .trending-list .trending-items.game-card .game-thumb {
        width: 140px;
        height: 140px;
    }

    .i.trending .trending-list .trending-items.game-card .game-title {
        max-width: 140px;
        font-size: 13px;
    }

    .i.grid .container {
        grid-template-columns: repeat(6, 1fr);
    }
}

.s.story .container {
    height: auto !important;
}

.s.story .container .story-middle {
    width: min(280px, 72vw) !important;
    max-width: 280px;
    height: auto !important;
    margin: 16px auto 56px;
}

.s.story .container .story-middle .story-list .story-item.story-item-logo,
.s.story .container .story-middle .story-list .story-item-logo.swiper-slide {
    width: 100% !important;
    height: auto !important;
    margin-right: 0 !important;
}

.s.story .story-item img.game-logo,
.s.story .story-item img.lazy {
    width: 100%;
    max-width: 280px;
    max-height: 280px;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    margin: 0 auto;
    box-shadow: var(--g7-shadow);
}

body.legal {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.legal .site-header .header-inner {
    flex-direction: row;
    justify-content: center;
    padding: 12px 16px;
}

body.legal .i.trending {
    flex: 1 0 auto;
    margin-top: 0;
    min-height: auto !important;
    padding: 16px 16px 0;
    padding-bottom: 0 !important;
}

body.legal .cf.footer {
    flex-shrink: 0;
    margin-top: auto;
    padding: 28px 16px 32px !important;
}

.legal-page {
    max-width: 900px;
    margin: 0 auto;
    background: var(--g7-card);
    border-radius: 16px;
    padding: 24px 20px;
    box-shadow: var(--g7-shadow);
    box-sizing: border-box;
}

.legal-page h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--g7-text);
    margin-bottom: 16px;
}

.legal-page p {
    font-size: 14px;
    line-height: 1.7;
    color: var(--g7-text-muted);
    margin-bottom: 12px;
    text-align: justify;
}

.legal-page a {
    color: var(--g7-primary);
    word-break: break-word;
}

.legal-page table td,
.legal-page table th {
    border: 1px solid #bababa;
    padding: 10px;
}

.contact-page .contact-intro {
    font-size: 16px;
    color: var(--g7-text);
    margin-bottom: 20px;
}

.contact-page .contact-email-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 16px 18px;
    background: linear-gradient(145deg, #ecfdf5, #f0f4f8);
    border: 1px solid #d1fae5;
    border-radius: 12px;
    margin-bottom: 16px;
}

.contact-page .contact-label {
    font-weight: 600;
    color: var(--g7-text);
}

.contact-page .contact-email-row a {
    font-size: 16px;
    font-weight: 600;
    word-break: break-all;
}

@media screen and (min-width: 1280px) {
    .c.header.site-header {
        max-width: 100% !important;
    }

    .i.trending .trending-list {
        flex-wrap: wrap;
        overflow-x: visible;
        max-width: 1140px;
        margin: 0 auto;
        padding: 4px 0 8px;
    }

    .i.trending .title {
        padding: 0;
    }
}

body.category .i.trending {
    margin-top: 0;
    min-height: auto !important;
    padding: 0;
}

.ca.category {
    max-width: 1140px;
    margin: 0 auto;
    padding: 16px 16px 24px;
    box-sizing: border-box;
}

.ca.category .category-page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--g7-text);
    margin: 0 0 16px;
    padding-left: 12px;
    border-left: 4px solid var(--g7-primary);
    line-height: 1.3;
}

.ca.category .category-ad {
    text-align: center;
    margin-bottom: 16px;
}

.ca.category .container.category-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-height: auto !important;
    width: 100% !important;
    max-width: 100%;
    padding: 0 !important;
    margin: 0;
}

.ca.category .container .item.game-card {
    background: var(--g7-card);
    border-radius: var(--g7-radius);
    box-shadow: var(--g7-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

.ca.category .container .item.game-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--g7-shadow-hover);
}

.ca.category .container .item.game-card .game-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #e2e8f0;
}

.ca.category .container .item.game-card .game-thumb .img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.ca.category .container .item.game-card .game-title {
    display: block;
    padding: 8px 10px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--g7-text);
    text-align: center;
    line-height: 1.3;
}

@media screen and (min-width: 768px) {
    .ca.category .container.category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }

    .ca.category .container .item.game-card .game-title {
        font-size: 13px;
    }
}

@media screen and (min-width: 1280px) {
    .ca.category .category-page-title {
        text-align: center;
        border-left: none;
        padding-left: 0;
    }

    .ca.category .container.category-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}
