/* ========================================
   XMAP - Complete CSS Stylesheet
   Version: 2.0.0
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --bg-start: #ffffff;
    --bg-mid: #f0f4ff;
    --bg-end: #dbeafe;
    --card-bg: rgba(255, 255, 255, 0.96);
    --card-stroke: rgba(0, 0, 0, 0.1);
    --text: #111111;
    --muted: #666666;
    --accent: #2563eb;
    --accent-2: #1e40af;
    --accent-hover: #1d4ed8;
    --footer-bg: #111827;
    --footer-text: #e5e7eb;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Border radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-xl: 12px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 14px 28px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 10;
    --z-nav-mobile: 20;
    --z-modal: 1000;
    --z-zalo: 999;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg-start);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   Header & Navigation
   ======================================== */

header {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    z-index: var(--z-modal);
    border-bottom: 1px solid var(--card-stroke);
    transition: all var(--transition-base);
}

header.dark {
    background: rgba(0, 0, 0, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

header.dark nav a {
    color: var(--bg-start);
}

header.dark .logo {
    color: var(--bg-start);
}

header.dark .mobile-menu-btn {
    color: var(--bg-start);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.logo {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text);
    z-index: var(--z-nav-mobile);
}

header.dark .logo {
    color: var(--accent);
}


nav ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-xl);
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text);
    font-weight: 500;
    transition: opacity var(--transition-base);
    position: relative;
}

nav a:hover {
    opacity: 0.7;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
}

.nav-btn {
    background: var(--text);
    color: var(--bg-start);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
}

.nav-btn:hover {
    opacity: 1;
}

header.dark .nav-btn {
    background: var(--bg-start);
    color: var(--text);
}

header .logo img {
    transition: opacity 0.3s ease;
}


/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: all var(--transition-base);
    z-index: var(--z-nav-mobile);
    color: var(--text);
}

nav ul.mobile-menu-open {
    display: flex !important;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.3s ease;
    z-index: var(--z-dropdown);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 5% 80px;
    background: linear-gradient(135deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: var(--spacing-lg);
    color: var(--text);
    font-style: italic;
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0;
    }
}

.hero-text p {
    font-size: 1.3rem;
    color: var(--muted);
    margin-bottom: var(--spacing-xl);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.btn {
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: transform var(--transition-base);
    display: inline-block;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-start);
}

.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
}

.hero-visual {
    position: relative;
}

.hero-img {
    width: 100%;
    max-width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.float-card {
    position: absolute;
    background: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

.float-card.top {
    top: 10%;
    right: -10%;
}

.float-card.bottom {
    bottom: 15%;
    left: -10%;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ========================================
   Features Section
   ======================================== */

.features {
    padding: 80px 5%;
    background: var(--bg-mid);
    position: relative;
    z-index: 2;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: var(--spacing-md);
    color: var(--text);
}

.section-desc {
    text-align: center;
    color: var(--muted);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition-base);
    box-shadow: var(--shadow-md);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.feature-content {
    padding: var(--spacing-lg);
}

.feature-content h3 {
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text);
}

.feature-content p {
    color: var(--muted);
    line-height: 1.6;
}

/* ========================================
   Services Section
   ======================================== */

.services {
    padding: 80px 5%;
    background: var(--bg-start);
}

.service-item {
    max-width: 1200px;
    margin: 0 auto 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.service-item:nth-child(even) {
    direction: rtl;
}

.service-item:nth-child(even) .service-text {
    direction: ltr;
}

.service-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.service-text h3 {
    font-size: 2rem;
    margin-bottom: var(--spacing-md);
    color: var(--text);
}

.service-text p {
    color: var(--muted);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

.service-list {
    list-style: none;
}

.service-list li {
    padding: var(--spacing-sm) 0;
    color: var(--text);
}

.service-list li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* ========================================
   API Features Section
   ======================================== */

.api-features {
    padding: 80px 5%;
    background: #fff;
}

.api-grid {
    max-width: 1200px;
    margin: 3rem auto 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.api-card {
    background: #f8f8f8;
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s;
    border-left: 4px solid #000;
    box-shadow: var(--shadow-md);
}

.api-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.api-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.api-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.api-card p {
    color: #666;
    line-height: 1.6;
}

.button-group {
    text-align: center;
    margin-top: 3rem;
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Mobile App Section
   ======================================== */

.mobile-app {
    padding: 80px 5%;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: #fff;
    overflow: hidden;
}

.mobile-app-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.app-content h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
}

.app-content>p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.app-features {
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 20px;
}

.app-feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.app-feature-item span:first-child {
    font-size: 1.5rem;
    margin-right: 1rem;
}

.download-buttons {
    display: flex;
    gap: 1rem;
}

.download-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.download-title svg {
    transition: transform 0.3s ease;
}

.download-title:hover svg {
    transform: translateY(2px);
}

.store-btn {
    display: inline-flex;
    align-items: center;
    background: #000;
    border: 1px solid #fff;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s;
    min-width: 200px;
}

.store-btn:hover {
    transform: scale(1.05);
    background: #fff;
    color: #000;
}

.store-btn-outline {
    background: transparent;
}

.store-icon {
    margin-right: 0.8rem;
}

.store-text {
    text-align: left;
}

.store-subtitle {
    font-size: 0.8rem;
    opacity: 0.8;
}

.store-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.app-stats {
    margin-top: 2rem;
    display: flex;
    gap: 3rem;
}

.app-stat-value {
    font-size: 2rem;
    font-weight: bold;
}

.app-stat-label {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Phone Mockup */
.phone-mockup {
    position: relative;
    display: flex;
    justify-content: center;
}

.phone-frame {
    width: 320px;
    height: 650px;
    background: #111;
    border-radius: 45px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    border: 10px solid #222;
    position: relative;
    overflow: hidden;
}

.phone-speaker {
    position: absolute;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 6px;
    background: #333;
    border-radius: 3px;
    z-index: 10;
}

.phone-screen {
    width: 100%;
    height: 100%;
    border-radius: 35px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0px 4px 0px 4px;
}

/* ========================================
   CTA Section
   ======================================== */

.cta {
    padding: 80px 5%;
    text-align: center;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    color: var(--bg-start);
    position: relative;
    overflow: hidden;
}

.cta-bg-circle {
    position: absolute;
    border-radius: 50%;
}

.cta-bg-circle.circle-left {
    top: -50px;
    left: -50px;
    width: 200px;
    height: 200px;
    background: rgba(0, 0, 0, 0.05);
}

.cta-bg-circle.circle-right {
    bottom: -60px;
    right: -60px;
    width: 250px;
    height: 250px;
    background: rgba(0, 0, 0, 0.07);
}

.cta h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.cta .btn {
    background: var(--bg-start);
    color: var(--accent);
    padding: 15px 30px;
    font-size: 1.2rem;
    font-weight: bold;
    border-radius: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.cta .btn:hover {
    background: var(--bg-mid);
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

/* ========================================
   Pricing Section
   ======================================== */

.pricing {
    background: linear-gradient(180deg, var(--bg-mid), var(--bg-start));
    padding: 80px 5%;
}

.pricing-table-wrapper {
    margin-top: var(--spacing-xl);
    overflow-x: auto;
}

.pricing-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.pricing-table thead {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: var(--bg-start);
    font-size: 1rem;
}

.pricing-table th,
.pricing-table td {
    padding: var(--spacing-md);
    border: 1px solid var(--card-stroke);
    text-align: left;
}

.pricing-table th.text-center,
.pricing-table td.text-center {
    text-align: center;
}

.pricing-table tbody tr:hover {
    background: var(--bg-mid);
    transition: background var(--transition-base);
}

.pricing-table a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.pricing-table a:hover {
    text-decoration: underline;
}

/* ========================================
   Contact Section
   ======================================== */

.contact {
    padding: 80px 5%;
    background: var(--bg-mid);
}

.contact-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
    color: var(--text);
}

.contact-info p {
    color: var(--muted);
    margin-bottom: var(--spacing-xl);
}

.contact-list {
    list-style: none;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--accent);
    color: var(--bg-start);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: var(--spacing-md);
    flex-shrink: 0;
    font-size: 1.2rem;
}

.contact-form {
    background: var(--card-bg);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--card-stroke);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.g-recaptcha {
    margin-bottom: var(--spacing-lg);
}

.form-btn {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--accent);
    color: var(--bg-start);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-base);
}

.form-btn:hover {
    transform: translateY(-2px);
    background: var(--accent-hover);
    box-shadow: var(--shadow-md);
}

/* ========================================
   Footer
   ======================================== */

footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 5% 30px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: var(--spacing-md);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-links h4 {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    line-height: 2;
    transition: color var(--transition-fast);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--bg-start);
}

.footer-bottom {
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

/* ========================================
   Social Float
   ======================================== */

.social-float {
    position: fixed;
    right: 20px;
    top: 75%;
    transform: translateY(-50%);
    z-index: var(--z-zalo);
}

.social-float a {
    display: block;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border: 2px solid var(--accent);
    border-radius: 50%;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--accent);
    font-weight: bold;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    font-size: 30px;
}

.social-float a:hover {
    background: var(--accent);
    color: var(--bg-start);
    transform: scale(1.1);
}

/* ========================================
   Responsive - Tablet
   ======================================== */

@media (max-width: 1024px) {

    .hero-content,
    .service-item,
    .mobile-app-container {
        gap: 3rem;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* ========================================
   Responsive - Mobile
   ======================================== */

@media (max-width: 768px) {

    /* Navigation */
    nav ul {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* Hero */
    .hero {
        padding: 100px 5% 60px;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .float-card {
        display: none;
    }

    /* Features */
    .features {
        padding: 60px 5%;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    /* Services */
    .services {
        padding: 60px 5%;
    }

    .service-item {
        grid-template-columns: 1fr;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .service-item:nth-child(even) {
        direction: ltr;
    }

    .service-text h3 {
        font-size: 1.5rem;
    }

    /* API */
    .api-features {
        padding: 60px 5%;
    }

    .api-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
        align-items: stretch;
    }

    .button-group .btn {
        width: 100%;
    }

    /* Mobile App */
    .mobile-app {
        padding: 60px 5%;
    }

    .mobile-app-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .app-content h2 {
        font-size: 2rem;
    }

    .app-content>p {
        font-size: 1.1rem;
    }

    .phone-mockup {
        order: -1;
    }

    .phone-frame {
        width: 240px;
        height: 490px;
    }

    .download-buttons {
        flex-direction: column;
    }

    .store-btn {
        width: 100%;
        justify-content: center;
    }

    .app-stats {
        gap: 2rem;
        justify-content: space-around;
    }

    /* CTA */
    .cta {
        padding: 60px 5%;
    }

    .cta h2 {
        font-size: 1.8rem;
    }

    .cta p {
        font-size: 1rem;
    }

    /* Pricing */
    .pricing {
        padding: 60px 3%;
    }

    .pricing-table-wrapper {
        overflow-x: scroll;
        -webkit-overflow-scrolling: touch;
    }

    .pricing-table {
        min-width: 600px;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    /* Contact */
    .contact {
        padding: 60px 5%;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Social Float */
    .social-float {
        right: 20px;
        top: auto;
        transform: none;
    }

    .social-float a {
        width: 50px;
        height: 50px;
        margin-bottom: var(--spacing-sm);
    }
}

/* ========================================
   Responsive - Small Mobile
   ======================================== */

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .app-content h2 {
        font-size: 1.8rem;
    }

    .cta h2 {
        font-size: 1.5rem;
    }

    .phone-frame {
        width: 200px;
        height: 410px;
    }

    .app-stats {
        gap: 1rem;
    }

    .contact-form {
        padding: var(--spacing-lg);
    }
}

/* ========================================
   Back to Top Button
   ======================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--card-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: var(--z-zalo);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    position: fixed;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.back-to-top>svg:not(.progress-ring) {
    width: 20px;
    height: 20px;
    fill: var(--accent);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
}

/* Progress Circle */
.progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    pointer-events: none;
}

.progress-ring-circle {
    fill: none;
    stroke: var(--accent);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.1s ease;
}

/* ========================================
   Utilities
   ======================================== */

.text-center {
    text-align: center;
}

/* Scroll Progress Bar (Optional) */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent);
    z-index: calc(var(--z-modal) + 1);
    transition: width 0.1s ease;
}

/* Custom Notification Styles */
.custom-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  padding: 16px 20px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 320px;
  max-width: 500px;
  z-index: 10000;
  transform: translateX(400px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.custom-notification.show {
  transform: translateX(0);
  opacity: 1;
}

.custom-notification.success {
  border-left: 4px solid #10b981;
}

.custom-notification.error {
  border-left: 4px solid #ef4444;
}

.notification-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: bold;
  color: white;
  flex-shrink: 0;
}

.notification-icon.success-icon {
  background: linear-gradient(135deg, #10b981, #059669);
}

.notification-icon.error-icon {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.notification-message {
  color: #1f2937;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 500;
}

.notification-close {
  background: none;
  border: none;
  font-size: 24px;
  color: #9ca3af;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.notification-close:hover {
  background: #f3f4f6;
  color: #1f2937;
}

/* Button downloading state */
.btn-downloading {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: wait !important;
  background: #3b82f6 !important;
}

.btn-downloading .spinner {
  width: 20px;
  height: 20px;
  animation: rotate 2s linear infinite;
}

.spinner-track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 3;
}

.spinner-progress {
  fill: none;
  stroke: white;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 62.83; /* 2πr = 2 * π * 10 */
  stroke-dashoffset: 62.83;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 0.3s ease;
}

@keyframes rotate {
  100% {
    transform: rotate(360deg);
  }
}

.download-text {
  font-size: 14px;
  font-weight: 500;
  color: white;
}

.download-text strong {
  font-weight: 700;
  margin-left: 4px;
}

/* Button complete state */
.btn-complete {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #22c55e !important;
  cursor: default !important;
  animation: successPulse 0.5s ease;
}

.check-icon {
  width: 20px;
  height: 20px;
  fill: white;
  animation: checkScale 0.5s ease;
}

@keyframes successPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes checkScale {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .btn-downloading .spinner,
  .check-icon {
    width: 18px;
    height: 18px;
  }
  
  .download-text {
    font-size: 13px;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .custom-notification {
    top: 10px;
    right: 10px;
    left: 10px;
    min-width: auto;
    max-width: none;
  }
}

/* Animation cho loading button */
.form-btn:disabled {
  opacity: 0.7;
  cursor: not allowed;
  position: relative;
}

.form-btn:disabled::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* ========================================
   Responsive - Back to Top
   ======================================== */

@media (max-width: 768px) {
    nav {
        padding: 0.4rem 5%
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .back-to-top>svg:not(.progress-ring) {
        width: 18px;
        height: 18px;
    }

    .progress-ring-circle {
        stroke-width: 2.5;
    }

    /* Adjust for smaller mobile */
    .social-float {
        bottom: 20%;
    }

    header.dark nav a {
        color: var(--text);
    }

    header.dark .nav-btn {
        background: var(--text);
        color: var(--bg-start);
    }
}

@media (max-width: 480px) {
    .back-to-top {
        width: 50px;
        height: 50px;
    }
}