:root {
    --bg: #080b10;
    --panel: #11161e;
    --panel-2: #161c25;
    --border: #252d38;
    --text: #f6f7f9;
    --muted: #929baa;
    --yellow: #ffd21c;
    --yellow-soft: rgba(255, 210, 28, 0.12);
    --green: #54d98c;
    --danger: #ff6b6b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% -20%,
            #18202b 0,
            var(--bg) 42%
        );
    color: var(--text);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

.background-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    opacity: .14;
}

.glow-one {
    width: 350px;
    height: 350px;
    background: var(--yellow);
    top: 120px;
    left: -200px;
}

.glow-two {
    width: 400px;
    height: 400px;
    background: #446aff;
    right: -280px;
    top: 420px;
}

.topbar {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
}

.brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--yellow);
    color: #080808;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 23px;
    box-shadow:
        0 0 35px rgba(255, 210, 28, .15);
}

.brand strong {
    display: block;
    font-size: 16px;
    letter-spacing: 2px;
}

.brand span {
    color: var(--yellow);
    font-size: 11px;
    letter-spacing: 3px;
}

.connect-button {
    display: inline-block;
    padding: 11px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: white;
    text-decoration: none;
    font-size: 13px;
}

.status {
    font-size: 13px;
}

.connected {
    color: var(--green);
}

main {
    width: min(1180px, calc(100% - 40px));
    margin: auto;
}

.hero {
    text-align: center;
    padding: 95px 0 70px;
}

.eyebrow,
.section-label {
    color: var(--yellow);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
}

.hero h1 {
    max-width: 850px;
    margin: 18px auto;
    font-size: clamp(42px, 6vw, 76px);
    line-height: 1.02;
    letter-spacing: -3px;
}

.hero h1 span {
    color: var(--yellow);
}

.hero-copy {
    color: var(--muted);
    max-width: 650px;
    margin: 25px auto 35px;
    font-size: 18px;
    line-height: 1.6;
}

.search-box {
    max-width: 860px;
    margin: auto;
    display: flex;
    padding: 7px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(17, 22, 30, .94);
    box-shadow:
        0 30px 90px rgba(0, 0, 0, .35);
}

.search-box:focus-within {
    border-color:
        rgba(255, 210, 28, .55);
}

.search-box input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: 0;
    outline: 0;
    color: white;
    padding: 17px 20px;
    font-size: 16px;
}

.search-box input::placeholder {
    color: #687282;
}

.search-box button {
    border: 0;
    border-radius: 12px;
    padding: 0 25px;
    background: var(--yellow);
    color: #090909;
    font-weight: 800;
    cursor: pointer;
}

.search-box button:hover {
    transform: translateY(-1px);
}

.examples {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 18px;
}

.examples button {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--muted);
    border-radius: 100px;
    padding: 8px 13px;
    cursor: pointer;
    font-size: 12px;
}

.examples button:hover {
    color: white;
    border-color: #4b5665;
}

.hidden {
    display: none !important;
}

.loading {
    padding: 60px 20px;
    text-align: center;
}

.ninja-loader {
    width: 55px;
    height: 55px;
    display: grid;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 15px;
    background: var(--yellow);
    color: black;
    font-size: 25px;
    font-weight: 900;
    animation: pulse 1.1s infinite;
}

@keyframes pulse {
    50% {
        transform: scale(.88);
        opacity: .65;
    }
}

.loading p {
    color: var(--muted);
}

.error-box {
    max-width: 800px;
    margin: 20px auto;
    padding: 18px;
    background: rgba(255, 107, 107, .08);
    border: 1px solid rgba(255, 107, 107, .25);
    border-radius: 12px;
    color: #ffaaaa;
}

.understood {
    border-top: 1px solid var(--border);
    padding: 55px 0 25px;
}

.understood h2 {
    margin: 10px 0;
    font-size: 30px;
}

.understood p {
    color: var(--muted);
    max-width: 800px;
    line-height: 1.6;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.chip {
    padding: 8px 12px;
    border-radius: 100px;
    background: var(--yellow-soft);
    border: 1px solid rgba(255, 210, 28, .18);
    color: #ffe36b;
    font-size: 12px;
}

.results-section {
    padding: 45px 0 90px;
}

.results-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
    margin-bottom: 25px;
}

.results-heading h2 {
    margin: 9px 0 0;
    font-size: 31px;
}

.result-count {
    color: var(--muted);
    font-size: 13px;
}

.development-notice {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    color: #b9c3d0;
    background: #101720;
    border: 1px solid var(--border);
    font-size: 13px;
}

.products-grid {
    display: grid;
    grid-template-columns:
        repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: rgba(17, 22, 30, .96);
    border: 1px solid var(--border);
    transition: .2s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: #3a4554;
}

.product-image {
    height: 230px;
    background: white;
    display: grid;
    place-items: center;
    padding: 20px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-content {
    padding: 20px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.score {
    color: var(--yellow);
    font-size: 12px;
    font-weight: 800;
}

.rank {
    color: var(--green);
    font-size: 11px;
}

.product-card h3 {
    font-size: 16px;
    line-height: 1.45;
    margin: 0 0 16px;
    min-height: 46px;
}

.reason {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    margin: 6px 0;
}

.reason::before {
    content: "✓";
    color: var(--green);
    margin-right: 7px;
}

.price {
    font-size: 27px;
    font-weight: 900;
    margin: 20px 0 14px;
}

.price-unavailable {
    color: var(--muted);
    font-size: 13px;
    margin: 20px 0 14px;
}

.offer-button {
    width: 100%;
    display: block;
    text-align: center;
    padding: 13px;
    border-radius: 10px;
    background: var(--yellow);
    color: #090909;
    text-decoration: none;
    font-weight: 800;
}

.offer-button.disabled {
    pointer-events: none;
    opacity: .35;
}

footer {
    border-top: 1px solid var(--border);
    padding: 30px 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
}

footer strong {
    color: white;
}

@media (max-width: 900px) {

    .products-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}

@media (max-width: 650px) {

    .topbar {
        min-height: 75px;
    }

    .connection {
        display: none;
    }

    .hero {
        padding-top: 60px;
    }

    .hero h1 {
        letter-spacing: -2px;
    }

    .search-box {
        display: block;
    }

    .search-box button {
        width: 100%;
        padding: 15px;
    }

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

    .results-heading {
        display: block;
    }

}
