/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #64748b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-icon {
    font-size: 2rem;
}

img.logo-icon {
    width: 2rem;
    height: 2rem;
    vertical-align: middle;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    color: #fbbf24;
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.chessboard-preview {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    font-size: 4rem;
}

.chess-piece {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    backdrop-filter: blur(10px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* Support Box */
.support-section {
    padding: 2rem 0 1.5rem;
    background: var(--bg-color);
}

.support-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.support-box .item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 2rem;
    background: var(--bg-light);
    border-radius: 12px;
    border: 2px solid #dc2626;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.support-box .item:hover {
    box-shadow: var(--shadow-lg);
}

.support-box .icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.support-box .icon-support,
.support-box .icon-warranty {
    color: #dc2626;
}

.support-box .icon-support svg,
.support-box .icon-warranty svg {
    display: block;
}

.support-box .content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #b91c1c;
}

.support-box .content p {
    color: var(--text-light);
    line-height: 1.6;
}

.support-box .content a {
    color: var(--primary-color);
    font-weight: 600;
}

.support-box .content a:hover {
    text-decoration: underline;
}

.support-box .icon-pricing {
    color: #dc2626;
}

.support-box .icon-pricing svg {
    display: block;
}

.support-box .highlight {
    color: #dc2626;
    font-weight: 700;
}

/* Introduction Article */
.intro-article {
    padding: 1.5rem 0 4rem;
    background: var(--bg-light);
}

.intro-article .section-title {
    margin-bottom: 2rem;
}

.article-intro-card {
    background: linear-gradient(135deg, #ffffff 0%, #fef2f2 100%);
    padding: 2.25rem;
    border-radius: 12px;
    border-left: 4px solid #dc2626;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(220, 38, 38, 0.1);
    margin-bottom: 2.5rem;
}

.article-intro-card p {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-color);
    margin-bottom: 1rem;
}

.article-intro-card p:last-child {
    margin-bottom: 0;
}

.article-intro-card strong {
    color: #dc2626;
    font-weight: 700;
}

.article-subtitle {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 1.5rem;
}

.article-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.article-feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.article-feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.article-feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.article-feature-card h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.article-feature-card p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-light);
}

.article-cta {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(30, 64, 175, 0.08) 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.article-cta p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-color);
    margin-bottom: 0.75rem;
}

.article-cta p:last-child {
    margin-bottom: 0;
}

.article-cta-title {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    margin-bottom: 1rem !important;
}

.article-cta-closing {
    margin-top: 1rem !important;
    font-size: 1.1rem !important;
}

/* How It Works */
.how-it-works {
    padding: 5rem 0;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-light);
}

/* CTA Section */
.cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    padding: 1.5rem 0;
}

.footer-bottom {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Page Content */
.page-content {
    padding: 3rem 0;
    min-height: 60vh;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.content-section {
    margin-bottom: 3rem;
}

.content-section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.content-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.content-section p,
.content-section li {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-section ul,
.content-section ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-section a {
    color: var(--primary-color);
    text-decoration: none;
}

.content-section a:hover {
    text-decoration: underline;
}

/* Buttons in content-section must keep white text (override above) */
.content-section a.btn,
.content-section a.btn-primary,
.pricing-card a.btn {
    color: #ffffff !important;
}

.content-section a.btn:hover,
.content-section a.btn-primary:hover,
.pricing-card a.btn:hover {
    color: #ffffff !important;
    text-decoration: none;
}

/* Pricing Page */
.pricing-intro {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.pricing-highlight {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(30, 64, 175, 0.1) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: 0 8px 8px 0;
    font-size: 1.05rem;
    color: var(--text-color);
}

.pricing-table {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.pricing-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.pricing-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.pricing-card.pricing-popular {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.pricing-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

.pricing-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.pricing-amount {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.pricing-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
}

.pricing-card .btn {
    width: 100%;
}

.download-note {
    text-align: center;
    margin-top: 1rem;
    color: var(--text-light);
}

.download-note a {
    color: var(--primary-color);
    font-weight: 600;
}

/* Contact Zalo section on pricing page */
.contact-zalo-section {
    scroll-margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.contact-zalo-card {
    background: var(--bg-light);
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.contact-zalo-card h2 {
    margin-bottom: 1rem;
}

.contact-zalo-card p {
    margin-bottom: 1rem;
}

.btn-zalo {
    display: inline-block;
    font-size: 1.1rem;
    color: #ffffff !important;
    font-weight: 700;
}

.contact-zalo-card .btn,
.contact-zalo-card a.btn {
    color: #ffffff !important;
}

/* Tech Grid */
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.tech-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

/* Download Section */
.download-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.download-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.download-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.download-card h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.download-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.version-info {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 1rem;
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    margin-bottom: 0.5rem;
}

.btn-outline {
    background: #ffffff;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-outline:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Requirements */
.requirements {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.requirement-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.requirement-item ul {
    list-style: none;
    margin-left: 0;
}

.requirement-item li {
    padding-left: 1.5rem;
    position: relative;
}

.requirement-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Contact */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.contact-item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* FAQ */
.faq {
    margin-top: 2rem;
}

.faq-item {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.faq-item h3 {
    margin-bottom: 0.5rem;
}

/* Code Block */
pre {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        display: flex;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid,
    .steps,
    .download-section {
        grid-template-columns: 1fr;
    }

    .article-features-grid {
        grid-template-columns: 1fr;
    }

    .article-intro-card {
        padding: 1.5rem;
    }
}

/* Download toast - feedback khi nhấn tải */
.download-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--text-color);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
    z-index: 9999;
}
.download-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Download button - trạng thái đang xử lý */
.download-btn--loading {
    pointer-events: none;
    opacity: 0.7;
    cursor: wait;
}
