@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Space+Mono:wght@400;700&display=swap');

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

:root {
    --neon-green: #00ff88;
    --neon-cyan: #00d9ff;
    --neon-pink: #ff0080;
    --neon-yellow: #fbbf24;
    --dark-bg: #0a0a0a;
    --dark-card: #111111;
    --grid-color: rgba(0, 255, 136, 0.1);
    --font-mono: 'JetBrains Mono', 'Space Mono', monospace;
}

body {
    background: var(--dark-bg);
    color: var(--neon-green);
    font-family: var(--font-mono);
    overflow-x: hidden;
    position: relative;
}

/* Animated grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Glitch effect */
.glitch {
    position: relative;
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 90%, 100% {
        transform: translate(0);
        opacity: 1;
    }
    92% {
        transform: translate(-2px, 2px);
        opacity: 0.8;
    }
    94% {
        transform: translate(2px, -2px);
        opacity: 0.8;
    }
}

/* Terminal cursor */
.cursor {
    display: inline-block;
    width: 10px;
    height: 20px;
    background: var(--neon-green);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Main container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Terminal header */
.terminal-header {
    border: 2px solid var(--neon-green);
    background: rgba(17, 17, 17, 0.95);
    padding: 30px;
    padding-right: 220px; /* Make room for wallet button */
    margin-bottom: 40px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
    position: relative;
}

.terminal-header::before {
    content: 'SYSTEM.ONLINE';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--dark-bg);
    padding: 0 10px;
    font-size: 12px;
    color: var(--neon-cyan);
}

.logo {
    font-size: 48px;
    font-weight: 700;
    text-shadow: 0 0 10px var(--neon-green), 0 0 20px var(--neon-green);
    margin-bottom: 10px;
}

.tagline {
    color: var(--neon-cyan);
    font-size: 18px;
    opacity: 0.9;
}

.header-logo {
    width: 44px;
    height: 44px;
    vertical-align: -0.1em;
    margin-left: -24px;
    opacity: 0.95;
    filter: drop-shadow(0 0 6px var(--neon-green));
}

.status-line {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    font-size: 14px;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--neon-green);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

/* Section styling */
.section {
    margin-bottom: 60px;
}

.section-title {
    font-size: 32px;
    color: var(--neon-pink);
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--neon-pink);
}

.section-title::before {
    content: '> ';
    color: var(--neon-cyan);
}

/* Demo section */
.demo-container {
    background: var(--dark-card);
    border: 2px solid var(--neon-cyan);
    padding: 30px;
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.2);
}

.file-upload {
    border: 2px dashed var(--neon-green);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 20px;
}

.file-upload:hover {
    border-color: var(--neon-cyan);
    background: rgba(0, 217, 255, 0.05);
}

.file-upload input[type="file"] {
    display: none;
}

.tier-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tier-btn {
    flex: 1;
    padding: 15px;
    background: var(--dark-card);
    border: 2px solid var(--grid-color);
    color: var(--neon-green);
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.tier-btn:hover, .tier-btn.active {
    border-color: var(--neon-cyan);
    background: rgba(0, 217, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.execute-btn {
    width: 100%;
    padding: 20px;
    background: linear-gradient(135deg, var(--neon-green), var(--neon-cyan));
    border: none;
    color: var(--dark-bg);
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.execute-btn:hover {
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.5);
    transform: translateY(-2px);
}

.execute-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Results display */
.results {
    margin-top: 30px;
    padding: 20px;
    background: var(--dark-bg);
    border: 1px solid var(--neon-green);
    max-height: 500px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.6;
}

.results::-webkit-scrollbar {
    width: 10px;
}

.results::-webkit-scrollbar-track {
    background: var(--dark-card);
}

.results::-webkit-scrollbar-thumb {
    background: var(--neon-green);
}

/* Pricing tiers */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

.pricing-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.tier-card {
    background: var(--dark-card);
    border: 2px solid;
    padding: 30px;
    position: relative;
    transition: all 0.3s;
}

.tier-card:nth-child(1) {
    border-color: var(--neon-green);
}

.tier-card:nth-child(2) {
    border-color: var(--neon-cyan);
}

.tier-card:nth-child(3) {
    border-color: var(--neon-pink);
}

.tier-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.tier-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.tier-price {
    font-size: 36px;
    margin: 20px 0;
    color: var(--neon-yellow);
}

.tier-features {
    list-style: none;
    margin-top: 20px;
}

.tier-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--grid-color);
}

.tier-features li::before {
    content: '✓ ';
    color: var(--neon-green);
    margin-right: 10px;
}

/* Code block */
.code-block {
    background: var(--dark-bg);
    border: 1px solid var(--neon-cyan);
    padding: 20px;
    margin: 20px 0;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.6;
}

.code-block::before {
    content: '$ ';
    color: var(--neon-pink);
}

/* Stats bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.stat-box {
    background: var(--dark-card);
    border-left: 4px solid var(--neon-cyan);
    padding: 20px;
    text-align: center;
}

.stat-value {
    font-size: 36px;
    color: var(--neon-yellow);
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: var(--neon-cyan);
    margin-top: 5px;
    text-transform: uppercase;
}

/* Footer */
.footer {
    border-top: 2px solid var(--neon-green);
    padding: 30px;
    text-align: center;
    margin-top: 60px;
    color: var(--neon-cyan);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-links a {
    color: var(--neon-green);
    text-decoration: none;
    transition: all 0.3s;
}

.footer-links a:hover {
    color: var(--neon-cyan);
    text-shadow: 0 0 10px var(--neon-cyan);
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .tier-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .container {
        padding: 20px 15px;
        overflow-x: hidden;
    }

    /* Fix overflowing sections */
    .section {
        overflow-x: hidden;
    }

    .section > div {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Force all inline grids to single column */
    .section div[style*="grid-template-columns"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    .tier-grid,
    .tier-grid[style],
    .pricing-grid,
    .comparison-grid,
    .benefits-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        gap: 15px !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .pricing-grid .tier-card,
    .comparison-grid > div,
    .benefits-grid > div {
        width: 100% !important;
        max-width: 100% !important;
    }

    .stats-bar {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .logo {
        font-size: 28px;
    }

    .header-logo {
        width: 28px;
        height: 28px;
        margin-left: 8px;
        vertical-align: middle;
    }

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

    .tagline {
        font-size: 14px;
    }

    .terminal-header {
        padding: 20px;
        padding-right: 20px;
    }

    .wallet-section {
        position: relative;
        top: auto;
        right: auto;
        margin-bottom: 15px;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }

    .wallet-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .wallet-address {
        font-size: 10px;
        padding: 6px 8px;
    }

    .status-line {
        flex-wrap: wrap;
        gap: 10px;
        font-size: 12px;
    }

    .section-title {
        font-size: 24px;
    }

    .tier-selector {
        flex-direction: column !important;
    }

    .tier-selector .tier-btn {
        flex: none !important;
        width: 100% !important;
        padding: 12px;
    }

    .tier-card {
        padding: 20px;
    }

    .tier-name {
        font-size: 20px;
    }

    .tier-price {
        font-size: 24px !important;
    }

    .demo-container {
        padding: 15px;
    }

    .file-upload {
        padding: 25px 15px;
    }

    .execute-btn {
        padding: 15px;
        font-size: 14px;
    }

    .code-block {
        padding: 15px;
        font-size: 11px;
        word-break: break-all;
    }

    /* Fix inline grid layouts */
    .section > div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: 1fr !important;
    }

    .section > div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: 1fr !important;
    }

    /* Comparison section */
    .section div[style*="repeat(3, 1fr)"] {
        display: block !important;
    }

    .section div[style*="repeat(3, 1fr)"] > div {
        margin-bottom: 15px;
    }

    /* Benefits section */
    .section div[style*="repeat(2, 1fr)"] {
        display: block !important;
    }

    .section div[style*="repeat(2, 1fr)"] > div {
        margin-bottom: 15px;
    }

    /* Payment info panel */
    .payment-info > div {
        flex-direction: column !important;
        gap: 15px;
    }

    .payment-info > div > div:last-child {
        text-align: left !important;
    }

    /* Results section */
    .results {
        font-size: 11px;
        max-height: 400px;
    }

    /* FAQ */
    details summary {
        font-size: 13px;
        padding: 12px 15px !important;
    }

    details > div {
        padding: 12px 15px !important;
        font-size: 13px !important;
    }

    /* Footer */
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    /* Stat boxes */
    .stat-value {
        font-size: 24px;
    }

    .stat-label {
        font-size: 10px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .logo {
        font-size: 22px;
    }

    .header-logo {
        width: 24px;
        height: 24px;
        margin-left: 6px;
    }

    .tagline {
        font-size: 12px;
    }

    .section-title {
        font-size: 20px;
    }

    .stats-bar {
        grid-template-columns: 1fr !important;
    }

    .tier-price {
        font-size: 20px !important;
    }

    .stat-box {
        padding: 15px;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--neon-green);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Wallet UI Styles */
.wallet-section {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wallet-btn {
    padding: 10px 20px;
    background: transparent;
    border: 2px solid var(--neon-pink);
    color: var(--neon-pink);
    font-family: var(--font-mono);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
}

.wallet-btn:hover {
    background: rgba(255, 0, 128, 0.1);
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.3);
}

.wallet-btn.connected {
    border-color: var(--neon-green);
    color: var(--neon-green);
}

.wallet-btn.connected:hover {
    background: rgba(0, 255, 136, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

.wallet-address {
    font-size: 12px;
    color: var(--neon-cyan);
    background: var(--dark-bg);
    padding: 8px 12px;
    border: 1px solid var(--grid-color);
}

.payment-info {
    background: var(--dark-bg);
    border: 1px solid var(--neon-yellow);
    padding: 15px;
    margin-bottom: 20px;
    display: none;
}

.payment-info.visible {
    display: block;
}

.payment-info .amount {
    font-size: 24px;
    color: var(--neon-yellow);
    font-weight: 700;
}

.execute-btn.pay-mode {
    background: linear-gradient(135deg, var(--neon-yellow), var(--neon-pink));
}
