/* ===== CoolplayLab Design System ===== */

:root {
    --color-brand:        #00B4D8;
    --color-brand-strong: #0077B6;
    --color-brand-dark:   #023E8A;
    --color-surface:      #FFFFFF;
    --color-layer:        #F8FAFC;
    --color-border:       #E2E8F0;
    --color-text:         #1E293B;
    --color-text-soft:    #64748B;
    --color-text-muted:   #94A3B8;
    --color-footer-bg:    #0B1120;
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  16px;
    --radius-xl:  20px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Alimama FangYuanTi", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    background: var(--color-layer);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Container ---------- */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Navigation ---------- */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.nav-logo img {
    height: 34px;
    width: auto;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    padding: 6px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-soft);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-brand-strong);
    background: rgba(0,180,216,0.08);
}

/* ---------- Buttons ---------- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 700;
    color: #FFFFFF;
    background: var(--color-brand);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}

.btn-primary:hover {
    background: var(--color-brand-strong);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-brand-strong);
    background: transparent;
    border: 1.5px solid var(--color-brand);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}

.btn-outline:hover {
    background: rgba(0,180,216,0.06);
}

/* ---------- Section Headings ---------- */
.section-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--color-text);
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--color-text-soft);
    margin-bottom: 40px;
    max-width: 480px;
    text-align: left;
}

.text-center .section-subtitle {
    margin-left: auto;
    margin-right: auto;
}

.section-header {
    margin-bottom: 40px;
}

/* ---------- Hero Section ---------- */
.hero {
    padding: 64px 0 56px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 56px;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-text { flex: 1; }
.hero-visual { flex: 1; }

.hero-text h1 {
    font-size: 48px;
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.15;
    color: var(--color-text);
    margin-bottom: 16px;
}

.hero-text h1 span {
    color: var(--color-brand-strong);
}

.hero-text p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text-soft);
    margin-bottom: 28px;
    max-width: 440px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hero-visual img {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

/* ---------- Stat Badge Row ---------- */
.stat-badge-row {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text-soft);
    background: var(--color-layer);
    border: 1px solid var(--color-border);
    border-radius: 16px;
}

.stat-badge .stat-value {
    color: var(--color-brand-strong);
    font-weight: 700;
}

/* ---------- Featured Section ---------- */
#featured {
    padding: 72px 0;
    background: var(--color-layer);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}

.featured-game-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: border-color 0.25s, transform 0.2s;
    cursor: pointer;
}

.featured-game-card:hover {
    border-color: var(--color-brand);
    transform: translateY(-3px);
}

.featured-game-card .card-icon {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-layer);
}

.featured-game-card .card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-game-card:hover .card-icon img {
    transform: scale(1.06);
}

.featured-game-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
}

.featured-game-card p {
    font-size: 14px;
    color: var(--color-text-soft);
    line-height: 1.5;
    flex: 1;
}

.featured-game-card .play-btn {
    align-self: flex-start;
    font-size: 13px;
    font-weight: 600;
    color: var(--color-brand-strong);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---------- Why Us Section ---------- */
#why-us {
    padding: 72px 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 28px;
}

.feature-card-v2 {
    padding: 28px;
    background: var(--color-layer);
    border-radius: var(--radius-lg);
    transition: background 0.2s;
}

.feature-card-v2:hover {
    background: rgba(0,180,216,0.04);
}

.feature-card-v2 .feature-icon-sq {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--color-brand);
}

.feature-card-v2 h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--color-text);
}

.feature-card-v2 p {
    font-size: 14px;
    color: var(--color-text-soft);
    line-height: 1.6;
}

/* ---------- H5 Preview Section ---------- */
#h5-preview {
    padding: 72px 0;
    background: var(--color-layer);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

/* ---------- H5 Game Card (mini) ---------- */
.h5-game-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color 0.25s, transform 0.2s;
    cursor: pointer;
}

.h5-game-card:hover {
    border-color: var(--color-brand);
    transform: translateY(-2px);
}

.h5-game-card .game-thumb {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: var(--color-layer);
    display: block;
}

.h5-game-card .game-info {
    padding: 10px 12px;
}

.h5-game-card .game-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.h5-game-card .game-cat {
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
}

/* ---------- View All Link ---------- */
.view-all-wrap {
    margin-top: 36px;
    text-align: center;
}

.view-all-wrap a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 700;
    color: var(--color-brand-strong);
    transition: gap 0.2s;
}

.view-all-wrap a:hover { gap: 10px; }

/* ---------- Games Page ---------- */
.page-hero-mini {
    padding: 48px 0 40px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

.page-hero-mini h1 {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.025em;
    color: var(--color-text);
    margin-bottom: 6px;
}

.page-hero-mini p {
    font-size: 15px;
    color: var(--color-text-soft);
}

.h5-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    padding: 40px 0 48px;
}

.h5-games-grid .h5-game-card .game-thumb {
    aspect-ratio: 1 / 1;
}

.h5-games-grid .h5-game-card .game-info {
    padding: 12px 14px;
}

.h5-games-grid .h5-game-card .game-title {
    font-size: 14px;
}

/* ---------- Game Detail Page ---------- */
.game-detail {
    position: relative;
    padding: 48px 0;
    background: var(--color-surface);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: stretch;
}

.game-detail-content h4 {
    font-size: 38px;
    font-weight: 900;
    letter-spacing: -0.025em;
    line-height: 1.12;
    margin-bottom: 4px;
}

.game-detail-content h4::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    border-radius: 2px;
    margin-top: 14px;
    background: var(--color-brand);
}

.game-detail-content .des {
    font-size: 15px;
    color: var(--color-text-soft);
    line-height: 1.72;
    margin: 24px 0 28px;
    max-width: 480px;
}

/* Features list */
.game-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.game-feature-item {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-border);
    background: var(--color-layer);
    transition: border-left-color 0.25s, background 0.25s, box-shadow 0.25s;
}

.game-feature-item:hover {
    background: var(--color-surface);
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.game-feature-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(0,180,216,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s;
}

.game-feature-icon svg {
    stroke: var(--color-brand);
}

.game-feature-item h5 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--color-text);
}

.game-feature-item p {
    font-size: 13px;
    color: var(--color-text-soft);
    line-height: 1.5;
}

/* Highlights row */
.game-highlights {
    display: flex;
    gap: 14px;
}

.highlight-card {
    flex: 1;
    background: var(--color-layer);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 16px 18px;
    text-align: center;
    transition: border-color 0.25s, box-shadow 0.25s;
}

.highlight-num {
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    color: var(--color-brand);
    transition: transform 0.25s;
}

.highlight-label {
    font-size: 12px;
    color: var(--color-text-soft);
    margin-top: 6px;
    letter-spacing: 0.02em;
}

/* Visual panel */
.game-detail-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-xl);
    overflow: hidden;
    min-height: 420px;
}

.game-visual-bg {
    position: absolute;
    inset: 0;
}

.game-visual-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.18;
}

/* Responsive */
@media (max-width: 900px) {
    .game-detail {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .game-detail-visual {
        min-height: 320px;
        order: -1;
    }
}

@media (max-width: 480px) {
    .game-detail-content h4 {
        font-size: 28px;
    }
    .game-highlights {
        flex-direction: column;
    }
}

/* ---------- About Page ---------- */
#about-hero {
    padding: 64px 0 48px;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}

#about-hero h1 {
    font-size: 40px;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

#about-hero p {
    font-size: 17px;
    color: var(--color-text-soft);
    max-width: 560px;
    margin: 0 auto;
}

#about-story,
#about-values,
#about-team {
    padding: 64px 0;
}

#about-story {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
}

#about-values {
    background: var(--color-layer);
}

#about-values .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

#about-values .feature-card-v2 {
    background: var(--color-surface);
}

#about-team {
    background: var(--color-surface);
}

.story-text {
    max-width: 720px;
    margin: 0 auto;
    font-size: 16px;
    line-height: 1.8;
    color: var(--color-text-soft);
}

.story-text p + p {
    margin-top: 16px;
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--color-footer-bg);
    color: #94A3B8;
    padding: 48px 0 32px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-col {
    flex: 1;
    min-width: 160px;
}

.footer-brand h3 {
    font-size: 20px;
    font-weight: 800;
    color: #F1F5F9;
    margin-bottom: 6px;
}

.footer-brand p {
    font-size: 13px;
    color: #64748B;
}

.footer-links {
    display: flex;
    gap: 48px;
}

.footer-col h4 {
    font-size: 13px;
    font-weight: 700;
    color: #CBD5E1;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.footer-col a {
    display: block;
    font-size: 13px;
    color: #64748B;
    margin-bottom: 6px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #CBD5E1;
}

.footer-col p {
    font-size: 13px;
    color: #64748B;
    line-height: 1.6;
    max-width: 260px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col li a {
    display: block;
    font-size: 13px;
    color: #64748B;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-col li a:hover {
    color: #CBD5E1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.copyright {
    font-size: 12px;
    color: #475569;
}

.footer-social {
    display: flex;
    gap: 0;
    align-items: center;
}

.footer-social a {
    font-size: 12px;
    color: #64748B;
    text-decoration: none;
    padding: 0 12px;
    border-right: 1px solid rgba(255,255,255,0.08);
    transition: color 0.2s;
}

.footer-social a:last-child {
    border-right: none;
    padding-right: 0;
}

.footer-social a:hover {
    color: #CBD5E1;
}
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .hero-grid {
        flex-direction: column;
        gap: 32px;
    }

    .hero-text h1 { font-size: 36px; }

    .section-title { font-size: 26px; }

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

    .h5-games-grid,
    .preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        flex-direction: column;
    }

    .footer-col {
        min-width: 100%;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 28px; }
    .hero-text p { font-size: 15px; }
    .featured-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .nav-links a { padding: 6px 10px; font-size: 13px; }
}
