/* ==================== x402 PAGE STYLES ==================== */

/* Hero */
.x402-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 168px 0 80px;
    overflow: hidden;
}

.x402-hero .container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.x402-hero-content .hero-badge {
    margin-bottom: 24px;
}

.x402-protocol-tag {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    background: rgba(56, 239, 125, 0.08);
    border: 1px solid rgba(56, 239, 125, 0.25);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #38ef7d;
    font-family: 'Monaco', 'Courier New', monospace;
    margin-bottom: 32px;
}

.x402-protocol-tag .protocol-dot {
    width: 6px;
    height: 6px;
    background: #38ef7d;
    border-radius: 50%;
    animation: statusPulse 2s ease-in-out infinite;
}

.x402-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
}

.x402-title .title-402 {
    background: linear-gradient(135deg, #38ef7d 0%, #4facfe 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.x402-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 520px;
}

.x402-hero-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.btn-docs {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    color: #000;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 12px 40px rgba(56, 239, 125, 0.3);
}

.btn-docs:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 50px rgba(56, 239, 125, 0.45);
}

.btn-docs svg {
    width: 18px;
    height: 18px;
}

.btn-npm {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    font-family: 'Monaco', 'Courier New', monospace;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-npm:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.x402-stats {
    display: flex;
    gap: 40px;
}

.x402-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.x402-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
}

.x402-stat-value.green {
    color: #38ef7d;
}

.x402-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Hero Terminal */
.x402-hero-visual .terminal {
    max-width: 520px;
}

.x402-hero-visual .terminal-body {
    min-height: 320px;
}

.output-warning {
    color: #ffbd2e;
}

.output-payment {
    color: #f093fb;
}

.output-dim {
    color: var(--text-muted);
}

/* ==================== HOW x402 WORKS ==================== */
.x402-flow {
    padding: var(--section-padding) 0;
}

.flow-diagram {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.flow-diagram::before {
    content: '';
    position: absolute;
    top: 60px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, rgba(56, 239, 125, 0.3), rgba(102, 126, 234, 0.3), rgba(240, 147, 251, 0.3), rgba(79, 172, 254, 0.3));
    z-index: 0;
}

.flow-step {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 32px 20px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.flow-step:hover {
    transform: translateY(-8px);
    border-color: rgba(56, 239, 125, 0.4);
    box-shadow: 0 20px 60px rgba(56, 239, 125, 0.1);
}

.flow-step-number {
    width: 48px;
    height: 48px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #38ef7d 0%, #11998e 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 800;
    color: #000;
    box-shadow: 0 8px 24px rgba(56, 239, 125, 0.3);
}

.flow-step-icon {
    font-size: 32px;
    margin-bottom: 16px;
}

.flow-step h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.flow-step p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.flow-step .http-code {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255, 189, 46, 0.1);
    border: 1px solid rgba(255, 189, 46, 0.3);
    border-radius: 6px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #ffbd2e;
    margin-top: 12px;
}

/* ==================== PRODUCTS SECTION ==================== */
.x402-products {
    padding: var(--section-padding) 0;
}

.products-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.product-card {
    position: relative;
    padding: 48px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: all 0.3s ease;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
}

.product-card.proxy::before {
    background: linear-gradient(90deg, #38ef7d, #4facfe);
}

.product-card.vpn::before {
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.product-card:hover {
    transform: translateY(-8px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.product-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 28px;
}

.product-card.proxy .product-icon {
    background: linear-gradient(135deg, rgba(56, 239, 125, 0.15), rgba(79, 172, 254, 0.15));
    border: 1px solid rgba(56, 239, 125, 0.3);
}

.product-card.vpn .product-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.product-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.product-card.proxy .product-label {
    color: #38ef7d;
}

.product-card.vpn .product-label {
    color: var(--primary);
}

.product-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 12px;
}

.product-card > p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 32px;
}

.product-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 32px;
}

.product-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.product-feature svg {
    width: 18px;
    height: 18px;
    color: #38ef7d;
    flex-shrink: 0;
}

.product-endpoint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    color: var(--text-secondary);
}

.product-endpoint .method {
    color: #38ef7d;
    font-weight: 700;
}

/* ==================== PRICING ==================== */
.x402-pricing {
    padding: var(--section-padding) 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.pricing-card {
    position: relative;
    padding: 40px 32px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    transform: translateY(-8px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
}

.pricing-card.featured {
    border-color: rgba(56, 239, 125, 0.4);
    background: rgba(56, 239, 125, 0.04);
}

.pricing-card.featured:hover {
    border-color: rgba(56, 239, 125, 0.6);
    box-shadow: 0 20px 60px rgba(56, 239, 125, 0.15);
}

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 18px;
    background: linear-gradient(135deg, #38ef7d, #11998e);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.pricing-product {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.pricing-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
}

.pricing-amount {
    margin-bottom: 8px;
}

.pricing-amount .price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 48px;
    font-weight: 800;
    background: linear-gradient(135deg, #38ef7d, #4facfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-amount .currency {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: 4px;
}

.pricing-period {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.pricing-divider {
    width: 100%;
    height: 1px;
    background: var(--border-color);
    margin-bottom: 24px;
}

.pricing-features {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.pricing-feature svg {
    width: 16px;
    height: 16px;
    color: #38ef7d;
    flex-shrink: 0;
}

/* ==================== CODE EXAMPLE ==================== */
.x402-code {
    padding: var(--section-padding) 0;
}

.code-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.code-block {
    position: relative;
}

.code-block .terminal {
    height: 100%;
}

.code-block .terminal-body {
    padding: 24px;
    font-size: 13px;
    line-height: 1.8;
}

.code-block .terminal-body .line-comment {
    color: var(--text-muted);
}

.code-block .terminal-body .line-keyword {
    color: #f093fb;
}

.code-block .terminal-body .line-string {
    color: #38ef7d;
}

.code-block .terminal-body .line-var {
    color: #4facfe;
}

.code-block .terminal-body .line-method {
    color: #ffbd2e;
}

.code-block .terminal-body .line-plain {
    color: var(--text-primary);
}

/* ==================== INTEGRATION ==================== */
.x402-integration {
    padding: var(--section-padding) 0;
}

.integration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.integration-card {
    padding: 40px 32px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    transition: all 0.3s ease;
}

.integration-card:hover {
    transform: translateY(-8px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.15);
}

.integration-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}

.integration-card:nth-child(1) .integration-icon {
    background: linear-gradient(135deg, rgba(56, 239, 125, 0.15), rgba(17, 153, 142, 0.15));
    border: 1px solid rgba(56, 239, 125, 0.3);
}

.integration-card:nth-child(2) .integration-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.integration-card:nth-child(3) .integration-icon {
    background: linear-gradient(135deg, rgba(240, 147, 251, 0.15), rgba(245, 87, 108, 0.15));
    border: 1px solid rgba(240, 147, 251, 0.3);
}

.integration-card h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.integration-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 24px;
}

.integration-code {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: left;
    overflow-x: auto;
    white-space: nowrap;
}

/* ==================== CTA ==================== */
.x402-cta {
    padding: 80px 0 120px;
}

.x402-cta-card {
    position: relative;
    padding: 80px 60px;
    border-radius: 30px;
    overflow: hidden;
    text-align: center;
}

.x402-cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 30px;
}

.x402-cta-glow-1 {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    background: linear-gradient(135deg, #38ef7d, #11998e);
    top: -200px;
    right: -100px;
}

.x402-cta-glow-2 {
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.2;
    background: var(--gradient-primary);
    bottom: -180px;
    left: -100px;
}

.x402-cta-inner {
    position: relative;
    z-index: 1;
}

.x402-cta-inner h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 44px;
    font-weight: 800;
    margin-bottom: 16px;
}

.x402-cta-inner p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.x402-cta-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .x402-hero .container {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .x402-hero-visual {
        order: -1;
    }

    .flow-diagram {
        grid-template-columns: repeat(2, 1fr);
    }

    .flow-diagram::before {
        display: none;
    }

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

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

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

@media (max-width: 768px) {
    .x402-title {
        font-size: 42px;
    }

    .x402-hero {
        padding: 140px 0 60px;
    }

    .x402-hero-actions {
        flex-direction: column;
    }

    .x402-stats {
        flex-direction: column;
        gap: 20px;
    }

    .flow-diagram {
        grid-template-columns: 1fr;
    }

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

    .x402-cta-card {
        padding: 48px 24px;
    }

    .x402-cta-inner h2 {
        font-size: 32px;
    }

    .x402-cta-actions {
        flex-direction: column;
    }

    .docs-api-grid {
        grid-template-columns: 1fr !important;
    }

    .docs-cost-table table {
        font-size: 13px;
    }
}

/* ========== Documentation Section ========== */

.x402-docs {
    padding: 120px 0;
    position: relative;
}

.docs-block {
    margin-bottom: 64px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    padding: 40px;
}

.docs-block-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.docs-icon {
    font-size: 28px;
}

.docs-desc {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 24px;
}

.docs-tip {
    margin-top: 20px;
    padding: 16px 20px;
    background: rgba(56, 239, 125, 0.06);
    border: 1px solid rgba(56, 239, 125, 0.15);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
}

.docs-tip strong {
    color: #38ef7d;
}

/* Cost comparison table */
.docs-cost-table {
    margin-top: 24px;
    overflow-x: auto;
}

.docs-cost-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.docs-cost-table th {
    text-align: left;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.docs-cost-table td {
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.winner-proxy { color: #38ef7d; font-weight: 600; }
.winner-vpn { color: #7c4dff; font-weight: 600; }
.winner-tie { color: rgba(255, 255, 255, 0.5); }

/* API Reference grid */
.docs-api-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
}

.docs-api-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    transition: border-color 0.2s;
}

.docs-api-card:hover {
    border-color: rgba(56, 239, 125, 0.2);
}

.docs-api-card.paid {
    border-color: rgba(56, 239, 125, 0.12);
}

.docs-api-card.free {
    border-color: rgba(255, 255, 255, 0.08);
}

.api-method {
    display: inline-block;
    font-family: 'Space Grotesk', monospace;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(56, 239, 125, 0.12);
    color: #38ef7d;
    margin-right: 8px;
}

.api-path {
    display: inline;
    font-family: 'Space Grotesk', monospace;
    font-size: 14px;
    color: #fff;
    font-weight: 500;
}

.api-price {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
}

.docs-api-card.paid .api-price {
    color: #38ef7d;
}

.docs-api-card p {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.5;
}
