/* ZAP Pricing - Three.js Neural Network Theme */
/* Inspired by modern SaaS designs: Linear, Vercel, Stripe */

@import url('https://unpkg.com/aos@next/dist/aos.css');

:root {
    /* Dark theme */
    --bg-primary: #0a0e1a;
    --bg-secondary: #0f1419;
    --bg-card: rgba(20, 24, 36, 0.4);
    --bg-card-hover: rgba(26, 31, 53, 0.6);
    
    /* Brand colors */
    --nano-color: #3b82f6;
    --bolt-color: #8b5cf6;
    --storm-color: #ec4899;
    --accent: #06b6d4;
    --yellow: #fbbf24;
    
    /* Text */
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, 
        #0a0e1a 0%,
        #1a1f3a 25%,
        #1e293b 50%,
        #0f172a 75%,
        #0a0e1a 100%
    );
    /* Add radial gradient overlay for depth */
    background-image: 
        radial-gradient(ellipse at top left, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(59, 130, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at top right, rgba(6, 182, 212, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #0a0e1a 0%, #1a1f3a 25%, #1e293b 50%, #0f172a 75%, #0a0e1a 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Container */
.zap-pricing-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 20px;
    position: relative;
    z-index: 1;
}

/* Three.js Canvas Background - Only behind pricing area */
#threejs-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.7; /* Subtle background bolt */
}

/* Header */
.zap-pricing-header {
    text-align: center;
    margin-bottom: 80px;
}

.zap-pricing-header h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #f9fafb 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.zap-pricing-header p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Founding Banner - Glassmorphism */
.zap-founding-banner {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.1),
        rgba(6, 182, 212, 0.1)
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.zap-founding-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    animation: rotateBg 20s linear infinite;
}

@keyframes rotateBg {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.banner-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.banner-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.banner-content p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 8px 0;
}

.zap-spots-left {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--yellow);
    text-shadow: 0 0 30px rgba(251, 191, 36, 0.6);
    display: inline-block;
    padding: 0 12px;
}

/* Pricing Cards Grid */
.zap-pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 32px;
    margin-bottom: 60px;
}

/* Card - Advanced Glassmorphism */
.zap-pricing-card {
    background: var(--glass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 0;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Wireframe Overlay */
.card-wireframe {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.zap-pricing-card:hover .card-wireframe {
    opacity: 1;
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 1;
    padding: 48px 40px;
}

/* Featured Card */
.zap-pricing-card.featured {
    border-color: var(--bolt-color);
    border-width: 2px;
    transform: scale(1.05);
}

.zap-pricing-card.featured:hover {
    transform: scale(1.08);
}

/* Popular Badge */
.popular-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1px;
    text-transform: uppercase;
    z-index: 2;
    box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

/* Hover Effects - Tier Specific */
.zap-pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.4);
}

.nano:hover {
    border-color: var(--nano-color);
    box-shadow: 0 24px 80px rgba(59, 130, 246, 0.3);
}

.bolt:hover {
    border-color: var(--bolt-color);
    box-shadow: 0 24px 80px rgba(139, 92, 246, 0.3);
}

.storm:hover {
    border-color: var(--storm-color);
    box-shadow: 0 24px 80px rgba(236, 72, 153, 0.3);
}

/* Hexagonal Icon */
.card-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 24px;
    position: relative;
    cursor: pointer;
}

.card-icon svg {
    width: 100%;
    height: 100%;
    color: var(--text-primary);
    display: block;
}

/* Crystal Wireframe Bolt SVG Icons */
.bolt-svg {
    image-rendering: crisp-edges;
    shape-rendering: geometricPrecision;
}

/* Bolt group animation - only the bolt moves, not the background */
.bolt-group {
    transition: transform 0.3s ease;
    transform-origin: 50% 50%;
}

/* Bolt hover animation - subtle movement like main pricing cards */
.card-icon:hover .bolt-group {
    transform: translate(9px, -3px) scale(0.7) translate(-9px, 3px) translateY(-2px) rotate(-2deg);
}

.crystal-bolt {
    transition: all 0.3s ease;
}

/* Crystal shimmer animation */
.nano-crystal {
    animation: crystalShimmer 3s ease-in-out infinite;
}

.bolt-crystal {
    animation: crystalShimmer 2.5s ease-in-out infinite;
}

.storm-crystal {
    animation: crystalShimmer 3.5s ease-in-out infinite;
}

@keyframes crystalShimmer {
    0%, 100% {
        opacity: 0.3;
        stroke-opacity: 0.8;
    }
    50% {
        opacity: 0.5;
        stroke-opacity: 1;
    }
}

/* Crystal glow on hover */
.card-icon:hover .crystal-bolt {
    opacity: 0.6 !important;
    stroke-opacity: 1 !important;
}

/* Crystal energy field */
.card-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, currentColor 0%, transparent 70%);
    opacity: 0;
    animation: crystalPulse 3s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    mix-blend-mode: screen;
    will-change: transform, opacity;
}

@keyframes crystalPulse {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 0.2;
    }
}

.nano .card-icon::after {
    color: rgba(96, 165, 250, 0.5);
}

.bolt .card-icon::after {
    color: rgba(167, 139, 250, 0.6);
    animation-duration: 2.5s;
}

.storm .card-icon::after {
    color: rgba(244, 114, 182, 0.6);
    animation-duration: 3.5s;
}

.hexagon-svg {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: drawHexagon 2s ease-out forwards;
}

@keyframes drawHexagon {
    to {
        stroke-dashoffset: 0;
    }
}

.nano .card-icon svg {
    color: var(--nano-color);
}

.bolt .card-icon svg {
    color: var(--bolt-color);
}

.storm .card-icon svg {
    color: var(--storm-color);
}

.card-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.card-tagline {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-weight: 400;
}

/* Price */
.price-wrapper {
    margin-bottom: 32px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 20px;
}

.currency {
    font-size: 2rem;
    font-weight: 700;
    margin-right: 4px;
}

.amount {
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.03em;
}

.period {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-left: 8px;
}

/* Founding Price */
.founding-price {
    background: linear-gradient(135deg, 
        rgba(6, 182, 212, 0.15),
        rgba(59, 130, 246, 0.15)
    );
    border: 1px solid rgba(6, 182, 212, 0.3);
    border-radius: 16px;
    padding: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.founding-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.founding-amount {
    font-size: 2rem;
    font-weight: 900;
    color: var(--yellow);
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

.founding-badge {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
}

/* Features List */
.features-list {
    list-style: none;
    margin: 0 0 32px 0;
    padding: 0;
}

.features-list li {
    padding: 12px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.features-list li:hover {
    color: var(--text-primary);
    transform: translateX(4px);
    border-bottom-color: rgba(59, 130, 246, 0.2);
}

.features-list .icon {
    color: var(--accent);
    font-weight: bold;
    flex-shrink: 0;
}

/* CTA Button */
.cta-button {
    width: 100%;
    padding: 18px 32px;
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.button-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.cta-button:hover .button-arrow {
    transform: translateX(4px);
}

/* Tier-specific buttons */
.nano .cta-button {
    background: transparent;
    border-color: rgba(59, 130, 246, 0.3);
    color: white;
}

.nano .cta-button:hover {
    background: transparent;
    border-color: var(--nano-color);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), inset 0 0 20px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.bolt .cta-button {
    background: transparent;
    border-color: rgba(139, 92, 246, 0.3);
    color: white;
}

.bolt .cta-button:hover {
    background: transparent;
    border-color: var(--bolt-color);
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.3), inset 0 0 20px rgba(139, 92, 246, 0.1);
    transform: translateY(-2px);
}

.storm .cta-button {
    background: transparent;
    border-color: rgba(236, 72, 153, 0.3);
    color: white;
}

.storm .cta-button:hover {
    background: transparent;
    border-color: var(--storm-color);
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.3), inset 0 0 20px rgba(236, 72, 153, 0.1);
    transform: translateY(-2px);
}

.cta-button:active {
    transform: scale(0.98);
}

/* Setup Fee & Best For */
.setup-fee {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.setup-fee .waived {
    color: var(--accent);
    font-weight: 600;
}

.best-for {
    text-align: center;
    margin-top: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-style: italic;
}

/* Trust Badges */
.zap-trust-badges {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    padding: 48px 32px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
}

.zap-trust-badges .badge {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.zap-trust-badges .badge:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.zap-trust-badges .badge .icon {
    font-size: 1.5rem;
    color: var(--accent);
}

/* Responsive */
@media (max-width: 1200px) {
    .zap-pricing-cards {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
    
    .zap-pricing-card.featured {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .zap-pricing-container {
        padding: 60px 20px;
    }

    .zap-pricing-header h1 {
        font-size: 2.5rem;
    }

    .zap-pricing-cards {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .amount {
        font-size: 4rem;
    }

    .card-content {
        padding: 36px 28px;
    }

    .zap-trust-badges {
        gap: 20px;
        padding: 32px 20px;
    }
}

/* Server Options */
.server-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0;
}

.server-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.server-options label:hover {
    border-color: var(--nano-color);
    background: rgba(59, 130, 246, 0.05);
}

.server-options label.dify-option {
    border-color: rgba(139, 92, 246, 0.3);
}

.server-options label.dify-option:hover {
    border-color: var(--bolt-color);
    background: rgba(139, 92, 246, 0.05);
}

.server-options label.dify-option span {
    background: linear-gradient(135deg, var(--bolt-color), var(--storm-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 600;
}

.server-options input[type="radio"] {
    accent-color: var(--nano-color);
    width: 18px;
    height: 18px;
}

.bolt .server-options input[type="radio"] {
    accent-color: var(--bolt-color);
}

.storm .server-options input[type="radio"] {
    accent-color: var(--storm-color);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
