:root {
    --bg: #030805;
    --bg-soft: #07110a;
    --panel: rgba(7, 18, 10, 0.92);
    --panel-strong: rgba(5, 14, 8, 0.98);
    --line: rgba(74, 255, 121, 0.18);
    --line-strong: rgba(74, 255, 121, 0.38);
    --text: #d7ffe1;
    --muted: #74b88a;
    --accent: #4aff79;
    --accent-soft: rgba(74, 255, 121, 0.12);
    --danger: #ff5a71;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--text);
    font-family: Consolas, "Courier New", monospace;
    background:
        radial-gradient(circle at top, rgba(37, 122, 61, 0.18), transparent 28%),
        linear-gradient(180deg, #020503 0%, #050b06 45%, #020503 100%);
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(rgba(74, 255, 121, 0.04), rgba(74, 255, 121, 0.01)),
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.02) 0,
            rgba(255, 255, 255, 0.02) 1px,
            transparent 1px,
            transparent 4px
        );
    opacity: 0.55;
}
a { color: inherit; text-decoration: none; }
img, video, iframe { max-width: 100%; border: 0; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

.user-shell { min-height: 100vh; }
.page-shell, .guest-shell {
    position: relative;
    z-index: 1;
    width: min(1720px, calc(100% - 24px));
    margin: 0 auto;
    padding: 16px 0 36px;
}

.site-nav {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(10px);
    background: rgba(2, 6, 3, 0.88);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.site-nav__inner {
    width: min(1720px, calc(100% - 24px));
    min-height: 62px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.site-nav__brand, .brand-link {
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-shadow: 0 0 12px rgba(74, 255, 121, 0.22);
}
.site-nav__links, .site-nav__actions {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.site-nav__links a, .site-nav__actions a {
    color: var(--text);
    font-size: 0.92rem;
}
.site-nav__cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.donate-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffd84b, #f0b600);
    color: #2a2100;
    font-weight: 700;
    box-shadow: 0 0 18px rgba(255, 216, 75, 0.2);
}
.checkout-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}
.cart-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: linear-gradient(180deg, #42ff78, #13ba49);
    color: #021807;
    font-size: 0.72rem;
    font-weight: 700;
    box-shadow: 0 0 18px rgba(74, 255, 121, 0.18);
}
.cart-indicator.is-empty {
    background: rgba(74, 255, 121, 0.12);
    color: var(--muted);
    box-shadow: none;
}

.locale-select, input, textarea, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(6, 16, 9, 0.92);
    color: var(--text);
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--line-strong);
    box-shadow: 0 0 0 3px rgba(74, 255, 121, 0.12);
}

.ghost-button, .solid-button, .danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 9px 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: 0.2s ease;
}
.ghost-button {
    border-color: var(--line);
    background: rgba(10, 22, 13, 0.9);
    color: var(--text);
}
.ghost-button:hover {
    border-color: var(--line-strong);
    background: rgba(15, 34, 20, 0.95);
}
.solid-button {
    background: linear-gradient(180deg, #42ff78, #13ba49);
    color: #021807;
    font-weight: 700;
    box-shadow: 0 0 18px rgba(74, 255, 121, 0.2);
}
.solid-button:hover { transform: translateY(-1px); }
.danger-button {
    background: rgba(62, 10, 20, 0.9);
    color: #ff8ca0;
    border-color: rgba(255, 90, 113, 0.25);
}
.small-button { padding: 7px 10px; font-size: 0.79rem; }

.flash-banner, .page-header, .hero-panel, .summary-card, .stack-panel, .empty-card, .account-card, .product-card, .order-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.flash-banner {
    padding: 10px 14px;
    margin-bottom: 12px;
    color: var(--accent);
}
.page-header {
    padding: 18px;
    margin-bottom: 14px;
}
.page-header h1, .hero-panel h1 {
    margin: 0 0 6px;
    font-size: clamp(1.7rem, 4vw, 3.7rem);
    line-height: 0.92;
    letter-spacing: -0.05em;
    text-transform: uppercase;
}
.page-header p, .hero-panel p { margin: 0; color: var(--muted); }

.hero-panel {
    position: relative;
    overflow: hidden;
    padding: 18px 20px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 160px;
    gap: 18px;
    align-items: center;
    margin-bottom: 16px;
    background:
        linear-gradient(135deg, rgba(12, 28, 15, 0.95), rgba(3, 9, 5, 0.96)),
        radial-gradient(circle at right, rgba(74, 255, 121, 0.08), transparent 35%);
}
.hero-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(74, 255, 121, 0.06), transparent);
    transform: translateX(-100%);
    animation: scan 7s linear infinite;
}
.filter-panel {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(220px, 280px);
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: rgba(7, 18, 10, 0.88);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: var(--shadow);
}
.filter-field {
    display: grid;
    gap: 6px;
}
.filter-field span {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.filter-empty {
    margin-top: 16px;
}
.hero-panel__meta {
    display: grid;
    place-items: center;
    align-self: stretch;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.22);
}
.hero-panel__meta strong {
    display: block;
    font-size: 3rem;
    color: var(--accent);
    text-shadow: 0 0 18px rgba(74, 255, 121, 0.25);
}
.eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
}

.product-feed, .stats-grid, .account-grid, .content-grid {
    display: grid;
    gap: 10px;
}
.product-feed {
    grid-template-columns: repeat(auto-fill, minmax(185px, 1fr));
    align-items: start;
}
.product-card.is-hidden,
.filter-empty.is-hidden {
    display: none !important;
}
.product-card {
    overflow: hidden;
    display: grid;
    grid-template-rows: 205px 1fr;
    min-height: 446px;
    height: 446px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(7, 18, 10, 0.98), rgba(3, 11, 6, 0.98));
}
.product-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(74, 255, 121, 0.1);
}
.product-card__media {
    aspect-ratio: 1 / 1;
    background:
        linear-gradient(180deg, rgba(26, 55, 32, 0.16), rgba(4, 12, 7, 0.1)),
        repeating-linear-gradient(90deg, rgba(74, 255, 121, 0.04) 0, rgba(74, 255, 121, 0.04) 1px, transparent 1px, transparent 16px);
    border-bottom: 1px solid var(--line);
}
.product-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: saturate(0.55) contrast(1.08) brightness(0.88) hue-rotate(42deg);
}
.product-card__body {
    padding: 8px 8px 10px;
    display: grid;
    gap: 6px;
    grid-template-rows: auto auto minmax(56px, 56px) auto;
}
.product-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    color: var(--muted);
    font-size: 0.64rem;
    min-height: 44px;
    align-content: flex-start;
}
.product-card__tags span {
    background: var(--accent-soft);
    padding: 3px 6px;
    border-radius: 999px;
    border: 1px solid rgba(74, 255, 121, 0.09);
    white-space: nowrap;
}
.product-card h2 {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.2;
    color: var(--text);
    min-height: 2.4em;
    max-height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.product-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.35;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}
.product-card__footer {
    display: grid;
    gap: 6px;
    margin-top: 2px;
    align-self: end;
}
.product-card__price {
    font-size: 0.8rem;
    color: var(--accent);
}
.product-card__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 52px;
    align-items: stretch;
}
.product-card__actions form { margin: 0; }
.product-card__actions .ghost-button,
.product-card__actions .solid-button,
.product-card__actions form button {
    width: 100%;
    min-height: 52px;
}
.details-button {
    min-height: 52px;
    width: 100%;
}

.modal-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.modal-price {
    font-size: 1rem;
    margin-top: 2px;
}
.version-history {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    display: grid;
    gap: 10px;
}
.version-history h3 {
    margin: 0;
    font-size: 0.95rem;
    text-transform: uppercase;
    color: var(--accent);
}
.version-entry {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.14);
}
.version-entry.is-active {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 1px rgba(74, 255, 121, 0.12);
}
.version-entry__copy {
    display: grid;
    gap: 4px;
}
.version-entry__copy strong {
    font-size: 0.9rem;
}
.version-entry__copy span,
.version-entry__copy p,
.version-history__empty {
    color: var(--muted);
    margin: 0;
    font-size: 0.75rem;
    line-height: 1.45;
}
.version-entry__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.version-entry__toggle {
    min-width: 102px;
}
.version-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: var(--accent-soft);
    border: 1px solid rgba(74, 255, 121, 0.09);
    font-size: 0.68rem;
    white-space: nowrap;
}
.modal-inline-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-inline-actions form {
    margin: 0;
}
.action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid transparent;
    line-height: 1;
}
.action-icon__glyph {
    font-size: 1rem;
    line-height: 1;
}
.action-icon--download {
    background: linear-gradient(180deg, #42ff78, #13ba49);
    color: #021807;
    box-shadow: 0 0 18px rgba(74, 255, 121, 0.2);
}
.action-icon--buy {
    background: linear-gradient(180deg, #ffd84b, #f0b600);
    color: #2a2100;
    box-shadow: 0 0 18px rgba(255, 216, 75, 0.18);
}

.content-grid { grid-template-columns: minmax(0, 1fr) 320px; }
.stack-panel { padding: 14px; display: grid; gap: 12px; }
.summary-card, .empty-card, .account-card { padding: 18px; }
.line-item {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.16);
}
.line-item__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.order-card { padding: 18px; display: grid; gap: 12px; }
.order-card header, .order-card footer, .section-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.order-items { display: grid; gap: 8px; color: var(--muted); }
.stats-grid { grid-template-columns: repeat(3, 1fr); }
.stat-card {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
}
.stat-card strong { display: block; font-size: 2rem; color: var(--accent); }
.account-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

.guest-shell {
    max-width: 540px;
    min-height: 100vh;
    display: grid;
    place-content: center;
}
.auth-card {
    display: grid;
    gap: 18px;
    width: min(760px, 100%);
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: var(--shadow);
}
.auth-card__head {
    display: grid;
    gap: 8px;
}
.auth-card__head h1 {
    margin: 0;
    font-size: clamp(1.8rem, 5vw, 2.8rem);
    line-height: 1;
    text-transform: uppercase;
}
.auth-card__head p,
.auth-footnote {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}
.auth-form,
.install-form,
.install-section {
    display: grid;
    gap: 14px;
}
.auth-form label,
.install-form label {
    display: grid;
    gap: 6px;
}
.auth-form label span,
.install-form label span,
.social-auth p,
.install-section h2 {
    font-size: 0.78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.auth-actions,
.social-auth__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.social-auth__actions--stack {
    display: grid;
    grid-template-columns: 1fr;
}
.social-auth {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}
.social-provider {
    display: grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    min-height: 54px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(7, 18, 10, 0.9);
}
.social-provider__icon {
    display: grid;
    place-items: center;
    min-height: 54px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}
.social-provider span:last-child {
    padding: 0 14px;
}
.social-provider--google .social-provider__icon {
    background: linear-gradient(180deg, #ea4335, #c5221f);
}
.social-provider--facebook .social-provider__icon {
    background: linear-gradient(180deg, #1877f2, #0d57bf);
}
.installer-card {
    width: min(980px, 100%);
}
.install-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.install-section {
    padding-top: 10px;
    border-top: 1px solid var(--line);
}
.install-section h2 {
    margin: 0;
}
.install-submit {
    min-height: 52px;
}

.modal-shell {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 40;
    padding: 24px;
    align-items: center;
    justify-content: center;
}
.modal-shell.is-open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.76); }
.modal-panel {
    position: relative;
    width: min(1160px, calc(100% - 20px));
    margin: 0;
    background: var(--panel-strong);
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    padding: 16px;
    max-height: min(900px, calc(100vh - 48px));
    overflow: auto;
    box-shadow: var(--shadow);
}
.modal-close {
    position: sticky;
    top: 0;
    margin-left: auto;
    display: block;
    background: rgba(74, 255, 121, 0.08);
    color: var(--accent);
    border: 1px solid var(--line);
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1.2rem;
}
.modal-content {
    display: grid;
    grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}
.modal-copy {
    position: sticky;
    top: 8px;
    display: grid;
    gap: 10px;
}
.modal-copy h2 {
    margin: 0;
    text-transform: uppercase;
    font-size: 2rem;
    line-height: 1;
}
.modal-copy p {
    color: var(--muted);
    line-height: 1.55;
    margin: 0;
}
.modal-tags {
    min-height: auto;
}
.modal-gallery { display: grid; gap: 12px; }
.release-panel {
    display: none;
    gap: 12px;
}
.release-panel.is-active {
    display: grid;
}
.modal-detail-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.18);
}
.modal-detail-card__head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.modal-detail-card__head h3 {
    margin: 0;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 0.88rem;
    letter-spacing: 0.08em;
}
.modal-detail-card__head span {
    color: var(--muted);
    font-size: 0.74rem;
}
.release-html {
    min-height: 160px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(74, 255, 121, 0.1);
    background: rgba(5, 15, 9, 0.9);
    color: var(--text);
    line-height: 1.7;
    overflow-wrap: anywhere;
}
.release-html > *:first-child {
    margin-top: 0;
}
.release-html > *:last-child {
    margin-bottom: 0;
}
.release-html a {
    color: var(--accent);
    text-decoration: underline;
}
.release-media-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.modal-media-frame {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.32);
}
.modal-gallery img, .modal-gallery video, .modal-gallery iframe {
    width: 100%;
    min-height: 150px;
    max-height: 240px;
    object-fit: cover;
    display: block;
}
.release-media-grid iframe,
.release-media-grid video {
    aspect-ratio: 16 / 9;
    min-height: 0;
}
.release-media-grid img {
    aspect-ratio: 1 / 1;
}
.compact-empty {
    padding: 14px;
}

.form-stack, .profile-form { display: grid; gap: 14px; }
.checkbox-label { display: flex; gap: 10px; align-items: center; }
.is-disabled { pointer-events: none; opacity: 0.55; }

@keyframes scan {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

@media (min-width: 1500px) {
    .product-feed { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .content-grid,
    .modal-content {
        grid-template-columns: 1fr;
    }
    .modal-meta-row {
        align-items: stretch;
    }
    .modal-copy {
        position: static;
    }
}

@media (max-width: 860px) {
    .hero-panel,
    .filter-panel,
    .site-nav__inner,
    .product-card__footer,
    .section-head,
    .line-item,
    .order-card header,
    .order-card footer {
        display: grid;
        grid-template-columns: 1fr;
    }
    .product-feed { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
    .product-card {
        grid-template-rows: 170px 1fr;
        min-height: 404px;
        height: 404px;
    }
    .site-nav__inner { padding: 10px 0; }
    .hero-panel__meta { min-height: 96px; }
    .release-media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .modal-shell { padding: 12px; align-items: flex-start; }
    .modal-panel { width: 100%; max-height: calc(100vh - 24px); }
    .install-grid,
    .auth-actions,
    .social-auth__actions {
        grid-template-columns: 1fr;
        display: grid;
    }
}
