/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-dark: #0f172a;
    --border-color: #e2e8f0;
    --gradient-1: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    body {
        /* Optimize rendering on mobile */
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeSpeed;
    }
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
    will-change: box-shadow;
}

@media (max-width: 768px) {
    .navbar {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.logo-img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

@media (min-width: 769px) {
    .nav-menu {
        position: static;
        transform: none;
        background: transparent;
        box-shadow: none;
        padding: 0;
        max-height: none;
        overflow: visible;
    }
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-1);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    padding: 140px 0 100px;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

@media (min-width: 769px) {
    .hero {
        will-change: transform;
        transform: translate3d(0, 0, 0);
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 900px;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    letter-spacing: -0.01em;
}

@media (min-width: 769px) {
    .btn {
        will-change: transform;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 768px) {
    .btn {
        transition: box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
    }
}

.btn-primary {
    background: var(--gradient-1);
    color: white;
    box-shadow: var(--shadow-md);
}

@media (min-width: 769px) {
    .btn-primary:hover {
        transform: translate3d(0, -2px, 0);
        box-shadow: var(--shadow-lg);
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    }
}

@media (max-width: 768px) {
    .btn-primary:active {
        box-shadow: var(--shadow-lg);
        background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    }
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 769px) {
    .btn-secondary:hover {
        background: var(--primary-color);
        color: white;
        transform: translate3d(0, -2px, 0);
        box-shadow: var(--shadow-md);
    }
}

@media (max-width: 768px) {
    .btn-secondary:active {
        background: var(--primary-color);
        color: white;
        box-shadow: var(--shadow-md);
    }
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}


/* Features Section */
.features {
    padding: 100px 0;
    background: var(--bg-secondary);
    content-visibility: auto;
    contain-intrinsic-size: 800px;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    padding: 2.5rem 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    text-align: center;
}

@media (min-width: 769px) {
    .feature-card {
        will-change: transform;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 768px) {
    .feature-card {
        transition: box-shadow 0.2s ease, border-color 0.2s ease;
    }
}

@media (min-width: 769px) {
    .feature-card:hover {
        transform: translate3d(0, -4px, 0);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light);
    }
}

@media (max-width: 768px) {
    .feature-card:active {
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light);
    }
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* How It Works Section */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-primary);
    content-visibility: auto;
    contain-intrinsic-size: 600px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Compatibility Section */
.compatibility {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.compatibility-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.compatibility-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.ios-versions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.version-badge {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
}

.version-badge.highlight {
    background: var(--gradient-1);
    color: white;
    border-color: transparent;
}

.device-showcase {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.device-item {
    padding: 1.5rem 2rem;
    background: var(--gradient-1);
    color: white;
    border-radius: 12px;
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

/* Download Section */
.download {
    padding: 100px 0;
    background: var(--gradient-1);
    color: white;
    text-align: center;
}

.download-content {
    max-width: 800px;
    margin: 0 auto;
}

.download .section-title {
    color: white;
    margin-bottom: 1rem;
}

.download-description {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
}

.download-cta {
    margin-bottom: 3rem;
}

.download .btn-primary {
    background: white;
    color: var(--primary-color);
}

@media (min-width: 769px) {
    .download .btn-primary:hover {
        background: rgba(255, 255, 255, 0.95);
        transform: translate3d(0, -2px, 0);
    }
}

@media (max-width: 768px) {
    .download .btn-primary:active {
        background: rgba(255, 255, 255, 0.95);
    }
}

.download-note {
    margin-top: 1rem;
    font-size: 0.875rem;
    opacity: 0.9;
}

.download-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.download-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
}

.check-icon {
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

/* iOS Guides Section */
.ios-guides {
    padding: 100px 0;
    background: var(--bg-primary);
    content-visibility: auto;
    contain-intrinsic-size: 1000px;
}

.guides-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.guide-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

@media (min-width: 769px) {
    .guide-card {
        will-change: transform;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 768px) {
    .guide-card {
        transition: box-shadow 0.2s ease, border-color 0.2s ease;
    }
}

@media (min-width: 769px) {
    .guide-card:hover {
        transform: translate3d(0, -4px, 0);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light);
    }
}

@media (max-width: 768px) {
    .guide-card:active {
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light);
    }
}

.guide-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.guide-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.guide-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex: 1;
}

.guide-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.guide-link:hover {
    color: var(--primary-dark);
    gap: 0.75rem;
}

.guides-note {
    margin-top: 3rem;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-align: center;
}

.guides-note p {
    color: var(--text-secondary);
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* XIX Files Section */
.xix-files {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.xix-content {
    max-width: 1000px;
    margin: 0 auto;
}

.xix-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 3rem;
    text-align: center;
}

.xix-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.method-card {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

@media (min-width: 769px) {
    .method-card {
        will-change: transform;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 768px) {
    .method-card {
        transition: box-shadow 0.2s ease, border-color 0.2s ease;
    }
}

@media (min-width: 769px) {
    .method-card:hover {
        transform: translate3d(0, -4px, 0);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light);
    }
}

@media (max-width: 768px) {
    .method-card:active {
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-light);
    }
}

.method-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.method-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.method-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Getting Started Section */
.getting-started {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.quick-start-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.quick-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.quick-step-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.quick-step-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.quick-step-content p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* FAQ Section */
.faq {
    padding: 100px 0;
    background: var(--bg-primary);
    content-visibility: auto;
    contain-intrinsic-size: 800px;
}

.faq-container {
    max-width: 800px;
    margin: 3rem auto 0;
}

.faq-item {
    margin-bottom: 1rem;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    padding-right: 1rem;
}

.faq-toggle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .faq-toggle {
        transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
    }
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    background: var(--primary-color);
    color: white;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 1.5rem;
}

@media (max-width: 768px) {
    .faq-answer {
        transition: max-height 0.2s ease, padding 0.2s ease;
    }
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.5rem;
}

.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* Footer */
.footer {
    padding: 60px 0 30px;
    background: var(--bg-dark);
    color: white;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
}

.footer-logo .logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: transform 0.25s ease-out;
        transform: translateX(-100%);
        will-change: transform;
        z-index: 999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateX(0);
    }
    
    .nav-menu li {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .nav-menu a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.125rem;
        width: 100%;
    }
    
    .nav-menu a::after {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .compatibility-content {
        grid-template-columns: 1fr;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

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

    .xix-methods {
        grid-template-columns: 1fr;
    }

    .quick-start-steps {
        grid-template-columns: 1fr;
    }

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

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .download-features {
        grid-template-columns: 1fr;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Fade-in animation classes (better performance than inline styles) */
.fade-in {
    opacity: 0;
    transform: translate3d(0, 20px, 0);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fade-in-visible {
    opacity: 1 !important;
    transform: translate3d(0, 0, 0) !important;
}

@media (min-width: 769px) {
    .fade-in {
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
}

/* Mobile-specific performance optimizations */
@media (max-width: 768px) {
    /* Reduce content-visibility overhead on mobile */
    .features,
    .how-it-works,
    .ios-guides,
    .faq {
        content-visibility: auto;
        contain: layout style paint;
    }
    
    /* Optimize scrolling performance */
    body {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Disable animations on mobile for better performance */
    .fade-in {
        transition: opacity 0.3s ease;
        transform: none;
    }
    
    .fade-in-visible {
        transform: none !important;
    }
    
    /* Optimize card rendering */
    .feature-card,
    .guide-card,
    .method-card {
        contain: layout style paint;
    }
    
    /* Optimize transform performance */
    .feature-card,
    .guide-card,
    .method-card,
    .btn {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* Selection */
::selection {
    background: var(--primary-color);
    color: white;
}

/* Download Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

@media (max-width: 768px) {
    .modal {
        backdrop-filter: none;
        background-color: rgba(0, 0, 0, 0.8);
    }
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 2.5rem;
}

.modal-content-hidden {
    display: none !important;
}

.modal-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.modal-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.modal-body p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.download-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.download-step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.download-step .step-number {
    width: 50px;
    height: 50px;
    background: var(--gradient-1);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.download-step .step-text {
    flex: 1;
}

.download-step .step-text p {
    margin-bottom: 1rem;
}

.browser-instructions {
    margin-top: 1.5rem;
}

.browser-instructions ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.browser-instructions li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.qr-section {
    text-align: center;
    margin-top: 2rem;
}

#qr-code {
    display: inline-block;
    margin: 1.5rem 0;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
}

.qr-link {
    margin-top: 1rem;
    font-size: 1.125rem;
}

@media (max-width: 768px) {
    .modal-content {
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 85vh;
    }

    .modal-body {
        padding: 2rem 1.5rem;
    }

    .download-step {
        flex-direction: column;
        text-align: center;
    }

    .download-step .step-number {
        margin: 0 auto;
    }
}
