/* 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: #f8f8f8; /* Gray-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: #008080; /* Teal Green */
    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: #008080; /* Teal 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: #008080; /* Teal Green */
    color: #fff;
}

.btn-primary:hover {
    background-color: #006060; /* Darker Teal 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: #008080; /* Teal Green */
    color: #fff;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-primary-large:hover {
    background-color: #006060; /* Darker Teal 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-desktop-dark {
    background-color: #2c3e50; /* Dark Blue */
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

.hero-desktop-dark .container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-desktop-dark .hero-content {
    max-width: 900px;
    margin-bottom: 40px;
}

.hero-desktop-dark h1 {
    font-size: 3.5em;
    margin-bottom: 20px;
    color: #fff;
}

.hero-desktop-dark p {
    font-size: 1.3em;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
}

.hero-desktop-dark .hero-image img {
    max-width: 80%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

/* Section Client Showcase */
.section-client-showcase {
    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;
}

.full-width-screenshot {
    max-width: 90%;
    margin: 30px auto;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.image-caption {
    font-size: 1.1em;
    color: #777;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Section System Requirements Windows */
.section-system-requirements-windows {
    background-color: #f8f8f8; /* Gray-White */
    padding: 60px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.section-system-requirements-windows p {
    max-width: 900px;
    margin: 0 auto 30px auto;
    font-size: 1.1em;
    color: #555;
}

.section-system-requirements-windows table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.section-system-requirements-windows th,
.section-system-requirements-windows td {
    border: 1px solid #e0e0e0;
    padding: 15px;
    text-align: left;
    font-size: 1em;
}

.section-system-requirements-windows th {
    background-color: #34495e; /* Darker blue header */
    color: #ffffff;
    font-weight: 600;
}

.section-system-requirements-windows tr:nth-child(even) {
    background-color: #f5f5f5;
}

.section-system-requirements-windows tr:hover {
    background-color: #e8f5f5; /* Light grey-blue hover */
}

/* Section Install Steps Windows */
.section-install-steps-windows {
    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;
}

.steps-flex-windows {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.step-card-windows {
    flex: 1;
    min-width: 280px;
    max-width: 350px;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card-windows:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.step-card-windows .step-num {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #008080; /* Teal Green */
    color: #fff;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 20px;
}

.step-card-windows h3 {
    color: #2c3e50;
    font-size: 1.4em;
    margin-bottom: 10px;
}

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

/* Section Install Directory */
.section-install-directory {
    background-color: #f8f8f8; /* Gray-White */
    padding: 50px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.section-install-directory p {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    font-size: 1.1em;
    color: #555;
}

.section-install-directory p code {
    background-color: #e0e0e0;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
}

.file-list {
    list-style: disc;
    margin-left: 40px;
    margin-top: 15px;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    color: #555;
    font-size: 1em;
}

/* Section Desktop Shortcut */
.section-desktop-shortcut {
    background-color: #ffffff;
    padding: 50px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.section-desktop-shortcut p {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    font-size: 1.1em;
    color: #555;
}

.shortcut-methods {
    list-style: disc;
    margin-left: 40px;
    margin-top: 15px;
    margin-bottom: 20px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    color: #555;
    font-size: 1em;
}

/* Section Runtime Troubleshooting */
.section-runtime-troubleshooting {
    background-color: #f8f8f8; /* Gray-White */
    padding: 60px 0;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

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

.troubleshoot-item-windows {
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.05);
    text-align: left;
    border-left: 5px solid #008080; /* Teal Green accent */
}

.troubleshoot-item-windows h3 {
    color: #2c3e50;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.troubleshoot-item-windows p {
    color: #666;
    font-size: 1em;
    line-height: 1.6;
}

/* Section CTA Windows */
.section-cta-windows {
    background-color: #008080; /* Teal Green */
    color: #fff;
    text-align: center;
    padding: 60px 0;
    border-radius: 0;
    box-shadow: none;
}

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

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

/* Footer with Device Entry */
.footer-device-entry {
    background-color: #34495e; /* Darker Blue */
    color: #ecf0f1;
    padding: 40px 0;
    font-size: 0.95em;
    text-align: center;
}

.footer-device-entry .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    align-items: flex-start;
    text-align: left;
}

.footer-main-links, .footer-legal-links, .footer-contact {
    flex: 1;
    min-width: 200px;
    margin: 20px;
}

.footer-main-links h4, .footer-legal-links h4, .footer-contact h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-main-links ul, .footer-legal-links ul {
    list-style: none;
    padding: 0;
}

.footer-main-links ul li, .footer-legal-links ul li {
    margin-bottom: 10px;
}

.footer-main-links ul li a, .footer-legal-links ul li a {
    color: #ecf0f1;
    transition: color 0.3s ease;
}

.footer-main-links ul li a:hover, .footer-legal-links ul li a:hover {
    color: #008080; /* Teal Green hover */
    text-decoration: underline;
}

.social-icons a {
    display: inline-block;
    margin-right: 15px;
}

.social-icons a:last-child {
    margin-right: 0;
}

.social-icons img {
    height: 24px;
    filter: invert(100%) brightness(1.5); /* Make icons visible on dark background */
}

.footer-bottom {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
}

.footer-bottom p {
    color: #b0c4de;
    margin-bottom: 0;
}


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

@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-desktop-dark h1 {
        font-size: 2.8em;
    }
    .hero-desktop-dark p {
        font-size: 1.1em;
    }
    .hero-desktop-dark .hero-image img {
        max-width: 90%;
    }
    .steps-flex-windows, .troubleshoot-grid-windows {
        flex-direction: column;
        align-items: center;
    }
    .step-card-windows, .troubleshoot-item-windows {
        max-width: 450px;
        width: 100%;
    }
    .section-cta-windows h2 {
        font-size: 2em;
    }
    .footer-device-entry .container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-main-links, .footer-legal-links, .footer-contact {
        min-width: unset;
        width: 100%;
        margin: 15px 0;
    }
    .footer-main-links ul, .footer-legal-links ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }
    .footer-main-links ul li, .footer-legal-links ul li {
        margin-bottom: 0;
    }
}

@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-desktop-dark h1 {
        font-size: 2.5em;
    }
    .hero-desktop-dark p {
        font-size: 1.1em;
    }
    .section-cta-windows h2 {
        font-size: 1.8em;
    }
    .section-cta-windows p {
        font-size: 0.95em;
    }
}

@media (max-width: 390px) {
    h1 { font-size: 1.6em; }
    h2 { font-size: 1.3em; }
    .hero-desktop-dark h1 {
        font-size: 2em;
    }
    .section-cta-windows h2 {
        font-size: 1.6em;
    }
}
/* 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;
    }
}