* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
    --bg: #09090b;
    --surface: #111114;
    --surface2: #1a1a20;
    --border: #27272a;
    --text: #fafafa;
    --text2: #a1a1aa;
    --text3: #71717a;
    --accent: #6c5ce7;
    --accent2: #a29bfe;
    --accent-glow: rgba(108,92,231,0.15);
    --green: #22c55e;
    --red: #ef4444;
    --orange: #f59e0b;
    --radius: 12px;
    --container: 1140px;
}
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ── Container ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ── Nav ── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-bottom: 1px solid transparent;
    transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}
.nav.scrolled {
    background: rgba(9,9,11,0.85);
    backdrop-filter: blur(16px);
    border-bottom-color: var(--border);
}
.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 32px;
}
.nav-logo {
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
    letter-spacing: -0.5px;
}
.nav-links {
    display: flex;
    gap: 8px;
}
.nav-links a {
    color: var(--text2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
    color: var(--text);
    background: var(--surface2);
}
.nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 16px;
}
.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 8px var(--green);
    transition: background 0.3s;
}
.status-dot.offline { background: var(--red); box-shadow: 0 0 8px var(--red); }
.nav-cta {
    background: var(--accent);
    color: white;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 8px;
    transition: all 0.2s;
}
.nav-cta:hover {
    background: #7c6cf0;
    box-shadow: 0 4px 16px var(--accent-glow);
}

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 160px 24px 80px;
    max-width: 800px;
    margin: 0 auto;
}
.hero-badge {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent2);
    border: 1px solid rgba(108,92,231,0.25);
    background: rgba(108,92,231,0.08);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
    letter-spacing: 0.3px;
}
.hero h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 20px;
}
.gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent2), #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-sub {
    font-size: 18px;
    color: var(--text2);
    max-width: 560px;
    margin: 0 auto 40px;
    line-height: 1.7;
}
.hero-input {
    display: flex;
    gap: 0;
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-input:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
}
.hero-input input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 14px 18px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    outline: none;
}
.hero-input input::placeholder { color: var(--text3); }
.btn-primary {
    background: linear-gradient(135deg, var(--accent), #7c6cf0);
    border: none;
    border-radius: 10px;
    padding: 14px 28px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; filter: none; box-shadow: none; }
.btn-primary .spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hero-hint {
    font-size: 13px;
    color: var(--text3);
    margin-top: 16px;
}

/* ── Stats ── */
.stats {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 48px 0;
    background: var(--surface);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}
.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--text), var(--text2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    display: block;
    font-size: 13px;
    color: var(--text3);
    margin-top: 6px;
    font-weight: 500;
}

/* ── Section headers ── */
.section-header {
    text-align: center;
    margin-bottom: 56px;
}
.section-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent2);
    margin-bottom: 16px;
}
.section-header h2 {
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 12px;
}
.section-header p {
    font-size: 17px;
    color: var(--text2);
    max-width: 480px;
    margin: 0 auto;
}

/* ── Playground ── */
.playground {
    padding: 100px 0;
}
.playground-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    min-height: 300px;
    overflow: hidden;
}
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    text-align: center;
    gap: 16px;
}
.empty-icon {
    width: 80px; height: 80px;
    border-radius: 20px;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    margin-bottom: 8px;
}
.empty-state h3 {
    font-size: 18px;
    font-weight: 600;
}
.empty-state p {
    font-size: 14px;
    color: var(--text3);
    max-width: 400px;
}

/* ── Product card (inside playground) ── */
.product-card {
    overflow: hidden;
}
.pc-header {
    display: flex;
    gap: 24px;
    padding: 28px;
    border-bottom: 1px solid var(--border);
}
.pc-image {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    object-fit: contain;
    background: white;
    flex-shrink: 0;
}
.pc-image-placeholder {
    width: 200px;
    height: 200px;
    border-radius: 12px;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text3);
    font-size: 13px;
    flex-shrink: 0;
}
.pc-info { flex: 1; min-width: 0; }
.pc-info h2 {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.pc-info .brand {
    color: var(--accent2);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 14px;
}
.pc-info .identifiers {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.id-chip {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 12px;
    display: flex;
    gap: 6px;
}
.id-chip .label { color: var(--text3); font-weight: 500; }
.id-chip .value { color: var(--text); font-weight: 500; font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.category-badge {
    background: rgba(108,92,231,0.1);
    border: 1px solid rgba(108,92,231,0.2);
    border-radius: 6px;
    padding: 3px 12px;
    font-size: 12px;
    color: var(--accent2);
    display: inline-block;
    margin-bottom: 10px;
    font-weight: 500;
}
.url-display {
    font-size: 13px;
    color: var(--text3);
    margin-top: 12px;
    word-break: break-all;
}
.url-display a { color: var(--accent2); text-decoration: none; }
.url-display a:hover { text-decoration: underline; }

/* Sections inside product card */
.section {
    padding: 24px 28px;
    border-bottom: 1px solid var(--border);
}
.section:last-child { border-bottom: none; }
.section h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text3);
    margin-bottom: 16px;
}

/* Offers */
.offers-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.offer-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    min-width: 220px;
    flex: 1;
    transition: border-color 0.2s;
}
.offer-card:hover { border-color: var(--accent); }
.offer-price {
    font-size: 30px;
    font-weight: 800;
    color: var(--green);
    letter-spacing: -0.5px;
}
.offer-price.out-of-stock { color: var(--red); }
.offer-currency { font-size: 14px; color: var(--text3); margin-left: 4px; font-weight: 500; }
.offer-details {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.offer-detail {
    font-size: 13px;
    display: flex;
    justify-content: space-between;
}
.offer-detail .od-label { color: var(--text3); }
.offer-detail .od-value { font-weight: 500; }
.availability-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.availability-badge.in-stock { background: rgba(34,197,94,0.12); color: var(--green); }
.availability-badge.out-of-stock { background: rgba(239,68,68,0.12); color: var(--red); }

/* Description */
.description-text {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text2);
    max-height: 120px;
    overflow: hidden;
}
.description-text.expanded { max-height: none; }
.desc-toggle {
    color: var(--accent2);
    font-size: 13px;
    cursor: pointer;
    margin-top: 10px;
    background: none;
    border: none;
    font-family: inherit;
    font-weight: 500;
}
.desc-toggle:hover { text-decoration: underline; }

/* Rating */
.rating-display { display: flex; align-items: center; gap: 14px; }
.rating-stars { color: var(--orange); font-size: 20px; }
.rating-value { font-size: 26px; font-weight: 800; }
.rating-count { font-size: 14px; color: var(--text3); }

/* Specs */
.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr:nth-child(even) { background: var(--bg); }
.specs-table td {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.specs-table td:first-child {
    color: var(--text3);
    width: 35%;
    font-weight: 500;
}

/* Images gallery */
.images-gallery { display: flex; gap: 10px; flex-wrap: wrap; }
.images-gallery img {
    width: 88px; height: 88px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}
.images-gallery img:hover { border-color: var(--accent); transform: scale(1.05); }

/* Raw JSON */
.raw-json {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    line-height: 1.7;
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    color: var(--text2);
}

/* Error display */
.error-card {
    padding: 32px;
}
.error-card h3 { color: var(--red); margin-bottom: 12px; font-size: 18px; font-weight: 700; }
.error-card pre {
    background: var(--bg);
    padding: 20px;
    border-radius: 10px;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
    overflow-x: auto;
    white-space: pre-wrap;
    color: var(--text3);
}

/* Loading state */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
    gap: 20px;
}
.loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
.loading-state p {
    font-size: 14px;
    color: var(--text3);
}

/* ── Features ── */
.features {
    padding: 100px 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.feature-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
    border-color: rgba(108,92,231,0.3);
    box-shadow: 0 8px 32px rgba(108,92,231,0.08);
}
.feature-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    background: rgba(108,92,231,0.1);
    border: 1px solid rgba(108,92,231,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent2);
    margin-bottom: 20px;
}
.feature-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}
.feature-card p {
    font-size: 14px;
    color: var(--text3);
    line-height: 1.7;
}

/* ── API Code Demo ── */
.api-section {
    padding: 100px 0;
}
.code-demo {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}
.code-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border);
    padding: 0 4px;
}
.code-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text3);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    padding: 14px 20px;
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}
.code-tab:hover { color: var(--text2); }
.code-tab.active {
    color: var(--accent2);
    border-bottom-color: var(--accent);
}
.code-panels { position: relative; }
.code-panel {
    display: none;
    margin: 0;
    padding: 28px;
    background: transparent;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text2);
    overflow-x: auto;
}
.code-panel.active { display: block; }
.code-panel .kw { color: var(--accent2); }
.code-panel .str { color: var(--green); }
.code-response {
    border-top: 1px solid var(--border);
}
.code-response-header {
    padding: 12px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text3);
    font-weight: 500;
}
.response-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}
.response-dot.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.code-response-body {
    margin: 0;
    padding: 28px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text2);
    overflow-x: auto;
}
.code-response-body .key { color: var(--accent2); }
.code-response-body .str { color: var(--green); }
.code-response-body .num { color: var(--orange); }

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    padding: 64px 0 32px;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 48px;
    margin-bottom: 48px;
}
.footer-brand p {
    color: var(--text3);
    font-size: 14px;
    margin-top: 10px;
    max-width: 250px;
}
.footer-links {
    display: flex;
    gap: 64px;
}
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.footer-col h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 4px;
}
.footer-col a {
    color: var(--text3);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--text); }
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    font-size: 13px;
    color: var(--text3);
}

/* ── Image modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 100;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
}
.modal-overlay.visible { display: flex; }
.modal-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 12px;
    background: white;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── Selection ── */
::selection { background: rgba(108,92,231,0.3); }

/* ── Responsive ── */
@media (max-width: 768px) {
    .hero { padding: 120px 20px 60px; }
    .hero h1 { font-size: 36px; letter-spacing: -1px; }
    .hero-sub { font-size: 16px; }
    .hero-input { flex-direction: column; gap: 0; }
    .hero-input input { padding: 14px 16px; }
    .btn-primary { justify-content: center; border-radius: 0 0 10px 10px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .stat-value { font-size: 24px; }
    .features-grid { grid-template-columns: 1fr; }
    .section-header h2 { font-size: 28px; }
    .pc-header { flex-direction: column; align-items: center; text-align: center; }
    .pc-image, .pc-image-placeholder { width: 160px; height: 160px; }
    .footer-inner { flex-direction: column; }
    .footer-links { gap: 40px; }
    .nav-links { display: none; }
    .code-panel, .code-response-body { font-size: 11px; padding: 16px; }
}
@media (max-width: 480px) {
    .hero h1 { font-size: 28px; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .stat-value { font-size: 22px; }
}
