/* Basic Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff; /* White */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

h1 {
    font-size: 2.8em;
    font-weight: 700;
}

h2 {
    font-size: 2em;
    font-weight: 600;
}

h3 {
    font-size: 1.5em;
    font-weight: 500;
}

p {
    margin-bottom: 1em;
}

a {
    color: #3498db; /* Default blue for general links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Header */
.header {
    background-color: #ffffff;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.header .logo img {
    height: 40px;
}

.header .nav ul {
    list-style: none;
    display: flex;
}

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

.header .nav ul li a {
    color: #555;
    font-weight: 500;
    font-size: 1.1em;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.header .nav ul li a:hover {
    color: #2e8b57; /* Brand green for nav hover */
    text-decoration: none;
}

.header .menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #555;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: #2e8b57; /* Brand green */
    color: #fff;
}

.btn-primary:hover {
    background-color: #226b41; /* Darker brand green */
    color: #fff;
    text-decoration: none;
}

.btn-primary-large {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 8px;
    font-size: 1.3em;
    font-weight: 700;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    border: none;
    cursor: pointer;
    background-color: #2e8b57; /* Brand green */
    color: #fff;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary-large:hover {
    background-color: #226b41; /* Darker brand green */
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #e0e0e0; /* Light grey */
    color: #34495e;
    border: 1px solid #a0a0a0; /* Slightly darker grey */
    margin-right: 10px;
}

.btn-secondary:hover {
    background-color: #bdc3c7;
    color: #34495e;
    text-decoration: none;
}

/* Main Content Sections */
.main-content {
    padding: 40px 0;
}

.section-description {
    max-width: 800px;
    margin: 0 auto 30px auto;
    font-size: 1.1em;
    color: #555;
    text-align: center;
}

/* Hero Sections */
.hero-centered-app {
    background-color: #f9f9f9; /* Light grey */
    padding: 80px 0;
    text-align: center;
}

.hero-centered-app .hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-centered-app h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #2c3e50;
}

.hero-centered-app p {
    font-size: 1.3em;
    color: #555;
    margin-bottom: 40px;
}

.hero-centered-app .hero-app-image {
    max-height: 500px;
    width: auto;
    margin: 0 auto 40px auto;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

/* Section Features App */
.section-features-app {
    background-color: #ffffff;
    padding: 60px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.feature-grid-app {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item-app {
    padding: 30px;
    background-color: #fcfcfc;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item-app:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.feature-item-app img {
    max-width: 80px;
    height: auto;
    margin: 0 auto 20px auto;
}

.feature-item-app h3 {
    color: #2e8b57; /* Brand green */
    font-size: 1.4em;
    margin-bottom: 10px;
}

.feature-item-app p {
    color: #666;
    font-size: 0.95em;
}

/* Section Mobile Scenarios */
.section-mobile-scenarios {
    background-color: #f2f2f2; /* Light grey */
    padding: 60px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.scenario-item {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-bottom: 50px;
}

.scenario-item:last-child {
    margin-bottom: 0;
}

.scenario-item.reverse {
    flex-direction: row-reverse;
}

.scenario-text {
    flex: 1;
}

.scenario-text h3 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 15px;
}

.scenario-text p {
    font-size: 1.1em;
    color: #555;
    line-height: 1.8;
}

.scenario-image {
    flex: 1;
    text-align: center;
}

.scenario-image img {
    max-width: 80%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Section App Compatibility */
.section-app-compatibility {
    background-color: #ffffff;
    padding: 60px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.compatibility-list {
    list-style: none;
    padding: 0;
    margin-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    font-size: 1.1em;
    color: #555;
}

.compatibility-list li {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%232e8b57" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M8 12l2 2 4-4"/></svg>') no-repeat left center;
    background-size: 20px;
    padding-left: 30px;
    margin-bottom: 15px;
}

.compatibility-list li strong {
    color: #2c3e50;
}

/* Section Download Steps */
.section-download-steps {
    background-color: #f9f9f9; /* Light grey */
    padding: 60px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.step-item {
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.step-item .step-number {
    display: block;
    font-size: 3em;
    font-weight: 700;
    color: #2e8b57; /* Brand green */
    margin-bottom: 15px;
}

.step-item h3 {
    font-size: 1.6em;
    color: #2c3e50;
    margin-bottom: 10px;
}

.step-item p {
    color: #666;
    font-size: 1em;
}

/* Section CTA App */
.section-cta-app {
    background-color: #2e8b57; /* Brand green */
    color: #fff;
    text-align: center;
    padding: 60px 0;
    border-radius: 0;
    box-shadow: none;
}

.section-cta-app h2 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 2.5em;
}

.section-cta-app p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1em;
    margin-bottom: 30px;
}

/* Footer Light Brand */
.footer-light-brand {
    background-color: #ffffff;
    color: #555;
    padding: 40px 0;
    text-align: center;
    font-size: 0.95em;
    border-top: 1px solid #eee;
}

.footer-light-brand .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-brand-info {
    margin-bottom: 20px;
}

.footer-logo {
    height: 50px;
    margin-bottom: 10px;
}

.footer-brand-info p {
    color: #777;
    font-size: 1.1em;
}

.footer-links ul {
    list-style: none;
    display: flex;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links ul li {
    margin: 0 15px;
}

.footer-links ul li a {
    color: #555;
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: #2e8b57; /* Brand green hover */
}

.copyright {
    color: #888;
    margin-top: 20px;
}


/* Responsive Design */
@media (max-width: 1440px) {
    .container {
        max-width: 1000px;
    }
    h1 { font-size: 2.5em; }
    h2 { font-size: 1.8em; }
    .hero-centered-app h1 {
        font-size: 3em;
    }
    .section-cta-app h2 {
        font-size: 2.2em;
    }
    .scenario-text h3 {
        font-size: 1.8em;
    }
}

@media (max-width: 1024px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.6em; }
    .header .nav {
        display: none;
    }
    .header .menu-toggle {
        display: block;
    }
    .header .logo img {
        height: 35px;
    }
    .hero-centered-app h1 {
        font-size: 2.8em;
    }
    .hero-centered-app p {
        font-size: 1.1em;
    }
    .scenario-item {
        flex-direction: column;
        gap: 30px;
    }
    .scenario-item.reverse {
        flex-direction: column; /* For mobile, always column */
    }
    .scenario-text {
        text-align: center;
    }
    .scenario-image img {
        max-width: 60%;
    }
    .feature-grid-app, .steps-grid {
        grid-template-columns: 1fr;
    }
    .feature-item-app, .step-item {
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
    .section-cta-app h2 {
        font-size: 2em;
    }
    .footer-links ul {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.4em; }
    h3 { font-size: 1.2em; }
    .header .logo img {
        height: 30px;
    }
    .btn-primary, .btn-secondary, .btn-primary-large {
        padding: 10px 20px;
        font-size: 1em;
    }
    .hero-centered-app h1 {
        font-size: 2.5em;
    }
    .hero-centered-app p {
        font-size: 1.1em;
    }
    .hero-centered-app .hero-app-image {
        max-height: 350px;
    }
    .section-cta-app h2 {
        font-size: 1.8em;
    }
    .section-cta-app p {
        font-size: 0.95em;
    }
    .scenario-text h3 {
        font-size: 1.5em;
    }
}

@media (max-width: 390px) {
    h1 { font-size: 1.6em; }
    h2 { font-size: 1.3em; }
    .hero-centered-app h1 {
        font-size: 2em;
    }
    .section-cta-app h2 {
        font-size: 1.6em;
    }
}

/* Recovered final quality layout */
.quality-page{font-family:"Microsoft YaHei",Arial,sans-serif;background:#f7f9fc;color:#172033;line-height:1.75;margin:0}.quality-page *{box-sizing:border-box}.quality-page img{max-width:100%;display:block}.quality-shell{max-width:1180px;margin:0 auto;padding:0 22px}.quality-top{background:#fff;border-bottom:1px solid #e5e9f0;position:sticky;top:0;z-index:5}.quality-top .quality-shell{min-height:72px;display:flex;align-items:center;justify-content:space-between;gap:16px}.quality-top img{height:38px}.quality-top a,.quality-btn{display:inline-block;background:#16a34a;color:#fff;padding:12px 20px;border-radius:6px;font-weight:800;text-decoration:none}.quality-hero{min-height:560px;display:grid;grid-template-columns:1.05fr .95fr;align-items:center;gap:40px;padding:70px 6vw;background:linear-gradient(135deg,#fff,#eef6ff)}.quality-hero h1{font-size:44px;line-height:1.18;margin:10px 0;color:#102033}.quality-hero p{color:#5d6878}.quality-eyebrow{font-weight:900;color:#16784f}.quality-card{background:#fff;border:1px solid #e5e9f0;border-radius:8px;padding:22px;box-shadow:0 22px 55px rgba(30,45,80,.12)}.quality-cta{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px}.quality-cta a{display:inline-block;background:#16a34a;color:#fff;padding:12px 20px;border-radius:6px;font-weight:800;text-decoration:none}.quality-cta a:nth-child(2){background:#1f2937}.quality-section{padding:56px 6vw;background:#fff;border-top:1px solid #e7ebf0}.quality-section:nth-of-type(odd){background:#f7f9fc}.quality-section .quality-shell{display:grid;grid-template-columns:1fr;gap:12px}.quality-section h2{font-size:28px;margin:0;color:#102033}.quality-final{margin:34px 6vw 72px;padding:44px;text-align:center;background:#102033;color:#fff;border-radius:8px}.quality-final p{color:#eef2f7}.quality-ios .quality-hero{background:#f7fbff}.quality-mobile .quality-hero{background:#f1fffb}.quality-official .quality-hero{background:linear-gradient(120deg,#102033,#1d4f75);color:#fff}.quality-official .quality-hero h1,.quality-official .quality-hero p{color:#fff}.quality-latest .quality-hero{background:#fff7ed}.quality-login .quality-hero{background:#fff6fb}.quality-update .quality-hero{background:#f5f7ff}.quality-desktop .quality-hero{grid-template-columns:1.2fr .8fr}.quality-new-user .quality-hero{background:linear-gradient(180deg,#fff,#eefaf3)}@media(max-width:900px){.quality-hero{grid-template-columns:1fr;min-height:auto;padding:48px 22px}.quality-hero h1{font-size:34px}.quality-top .quality-shell{flex-wrap:wrap;padding:16px 22px}.quality-cta a,.quality-btn{width:100%;text-align:center}.quality-section{padding:42px 22px}.quality-final{margin:28px 22px 54px}}
/* 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;
    }
}