:root {
    --bg: #0c1117;
    --panel: #141b24;
    --panel-2: #101720;
    --text: #f4f7fb;
    --muted: #9ba8b7;
    --line: #263241;
    --cyan: #17d5ff;
    --amber: #ffb547;
    --danger: #ff5d6c;
    --success: #49df8f;
    --shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(23, 213, 255, .14), transparent 34rem),
        linear-gradient(180deg, #0c1117 0%, #111821 100%);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(12, 17, 23, .82);
    backdrop-filter: blur(14px);
}

.brand {
    font-weight: 800;
    font-size: 22px;
    color: var(--text);
}

nav {
    display: flex;
    align-items: center;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
}

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

main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 70px;
}

.wide {
    width: min(1320px, calc(100% - 32px));
}

.narrow {
    width: min(760px, calc(100% - 32px));
}

.hero {
    min-height: 430px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr);
    align-items: center;
    gap: 40px;
}

.hero h1 {
    margin: 0;
    max-width: 780px;
    font-size: clamp(38px, 6vw, 72px);
    line-height: .98;
    letter-spacing: 0;
}

.hero p {
    max-width: 620px;
    margin: 22px 0 30px;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.65;
}

.hero-panel,
.panel,
.product-card,
.table-wrap {
    background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-panel {
    min-height: 260px;
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    position: relative;
    overflow: hidden;
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 22px;
    border: 1px solid rgba(23, 213, 255, .35);
    border-radius: 8px;
}

.hero-panel span {
    color: var(--cyan);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .12em;
    margin-bottom: 12px;
}

.hero-panel strong {
    position: relative;
    font-size: 26px;
    line-height: 1.2;
}

.button {
    border: 0;
    border-radius: 8px;
    min-height: 44px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    color: #081018;
    background: var(--cyan);
}

.button:hover {
    filter: brightness(1.08);
}

.button.primary {
    background: linear-gradient(135deg, var(--cyan), var(--amber));
    box-shadow: 0 12px 32px rgba(23, 213, 255, .18);
}

.button.secondary {
    background: #253141;
    color: var(--text);
}

.button.small {
    min-height: 38px;
    padding: 0 14px;
}

.button.tiny {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
}

.section {
    padding-top: 46px;
}

.section-title {
    margin-bottom: 22px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 18px;
}

.section-title h1,
.section-title h2 {
    margin: 0;
    font-size: 34px;
}

.section-title p,
.muted {
    color: var(--muted);
}

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

.product-card {
    overflow: hidden;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.product-card:hover {
    transform: translateY(-3px);
    border-color: rgba(23, 213, 255, .55);
    box-shadow: 0 26px 90px rgba(0, 0, 0, .45);
}

.product-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    display: block;
    filter: saturate(.9) contrast(1.05);
}

.product-body {
    padding: 18px;
}

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

.product-meta {
    color: var(--cyan);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.product-card h3 {
    margin: 16px 0 8px;
    font-size: 21px;
}

.product-card p {
    color: var(--muted);
    margin: 0 0 18px;
}

.panel {
    padding: 28px;
}

.checkout-panel {
    padding: 0;
    overflow: hidden;
}

.checkout-panel > h1,
.checkout-panel > .muted,
.checkout-panel > .notice,
.checkout-panel > form {
    margin-left: 28px;
    margin-right: 28px;
}

.checkout-panel > h1 {
    margin-top: 28px;
}

.narrow-panel {
    max-width: 520px;
    margin: 0 auto;
}

.panel h1 {
    margin: 0 0 10px;
    font-size: 34px;
}

.form {
    display: grid;
    gap: 16px;
    margin-top: 20px;
}

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel-2);
    color: var(--text);
    padding: 0 14px;
    font-size: 15px;
}

small {
    color: var(--muted);
}

.notice {
    border-radius: 8px;
    padding: 14px 16px;
    margin: 14px 0;
    border: 1px solid var(--line);
}

.notice.success {
    background: rgba(73, 223, 143, .1);
    color: var(--success);
    border-color: rgba(73, 223, 143, .3);
}

.notice.danger {
    background: rgba(255, 93, 108, .1);
    color: var(--danger);
    border-color: rgba(255, 93, 108, .3);
}

.checkout-product,
.order-preview {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .035);
    border: 1px solid var(--line);
}

.checkout-product-large {
    align-items: stretch;
    margin: 24px 0;
    padding: 0;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
}

.checkout-product img {
    width: 82px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
}

.checkout-product-large img {
    width: 100%;
    height: 180px;
    border-radius: 0;
}

.checkout-product-large div {
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.checkout-product-large strong {
    font-size: 24px;
}

.checkout-product span,
.order-preview span {
    display: block;
    color: var(--muted);
    margin-top: 4px;
}

.claim-command {
    margin: 20px 0;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid rgba(23, 213, 255, .35);
    background: rgba(23, 213, 255, .08);
    display: grid;
    gap: 8px;
}

.claim-command span {
    color: var(--muted);
    font-weight: 700;
}

.claim-command code {
    display: block;
    white-space: normal;
    font-size: 22px;
    font-weight: 900;
    color: var(--text);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
}

th,
td {
    padding: 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

code {
    color: var(--cyan);
    white-space: nowrap;
}

.status {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
    background: #273243;
}

.status.pending {
    color: var(--amber);
}

.status.delivered {
    color: var(--success);
}

.status.failed {
    color: var(--danger);
}

.actions form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 820px) {
    .site-header,
    .section-title,
    .hero {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .site-header {
        display: grid;
    }

    nav {
        overflow-x: auto;
        padding-bottom: 4px;
    }

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

    .checkout-product-large {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
        padding: 20px 0 34px;
    }
}

/* Store dashboard redesign */
.store-page {
    background:
        linear-gradient(rgba(7, 12, 16, .9), rgba(7, 12, 16, .94)),
        radial-gradient(circle at 12% 0%, rgba(40, 200, 255, .14), transparent 36rem),
        radial-gradient(circle at 86% 20%, rgba(255, 184, 48, .08), transparent 28rem),
        #080d11;
}

.store-topbar {
    width: calc(100% - 28px);
    margin: 14px auto 0;
    min-height: 80px;
    padding: 0 22px;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto minmax(220px, 1fr);
    align-items: center;
    gap: 22px;
    border: 1px solid rgba(92, 116, 133, .28);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(16, 23, 30, .88), rgba(8, 13, 18, .9));
    box-shadow: 0 20px 70px rgba(0, 0, 0, .35);
    backdrop-filter: blur(12px);
}

.store-logo {
    color: var(--text);
    font-size: 38px;
    font-weight: 900;
    letter-spacing: 0;
}

.store-nav {
    justify-content: center;
    gap: 34px;
    font-size: 16px;
    color: var(--text);
}

.store-nav a {
    position: relative;
    padding: 28px 0;
}

.store-nav a.active,
.store-nav a:hover {
    color: var(--cyan);
}

.store-nav a.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--cyan);
    box-shadow: 0 0 16px rgba(23, 213, 255, .65);
}

.cart-summary {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--cyan);
}

.cart-summary span,
.cart-summary strong {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(23, 213, 255, .28);
    border-radius: 6px;
    padding: 0 18px;
    background: rgba(5, 10, 14, .55);
}

.store-shell {
    width: calc(100% - 28px);
    max-width: none;
    padding-top: 16px;
}

.store-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 450px;
    gap: 20px;
}

.shop-panel,
.side-card,
.orders-panel {
    border: 1px solid rgba(92, 116, 133, .34);
    border-radius: 7px;
    background:
        linear-gradient(135deg, rgba(18, 27, 34, .9), rgba(8, 13, 18, .88)),
        rgba(12, 18, 24, .9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .03), 0 22px 70px rgba(0, 0, 0, .32);
}

.shop-panel {
    padding: 24px 22px 18px;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.panel-heading h1,
.panel-heading h2,
.side-card h2 {
    margin: 0;
    font-size: 25px;
    line-height: 1.1;
}

.panel-heading p,
.side-card p {
    margin: 10px 0 0;
    color: rgba(244, 247, 251, .7);
    line-height: 1.55;
}

.store-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.store-product-card {
    min-height: 250px;
    padding: 14px 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid rgba(92, 116, 133, .34);
    border-radius: 7px;
    background:
        radial-gradient(circle at 50% 20%, rgba(255, 255, 255, .055), transparent 58%),
        linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .01));
    transition: transform .16s ease, border-color .16s ease, background .16s ease;
}

.store-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(23, 213, 255, .58);
    background:
        radial-gradient(circle at 50% 20%, rgba(23, 213, 255, .09), transparent 62%),
        linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .015));
}

.product-image-frame {
    width: 100%;
    height: 128px;
    display: grid;
    place-items: center;
}

.product-image-frame img {
    width: 100%;
    height: 118px;
    object-fit: contain;
    filter: drop-shadow(0 18px 22px rgba(0, 0, 0, .55)) saturate(.92) contrast(1.08);
}

.store-product-card h2 {
    margin: 8px 0 6px;
    font-size: 16px;
    line-height: 1.2;
    text-align: center;
}

.store-product-card p {
    margin: 0 0 12px;
    color: var(--cyan);
    font-size: 20px;
    font-weight: 900;
}

.button.outline {
    width: 100%;
    min-height: 34px;
    color: var(--cyan);
    background: rgba(3, 9, 13, .58);
    border: 1px solid rgba(23, 213, 255, .7);
    box-shadow: none;
}

.button.outline::before {
    content: "+";
    margin-right: 8px;
    font-size: 16px;
}

.store-sidebar {
    display: grid;
    gap: 14px;
    align-content: start;
}

.side-card {
    padding: 20px;
}

.side-card h2 {
    color: var(--amber);
}

.license-card h2 {
    color: var(--cyan);
}

.cart-items {
    display: grid;
    margin: 16px 0;
    overflow: hidden;
    border: 1px solid rgba(92, 116, 133, .28);
    border-radius: 7px;
}

.empty-cart {
    padding: 16px;
    color: var(--muted);
    background: rgba(255, 255, 255, .02);
}

.cart-line {
    min-height: 68px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-bottom: 1px solid rgba(92, 116, 133, .22);
    background: rgba(255, 255, 255, .02);
}

.cart-line:last-child {
    border-bottom: 0;
}

.cart-line img {
    width: 82px;
    height: 54px;
    object-fit: contain;
    border-radius: 6px;
    background: rgba(255, 255, 255, .035);
}

.cart-line strong,
.cart-line span {
    display: block;
}

.cart-line span {
    margin-top: 4px;
    color: var(--cyan);
    font-weight: 800;
}

.cart-line button {
    width: 28px;
    height: 28px;
    border: 0;
    color: rgba(255, 255, 255, .68);
    background: transparent;
    cursor: pointer;
    font-size: 20px;
}

.cart-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0;
    font-size: 16px;
}

.cart-total-row strong {
    color: var(--amber);
    font-size: 28px;
}

.cart-checkout-form {
    display: grid;
    gap: 12px;
}

.checkout-button {
    width: 100%;
    color: #171004;
    background: linear-gradient(180deg, #ffc239, #f2a514);
    box-shadow: 0 14px 26px rgba(242, 165, 20, .18);
}

.checkout-button::after {
    content: "›";
    margin-left: 12px;
    font-size: 26px;
    line-height: 1;
}

.checkout-button:disabled {
    cursor: not-allowed;
    filter: grayscale(.5) brightness(.72);
}

.button.full {
    width: 100%;
}

.claim-command.compact code {
    font-size: 18px;
}

.orders-panel {
    margin-top: 16px;
    padding: 18px 20px 20px;
}

.checkout-shell {
    display: grid;
    place-items: start center;
    padding-top: 28px;
}

.checkout-page-panel {
    width: min(760px, 100%);
    padding: 28px;
}

.checkout-list {
    display: grid;
    gap: 10px;
    margin: 20px 0;
}

.checkout-line {
    border: 1px solid rgba(92, 116, 133, .28);
    border-radius: 7px;
    background: rgba(255, 255, 255, .025);
}

.checkout-line img {
    object-fit: contain;
}

.checkout-total {
    padding-top: 14px;
    border-top: 1px solid rgba(92, 116, 133, .28);
}

.checkout-form {
    margin-top: 18px;
}

.claim-single-command {
    margin: 22px 0;
    padding: 22px;
}

.claim-single-command code {
    font-size: 24px;
}

.claim-orders-list {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.store-table-wrap {
    box-shadow: none;
    background: transparent;
}

.store-table-wrap table {
    min-width: 980px;
}

.store-table-wrap th {
    color: rgba(244, 247, 251, .72);
}

.store-table-wrap td {
    color: rgba(244, 247, 251, .86);
}

.status.pending {
    color: #ffbc2c;
    border: 1px solid rgba(255, 188, 44, .55);
    background: rgba(255, 188, 44, .1);
}

.status.delivered {
    color: #49df8f;
    border: 1px solid rgba(73, 223, 143, .35);
    background: rgba(73, 223, 143, .1);
}

.status.failed {
    color: #ff5d6c;
    border: 1px solid rgba(255, 93, 108, .4);
    background: rgba(255, 93, 108, .08);
}

@media (max-width: 1180px) {
    .store-topbar {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .store-nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .cart-summary {
        justify-self: start;
    }

    .store-layout {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 620px) {
    .store-logo {
        font-size: 30px;
    }

    .store-product-grid {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        width: 100%;
        justify-content: space-between;
    }
}
