:root {
    --color-white: #ffffff;
    --color-black: #1A1A1A; /* 黑色 */
    --color-brand-green: #2e8b57; /* 品牌绿 */
    --color-light-beige: #fdfceb; /* 浅米色 */
    --color-gray-text: #555;
    --color-border: #e0e0e0;
    --font-primary: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    font-family: var(--font-primary);
    margin: 0;
    padding: 0;
    background-color: var(--color-white);
    color: var(--color-gray-text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-black);
    margin-top: 0;
    margin-bottom: 15px;
}

p {
    margin-bottom: 10px;
}

a {
    color: var(--color-brand-green);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */
.header {
    background-color: var(--color-white);
    padding: 15px 0;
    border-bottom: 1px solid var(--color-border);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 40px;
}

.nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.nav li {
    margin-left: 30px;
}

.nav a {
    color: var(--color-black);
    font-weight: bold;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: var(--color-brand-green);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--color-black);
}

/* Hero - Magazine Style */
.hero-magazine-style {
    position: relative;
    height: 500px; /* Adjust as needed */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-black);
    color: var(--color-white);
}

.hero-magazine-style .container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: auto;
}

.hero-magazine-style .hero-content {
    flex: 1;
    max-width: 50%;
    padding-right: 40px;
}

.hero-magazine-style h1 {
    color: var(--color-white);
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-magazine-style p {
    font-size: 1.3em;
    margin-bottom: 30px;
    color: #eee;
}

.btn-hero-start-guide {
    display: inline-block;
    background-color: var(--color-brand-green);
    color: var(--color-white);
    padding: 15px 40px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.2em;
    transition: background-color 0.3s ease;
}

.btn-hero-start-guide:hover {
    background-color: #227c4b;
    text-decoration: none;
}

.hero-magazine-style .hero-image-overlay {
    flex: 1;
    max-width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-magazine-style .hero-image-overlay img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Main Content */
.main-content section {
    padding: 60px 0;
    margin-bottom: 20px;
    border-radius: 8px;
}

.main-content section:not(.bg-light-beige) {
    background-color: var(--color-white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.main-content section.bg-light-beige {
    background-color: var(--color-light-beige);
}

.section-subtitle {
    font-size: 1.1em;
    color: var(--color-gray-text);
    margin-bottom: 40px;
    text-align: center;
}

/* Overview Section */
.section-overview h2,
.section-platform-guide h2,
.section-post-download-check h2,
.section-common-errors h2,
.section-guide-cta-final h2 {
    text-align: center;
    font-size: 2.5em;
    margin-bottom: 20px;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
    text-align: center;
}

.overview-item {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-bottom: 4px solid var(--color-brand-green);
}

.overview-item h3 {
    color: var(--color-black);
    font-size: 1.4em;
    margin-bottom: 10px;
}

.overview-image {
    display: block;
    max-width: 80%;
    height: auto;
    margin: 40px auto 0 auto;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Platform Guide - Vertical Steps */
.guide-steps-vertical {
    margin-top: 50px;
}

.guide-steps-vertical .step-item {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 60px;
    border-bottom: 1px dashed var(--color-border);
    padding-bottom: 40px;
}

.guide-steps-vertical .step-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.guide-steps-vertical .step-item .step-num {
    font-size: 4em;
    font-weight: bold;
    color: var(--color-brand-green);
    flex-shrink: 0;
    width: 80px;
    text-align: center;
    line-height: 1;
}

.guide-steps-vertical .step-item .step-content h3 {
    color: var(--color-black);
    font-size: 1.8em;
    margin-bottom: 10px;
}

.guide-steps-vertical .step-item .step-content p {
    font-size: 1.1em;
    margin-bottom: 20px;
}

.guide-steps-vertical .step-item .step-image {
    max-width: 90%;
    height: auto;
    display: block;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Post Download Check */
.check-list-large {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.check-list-large li {
    background-color: var(--color-light-beige);
    border-left: 5px solid var(--color-brand-green);
    padding: 20px 25px;
    margin-bottom: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    font-size: 1.2em;
    color: var(--color-black);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.check-list-large li .icon-check {
    color: var(--color-brand-green);
    font-size: 1.8em;
    margin-right: 20px;
    font-weight: bold;
}

/* Common Errors */
.error-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.error-item {
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-top: 5px solid #e74c3c; /* Red for errors */
}

.error-item h3 {
    color: var(--color-black);
    font-size: 1.4em;
    margin-bottom: 10px;
}

/* CTA Final */
.section-guide-cta-final {
    text-align: center;
    background-color: var(--color-brand-green);
    color: var(--color-white);
    padding: 80px 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.section-guide-cta-final h2 {
    color: var(--color-white);
    font-size: 3em;
    margin-bottom: 20px;
}

.section-guide-cta-final p {
    font-size: 1.3em;
    margin-bottom: 40px;
}

.btn-start-game {
    display: inline-block;
    background-color: var(--color-black);
    color: var(--color-white);
    padding: 18px 50px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 1.3em;
    transition: background-color 0.3s ease;
}

.btn-start-game:hover {
    background-color: #333;
    text-decoration: none;
}

/* Footer */
.footer-guide {
    background-color: var(--color-light-beige);
    color: var(--color-black);
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
    margin-top: 40px;
}

.footer-guide .footer-links a {
    margin: 0 15px;
    color: var(--color-black);
}

.footer-guide .footer-links a:hover {
    color: var(--color-brand-green);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-magazine-style {
        height: auto;
        padding: 50px 0;
    }

    .hero-magazine-style .container {
        flex-direction: column;
        text-align: center;
    }

    .hero-magazine-style .hero-content,
    .hero-magazine-style .hero-image-overlay {
        max-width: 100%;
        padding-right: 0;
    }

    .hero-magazine-style .hero-image-overlay {
        margin-top: 30px;
    }

    .hero-magazine-style h1 {
        font-size: 2.5em;
    }

    .hero-magazine-style p {
        font-size: 1.1em;
    }

    .btn-hero-start-guide {
        padding: 12px 25px;
        font-size: 1em;
    }

    .section-overview h2,
    .section-platform-guide h2,
    .section-post-download-check h2,
    .section-common-errors h2,
    .section-guide-cta-final h2 {
        font-size: 2em;
    }

    .section-subtitle {
        font-size: 1em;
    }

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

    .overview-image {
        max-width: 95%;
    }

    .guide-steps-vertical .step-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .guide-steps-vertical .step-item .step-num {
        font-size: 3em;
        width: auto;
        margin-bottom: 20px;
    }

    .guide-steps-vertical .step-item .step-content h3 {
        font-size: 1.5em;
    }

    .guide-steps-vertical .step-item .step-image {
        max-width: 100%;
    }

    .check-list-large li {
        font-size: 1em;
        padding: 15px 20px;
    }

    .check-list-large li .icon-check {
        font-size: 1.5em;
        margin-right: 15px;
    }

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

    .section-guide-cta-final h2 {
        font-size: 2.2em;
    }

    .section-guide-cta-final p {
        font-size: 1.1em;
    }

    .btn-start-game {
        padding: 15px 30px;
        font-size: 1.1em;
    }

    .header .nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }
}
/* AAPoker visual safety patch: CTA sizing, image containment, icon consistency */
html {
    box-sizing: border-box;
    overflow-x: hidden;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.header .logo img,
.topbar img,
.quality-top img,
.mobile-head img,
img[src*="aapoker-logo-primary"],
img[src*="aapoker-logo-icon"] {
    width: auto;
    height: 38px;
    max-height: 42px;
    max-width: 180px;
    object-fit: contain;
    flex: 0 0 auto;
}

.hero,
.quality-hero,
.section,
.section.media,
.section.compact,
.app,
.pc,
.reinstall,
.note-left,
.entry,
.phone-hero,
.login-hero,
[class*="grid"] {
    min-width: 0;
}

.visual-panel,
.quality-card,
.mini-card,
.card,
article,
figure {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.visual-panel img,
.quality-card img,
.content-image,
.phone-strip img,
.final-image img,
.hero img,
.quality-hero img,
.section img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 520px;
    object-fit: contain;
    margin-left: auto;
    margin-right: auto;
}

.cta-row,
.quality-cta,
.download-buttons,
.hero-buttons,
.hero-actions,
.final-cta,
.seo-final-cta,
.quality-hero-cta,
.mid-cta {
    align-items: center;
    align-content: center;
    min-height: 0;
}

.btn-primary,
.btn-secondary,
.btn-primary-large,
.btn-primary-hero,
.btn-primary-final-cta,
.btn-tertiary,
.quality-btn,
.module-cta,
.topbar a,
.mobile-head a,
.cta-row a,
.quality-cta a,
.download-buttons a,
.hero-buttons a,
.hero-actions a,
.final-cta a,
.seo-final-cta a,
.quality-hero-cta a,
.mid-cta a,
button[class*="btn"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    height: auto;
    min-height: 0;
    align-self: center;
    flex: 0 0 auto;
    white-space: normal;
}

@media (max-width: 900px) {
    .cta-row,
    .quality-cta,
    .download-buttons,
    .hero-buttons,
    .hero-actions,
    .seo-final-cta,
    .quality-hero-cta,
    .mid-cta {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 12px;
    }

    .btn-primary,
    .btn-secondary,
    .btn-primary-large,
    .btn-primary-hero,
    .btn-primary-final-cta,
    .btn-tertiary,
    .quality-btn,
    .module-cta,
    .topbar a,
    .mobile-head a,
    .cta-row a,
    .quality-cta a,
    .download-buttons a,
    .hero-buttons a,
    .hero-actions a,
    .final-cta a,
    .seo-final-cta a,
    .quality-hero-cta a,
    .mid-cta a {
        width: auto;
        max-width: 100%;
        min-height: 0;
        height: auto;
        flex: 0 1 auto;
    }

    .hero,
    .quality-hero,
    .section,
    .section.media,
    .section.compact,
    .app,
    .pc,
    .reinstall,
    .note-left,
    .entry,
    .phone-hero,
    .login-hero {
        max-width: 100%;
        overflow-x: hidden;
    }

    h1, h2, h3, p, li, a {
        overflow-wrap: anywhere;
    }
}
/* AAPoker visual safety patch v2: prevent CTA vertical text and icon oversize */
.btn-primary,
.btn-secondary,
.btn-primary-large,
.btn-primary-hero,
.btn-primary-final-cta,
.btn-tertiary,
.quality-btn,
.module-cta,
.topbar a,
.mobile-head a,
.cta-row a,
.quality-cta a,
.download-buttons a,
.hero-buttons a,
.hero-actions a,
.final-cta a,
.seo-final-cta a,
.quality-hero-cta a,
.mid-cta a,
a[href="/go/aapoker"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    max-width: calc(100vw - 48px) !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.25 !important;
    align-self: center !important;
    flex: 0 1 auto !important;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
    text-align: center !important;
}

.header .logo img,
.topbar img,
.quality-top img,
.mobile-head img,
img[src*="aapoker-logo-primary"],
img[src*="aapoker-logo-icon"] {
    width: auto !important;
    height: auto !important;
    max-height: 42px !important;
    max-width: 180px !important;
    object-fit: contain !important;
}

@media (max-width: 480px) {
    .btn-primary,
    .btn-secondary,
    .btn-primary-large,
    .btn-primary-hero,
    .btn-primary-final-cta,
    .btn-tertiary,
    .quality-btn,
    .module-cta,
    .topbar a,
    .mobile-head a,
    .cta-row a,
    .quality-cta a,
    .download-buttons a,
    .hero-buttons a,
    .hero-actions a,
    .final-cta a,
    .seo-final-cta a,
    .quality-hero-cta a,
    .mid-cta a,
    a[href="/go/aapoker"] {
        padding-top: 11px !important;
        padding-bottom: 11px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        font-size: 15px !important;
    }
}
/* AAPoker visual safety patch v3: mobile tables and route-card CTA blocks */
table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

th,
td {
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.table-download-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    line-height: 1.25 !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

.route-card,
a.route-card,
.entry-card,
a.entry-card {
    height: auto !important;
    min-height: 0 !important;
    align-items: center !important;
    align-self: center !important;
    line-height: 1.25 !important;
}

.route-card strong,
.route-card small,
.entry-card strong,
.entry-card small {
    line-height: 1.25 !important;
}

@media (max-width: 480px) {
    table {
        font-size: 13px;
    }

    th,
    td {
        padding-left: 6px !important;
        padding-right: 6px !important;
    }

    .route-card,
    a.route-card,
    .entry-card,
    a.entry-card {
        padding: 10px 12px !important;
        gap: 10px !important;
    }
}
/* AAPoker visual safety patch v4: compact route cards and narrow table CTAs */
.route-card,
a.route-card {
    display: grid !important;
    grid-template-columns: 48px minmax(0, 1fr) !important;
    gap: 4px 14px !important;
    padding: 14px 18px !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden !important;
}

.route-card span {
    width: 42px !important;
    height: 42px !important;
    grid-row: span 2 !important;
    flex: 0 0 auto !important;
}

.route-card strong,
.route-card small {
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
}

.table-download-link {
    max-width: 100% !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
    white-space: normal !important;
    word-break: keep-all !important;
}

.info-col-item {
    max-width: 100% !important;
    padding: 22px !important;
}

@media (max-width: 480px) {
    .route-card,
    a.route-card {
        grid-template-columns: 42px minmax(0, 1fr) !important;
        padding: 10px 12px !important;
    }

    .route-card strong {
        font-size: 18px !important;
    }

    .route-card small {
        font-size: 13px !important;
    }

    .info-col-item {
        padding: 18px !important;
    }
}