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

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #0ea5e9;
    --dark: #0f172a;
    --gray: #64748b;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --gradient: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    -webkit-tap-highlight-color: rgba(99, 102, 241, 0.1);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Improve touch scrolling on iOS */
pre, code, .code-example {
    -webkit-overflow-scrolling: touch;
}

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

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    overflow-x: hidden;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    width: 100%;
    overflow: hidden;
}

.logo h1 {
    font-size: 1.5rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-shrink: 1;
    min-width: 0;
}

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

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

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

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

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Buttons */
.btn-primary {
    background: var(--gradient);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: transform 0.2s, box-shadow 0.2s;
    touch-action: manipulation;
    user-select: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    border: 2px solid var(--primary);
    transition: all 0.2s;
    touch-action: manipulation;
    user-select: none;
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

/* Hero Section */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ff 100%);
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

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

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

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

.code-example {
    max-width: 700px;
    margin: 0 auto;
    background: var(--dark);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.code-example pre {
    margin: 0;
}

.code-example code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.95rem;
    line-height: 1.8;
    -webkit-overflow-scrolling: touch;
}

.comment {
    color: #94a3b8;
}

/* Sections */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 700;
}

/* Features */
.features {
    background: var(--white);
}

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

.feature-card {
    padding: 2rem;
    background: var(--white);
    border-radius: 1rem;
    border: 1px solid var(--light-gray);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

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

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray);
}

.pro-badge {
    background: var(--gradient);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Packages */
.packages {
    background: var(--light-gray);
}

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

.package-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.package-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.package-version {
    color: var(--gray);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.package-card p {
    color: var(--gray);
    margin-bottom: 1rem;
}

.package-install {
    background: var(--dark);
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

.package-install code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Get Started */
.get-started {
    background: var(--white);
}

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

.step {
    text-align: center;
}

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

.step h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.step pre {
    background: var(--dark);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: left;
    overflow-x: auto;
}

.step code {
    color: #e2e8f0;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.875rem;
}

/* Pricing */
.pricing {
    background: var(--light-gray);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    position: relative;
}

.pricing-card.featured {
    border: 3px solid var(--primary);
    transform: scale(1.05);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.price {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price span {
    font-size: 1rem;
    color: var(--gray);
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
}

.features-list li {
    padding: 0.5rem 0;
    color: var(--gray);
}

/* Documentation */
.docs {
    background: var(--white);
}

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

.doc-card {
    padding: 2rem;
    background: var(--white);
    border-radius: 1rem;
    border: 1px solid var(--light-gray);
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s;
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.doc-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.doc-card p {
    color: var(--gray);
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section p {
    color: #94a3b8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Responsive */

/* Large tablets and small desktops */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .packages-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .nav-menu {
        gap: 1rem;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1rem;
        font-size: 0.9rem;
    }
}

/* Tablets and larger phones */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .logo h1 {
        font-size: 1.25rem;
    }

    /* Mobile Navigation */
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 5rem 0 2rem;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 102;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        padding: 1rem 2rem;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid var(--light-gray);
    }

    .nav-menu a:hover {
        background: var(--light-gray);
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 101;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    /* Hero Section */
    .hero {
        padding: 4rem 0;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-large {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
        width: 100%;
    }

    .code-example {
        padding: 1.5rem;
    }

    .code-example code {
        font-size: 0.85rem;
    }

    /* Sections */
    section {
        padding: 3rem 0;
    }

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

    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem;
    }

    .feature-icon {
        font-size: 2.5rem;
    }

    /* Packages */
    .packages-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .package-card {
        padding: 1.5rem;
    }

    /* Steps */
    .steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .step pre {
        padding: 1rem;
    }

    /* Documentation */
    .docs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .doc-card {
        padding: 1.5rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }

    .pricing-card.featured {
        transform: scale(1);
    }
}

/* Small phones */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    /* Hero */
    .hero {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .code-example {
        padding: 1rem;
        border-radius: 0.5rem;
    }

    .code-example code {
        font-size: 0.75rem;
        line-height: 1.6;
    }

    /* Sections */
    section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    /* Cards */
    .feature-card,
    .package-card,
    .doc-card {
        padding: 1.25rem;
    }

    .feature-card h3,
    .package-card h3 {
        font-size: 1.25rem;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-large {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer {
        padding: 2rem 0 1rem;
    }

    /* Step numbers */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
        margin: 0 auto 1rem;
    }

    .step h3 {
        font-size: 1.25rem;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.75rem;
    }

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

    .logo h1 {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 0.75rem;
    }
}
