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

html {
    scroll-behavior: smooth;
    /* Support for notched phones */
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* Improve touch interactions */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices - larger tap targets */
    a, button, .tier-card, .source-tab, details summary {
        min-height: 44px;
    }

    /* Disable hover effects on touch */
    .price-card:hover,
    .db-card:hover,
    .tier-card:hover,
    .btn:hover {
        transform: none;
    }

    /* Add active state for touch feedback */
    .btn:active,
    .tier-card:active,
    .price-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

:root {
    --bg-dark: #0a0e17;
    --bg-card: #111827;
    --bg-card-hover: #1f2937;
    --accent-blue: #3b82f6;
    --accent-indigo: #6366f1;
    --accent-violet: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #1e293b;
    --gradient-primary: linear-gradient(135deg, #3b82f6, #8b5cf6);
    --gradient-hero: linear-gradient(135deg, #0a0e17 0%, #1e1b4b 50%, #0a0e17 100%);
}

body {
    background: var(--bg-dark);
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hero with animated vectors */
.hero {
    min-height: auto;
    padding: 140px 0 80px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-hero);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Code animation canvas */
.code-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Subtle grid overlay */
.coord-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse at center, black 10%, transparent 60%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 40px;
}

.hero-content.hero-split {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    max-width: 1400px;
    align-items: center;
    text-align: left;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.hero-text .logo-mark {
    margin-bottom: 24px;
}

.hero-text .hero-cta {
    justify-content: flex-start;
}

.hero-text .stats-row {
    justify-content: flex-start;
    border-top: none;
    padding-top: 0;
    margin-top: 40px;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    margin-bottom: 30px;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.3);
}

.logo-mark svg {
    width: 48px;
    height: 48px;
    stroke: white;
    stroke-width: 2;
    fill: none;
}

.hero h1 {
    font-size: clamp(48px, 8vw, 72px);
    font-weight: 700;
    letter-spacing: -2px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--accent-indigo);
}

/* Stats row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-color);
}

.stat {
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Hero pricing integration */
.hero-pricing {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent !important;
    padding: 0 !important;
}

.hero-pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.price-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
}

.hero-pricing .price-card {
    position: relative;
    background: rgba(255, 255, 255, 0.05);
    padding: 24px 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    box-shadow: none;
    overflow: visible;
}

.hero-pricing .price-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-4px);
    box-shadow: none;
}

.hero-pricing .price-card.featured {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(99, 102, 241, 0.3);
}

.hero-pricing .price-card.featured::before {
    content: 'POPULAR';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444);
    background-size: 200% 100%;
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 12px;
    animation: shimmer 2s ease-in-out infinite, pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
    z-index: 10;
}

.hero-pricing .price-card.featured:hover {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.5);
}

.hero-pricing .price-card .price-tier-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.hero-pricing .price-card .price-amount {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff 0%, #a5b4fc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-pricing .price-card .price-unit {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 16px;
    margin-top: 4px;
}

.hero-pricing .price-card .price-features {
    margin: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 16px;
}

.hero-pricing .price-card .price-features li {
    padding: 5px 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.hero-pricing .price-card .price-features li::before {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 20px 40px;
    /* Safe area support for notched phones */
    padding-top: max(20px, env(safe-area-inset-top));
    padding-left: max(40px, env(safe-area-inset-left));
    padding-right: max(40px, env(safe-area-inset-right));
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(10, 14, 23, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo svg {
    width: 32px;
    height: 32px;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

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

.wallet-btn {
    padding: 10px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.wallet-btn:hover {
    border-color: var(--accent-indigo);
    background: var(--bg-card-hover);
}

.wallet-btn.connected {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

.wallet-balance {
    margin-left: 8px;
    padding: 2px 8px;
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

/* Hamburger menu - hidden on desktop */
.hamburger {
    display: none;
}

/* Main container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Sections */
section {
    padding: 120px 0;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-indigo);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 16px;
}

.section-label::before {
    content: '';
    width: 20px;
    height: 2px;
    background: var(--accent-indigo);
}

.section-title {
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 20px;
}

.section-desc {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 600px;
}

.section-desc.section-desc-wide {
    max-width: 100%;
    white-space: nowrap;
}

/* Demo Section */
#demo {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0f172a 100%);
}

.demo-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 40px;
    margin-top: 60px;
}

.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 30px;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone input {
    display: none;
}

.upload-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    stroke: var(--accent-indigo);
}

.upload-text {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-muted);
}

/* Options grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.option-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.option-group select {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    cursor: pointer;
}

.option-group select:focus {
    outline: none;
    border-color: var(--accent-indigo);
}

/* Tier cards */
.tier-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 30px;
}

.tier-card {
    padding: 20px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.tier-card:hover {
    border-color: var(--accent-indigo);
}

.tier-card.active {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.2);
}

.tier-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.tier-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-indigo);
    font-family: 'JetBrains Mono', monospace;
}

.tier-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.execute-btn {
    width: 100%;
    padding: 18px;
    font-size: 16px;
    font-weight: 600;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.execute-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
}

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

/* Results */
.results-panel {
    margin-top: 30px;
    padding: 24px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    display: none;
}

.results-panel.visible {
    display: block;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.results-stats {
    display: flex;
    gap: 30px;
}

.result-stat {
    text-align: left;
}

.result-stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.results-actions {
    display: flex;
    gap: 10px;
}

.results-actions button {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    transition: all 0.3s;
}

.btn-download {
    background: var(--accent-indigo);
    border: none;
    color: white;
}

.btn-copy {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.results-preview {
    max-height: 400px;
    overflow-y: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.8;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

/* Pricing Section */
/* #pricing moved into hero - no standalone section */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s;
    position: relative;
}

.price-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-indigo);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

.price-card.featured {
    border-color: var(--accent-indigo);
    background: linear-gradient(135deg, var(--bg-card) 0%, rgba(99, 102, 241, 0.1) 100%);
}

.price-card.featured::before {
    content: 'POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 6px 16px;
    background: linear-gradient(90deg, #ef4444, #f59e0b, #ef4444);
    background-size: 200% 100%;
    color: white;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 20px;
    animation: shimmer 2s ease-in-out infinite, pulse-glow 2s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.5);
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(245, 158, 11, 0.8), 0 0 50px rgba(239, 68, 68, 0.4);
    }
}


.price-tier-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.price-amount span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.price-unit {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 4px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-desc {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 16px 0 24px;
    min-height: 44px;
}

.price-features {
    list-style: none;
}

.price-features li {
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.price-features li::before {
    content: '';
    width: 18px;
    height: 18px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236366f1' stroke-width='2'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
    flex-shrink: 0;
}

/* Databases Section */
#databases {
    background: linear-gradient(180deg, var(--bg-dark) 0%, #0f172a 100%);
}

.db-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.db-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    transition: all 0.3s;
}

.db-card:hover {
    border-color: var(--accent-indigo);
    transform: translateY(-4px);
}

.db-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--bg-dark);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.db-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.db-desc {
    font-size: 14px;
    color: var(--text-muted);
}

/* Models section */
#models {
    background: var(--bg-dark);
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 60px;
}

.model-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 28px;
    display: flex;
    gap: 20px;
    transition: all 0.3s;
}

.model-card:hover {
    border-color: var(--accent-indigo);
}

.model-icon {
    width: 48px;
    height: 48px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.model-icon svg {
    width: 24px;
    height: 24px;
    stroke: white;
}

.model-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.model-info p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.model-dims {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--accent-cyan);
}

/* Footer */
footer {
    padding: 60px 0;
    /* Safe area support for notched phones */
    padding-bottom: max(60px, calc(40px + env(safe-area-inset-bottom)));
    border-top: 1px solid var(--border-color);
    text-align: center;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1280px) {
    .hero-pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .hero-content.hero-split {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .hero-text {
        align-items: center;
    }
    .hero-text .hero-cta {
        justify-content: center;
    }
    .hero-text .stats-row {
        justify-content: center;
    }
    .pricing-label {
        justify-content: center;
    }
    .hero-pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pricing-grid, .tier-selector {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-row {
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .hero-pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    nav {
        padding: 12px 16px;
        padding-top: max(12px, env(safe-area-inset-top));
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 14, 23, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 20px;
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
        gap: 0;
        border-bottom: 1px solid var(--border-color);
    }
    /* Support both .open and .active classes for mobile menu */
    .nav-links.open,
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
        font-size: 16px;
    }
    .nav-links a:last-child {
        border-bottom: none;
    }
    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 10px;
        z-index: 101;
        margin-left: auto;
        /* Touch-friendly tap target */
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }
    .hamburger span {
        width: 24px;
        height: 2px;
        background: var(--text-primary);
        transition: all 0.3s;
    }
    /* Support both .open and .active classes */
    .hamburger.open span:nth-child(1),
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .hamburger.open span:nth-child(2),
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.open span:nth-child(3),
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    /* Show wallet button on mobile - compact version */
    .wallet-btn {
        display: block;
        font-size: 11px;
        padding: 8px 12px;
        margin-right: 8px;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    /* Status indicator on tablet - hide text, keep dot */
    .status-indicator {
        padding: 4px 8px;
    }
    .status-text {
        display: none;
    }
    .container {
        padding: 0 16px;
    }
    section {
        padding: 60px 0;
    }
    .hero {
        padding: 100px 0 60px;
    }
    .hero-content {
        padding: 20px 16px;
    }
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 30px;
    }
    .pricing-grid, .db-grid, .models-grid {
        grid-template-columns: 1fr;
    }
    .tier-selector {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .options-grid {
        grid-template-columns: 1fr;
    }
    .stats-row {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 20px;
        justify-content: center;
    }
    .stat {
        flex: 1 1 80px;
        min-width: 80px;
    }
    .demo-card {
        padding: 20px 16px;
        margin-top: 30px;
    }
    .upload-zone {
        padding: 40px 20px;
    }
    .section-desc.section-desc-wide {
        white-space: normal;
    }
    /* Results panel mobile styles */
    .results-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 16px !important;
    }
    .results-stats {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .result-stat {
        text-align: center !important;
        padding: 12px;
        background: var(--bg-dark);
        border-radius: 8px;
    }
    .result-stat-value {
        font-size: 24px !important;
    }
    .results-actions {
        justify-content: stretch !important;
    }
    .results-actions button,
    .btn-download {
        width: 100%;
        text-align: center;
    }
    #resultsPreview {
        padding: 16px !important;
    }
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
    /* Inline-styled sections responsive overrides */
    .agents-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
    .model-detail-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    /* Model cards responsive */
    #models > .container > div > div {
        grid-template-columns: 1fr !important;
        padding: 20px !important;
    }
    /* Source tabs mobile */
    .source-tab {
        flex: 1;
        text-align: center;
    }
    /* FAQ mobile */
    details {
        padding: 16px !important;
    }
    details summary {
        font-size: 14px;
    }
    details p {
        font-size: 13px !important;
    }
    /* Scan progress mobile */
    #scanProgress {
        padding: 16px !important;
    }
    /* Footer mobile */
    footer {
        padding: 30px 20px !important;
    }
    footer > div:first-child {
        flex-direction: column !important;
        gap: 15px !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 32px;
        letter-spacing: -1px;
    }
    .hero-subtitle {
        font-size: 14px;
        line-height: 1.5;
    }
    .hero-pricing-grid {
        grid-template-columns: 1fr !important;
        gap: 12px;
    }
    .tier-selector {
        grid-template-columns: 1fr !important;
    }
    .tier-card {
        padding: 16px;
    }
    .btn {
        padding: 14px 20px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
        /* Touch-friendly tap target */
        min-height: 48px;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
    .stat-value {
        font-size: 20px;
    }
    .stat-label {
        font-size: 12px;
    }
    .section-title {
        font-size: 24px;
    }
    .section-desc {
        font-size: 14px;
    }
    .logo-mark {
        width: 60px;
        height: 60px;
    }
    .logo-mark svg {
        width: 36px;
        height: 36px;
    }
    /* Nav logo smaller on small screens */
    .nav-logo {
        font-size: 18px;
        flex-shrink: 0;
    }
    .nav-logo svg {
        width: 28px;
        height: 28px;
    }
    /* Hide status indicator on very small screens */
    .status-indicator {
        display: none;
    }
    /* Results panel extra small */
    .results-stats {
        grid-template-columns: 1fr 1fr !important;
    }
    .result-stat-value {
        font-size: 20px !important;
    }
    .result-stat-label {
        font-size: 10px !important;
    }
    /* Upload zone compact */
    .upload-zone {
        padding: 30px 16px;
    }
    .upload-icon {
        width: 48px;
        height: 48px;
    }
    .upload-text {
        font-size: 14px;
    }
    .upload-hint {
        font-size: 12px;
    }
    /* Execute button */
    .execute-btn {
        padding: 16px;
        font-size: 15px;
        min-height: 52px;
    }
    /* Price cards in hero */
    .hero-pricing .price-card {
        padding: 20px 16px;
    }
    .hero-pricing .price-card .price-amount {
        font-size: 24px;
    }
    .hero-pricing .price-card .price-features li {
        font-size: 11px;
    }
    /* Chain cards */
    .db-card {
        padding: 20px;
    }
    .db-icon {
        width: 48px;
        height: 48px;
    }
    .db-name {
        font-size: 16px;
    }
    /* Wallet button very compact */
    .wallet-btn {
        font-size: 10px;
        padding: 6px 10px;
        max-width: 100px;
    }
    /* Progress indicator mobile */
    #scanProgress > div:first-child {
        flex-direction: column !important;
        gap: 8px !important;
        text-align: center;
    }
    #progressTimer {
        font-size: 24px !important;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    margin-right: 10px;
}

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

/* Tier detail grids responsive */
@media (max-width: 768px) {
    /* Main tier cards layout */
    #tier-basic,
    #tier-pro {
        grid-template-columns: 1fr !important;
        padding: 24px !important;
    }
    #tier-basic > div:first-child,
    #tier-pro > div:first-child {
        flex-direction: row !important;
        justify-content: flex-start !important;
        gap: 16px !important;
        margin-bottom: 16px;
    }
    /* Stat grids in tier cards */
    #tier-basic > div:last-child > div:nth-last-child(2),
    #tier-pro > div:last-child > div:nth-last-child(2) {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    /* Use case grids */
    #tier-basic [style*="grid-template-columns: repeat(2, 1fr)"],
    #tier-pro [style*="grid-template-columns: repeat(2, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    /* Price boxes in Pro tier */
    #tier-pro [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    /* RECOMMENDED badge positioning */
    #tier-pro [style*="position: absolute; top: -12px; right: 24px"] {
        right: 16px !important;
        font-size: 10px !important;
        padding: 4px 12px !important;
    }
}

@media (max-width: 480px) {
    #tier-basic,
    #tier-pro {
        grid-template-columns: 1fr !important;
        text-align: left;
        padding: 20px !important;
    }
    #tier-basic > div:first-child,
    #tier-pro > div:first-child {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        margin-bottom: 16px;
    }
    /* Stat grids - 2 columns on small screens */
    #tier-basic > div:last-child > div:nth-last-child(2),
    #tier-pro > div:last-child > div:nth-last-child(2) {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }
    /* Price boxes in Pro tier - stack vertically */
    #tier-pro [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    /* Feature tags wrap */
    #tier-basic [style*="display: flex; flex-wrap: wrap"],
    #tier-pro [style*="display: flex; flex-wrap: wrap"] {
        gap: 4px !important;
    }
    /* Smaller text */
    #tier-basic p,
    #tier-pro p {
        font-size: 13px !important;
    }
}

/* Agents section (x402) mobile */
@media (max-width: 768px) {
    #agents [style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
    #agents [style*="padding: 32px"] {
        padding: 20px !important;
    }
    #agents pre {
        font-size: 11px !important;
        padding: 16px !important;
    }
}

/* Chains section mobile */
@media (max-width: 768px) {
    #chains .db-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    #chains [style*="display: flex; justify-content: center; gap: 16px"] {
        gap: 8px !important;
    }
    #chains [style*="padding: 8px 16px"] {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    #chains .db-grid {
        grid-template-columns: 1fr !important;
    }
}
