:root {
    --bg: #f6f7fb;
    --surface: #ffffff;
    --surface-soft: #f1f5f9;
    --border: #dbe3ef;
    --text: #152033;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.hero {
    padding: 34px 20px;
    background:
            radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 34%),
            linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
}

.hero-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.brand-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 18px 0 10px;
    font-size: clamp(32px, 5vw, 58px);
    line-height: 1.05;
}

.hero-text {
    max-width: 760px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 18px;
    line-height: 1.5;
}

.access-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.access-meta span {
    padding: 8px 11px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.88);
    font-size: 13px;
    font-weight: 800;
}

.page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 24px 20px 70px;
}

.toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: end;
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.search-label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

input[type="search"] {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

input[type="search"]:focus {
    outline: 3px solid rgba(37, 99, 235, 0.15);
    border-color: var(--primary);
}

.counter {
    padding: 13px 15px;
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--muted);
    font-weight: 900;
    white-space: nowrap;
}

.counter span {
    color: var(--text);
}

.category-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 0 16px;
    margin-bottom: 4px;
}

.tab-link {
    flex: 0 0 auto;
    padding: 10px 13px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    font-weight: 900;
}

.tab-link:hover,
.tab-link.active {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.category-section {
    margin-top: 22px;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-heading h2 {
    margin: 0;
    font-size: 24px;
}

.section-heading span {
    min-width: 34px;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--muted);
    text-align: center;
    font-weight: 900;
}

.software-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.software-card {
    min-height: 130px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.software-card h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.software-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
}

.software-card[hidden] {
    display: none;
}

.denied-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.denied-card {
    width: 100%;
    max-width: 520px;
    padding: 32px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.denied-card .brand-pill {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.denied-card h1 {
    margin: 18px 0 10px;
    font-size: 32px;
}

.denied-card p {
    margin: 0 0 10px;
    line-height: 1.5;
}

.muted {
    color: var(--muted);
}

@media (max-width: 900px) {
    .software-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .toolbar {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .hero {
        padding: 28px 16px;
    }

    .page {
        padding: 18px 16px 50px;
    }

    .software-grid {
        grid-template-columns: 1fr;
    }

    .software-card {
        min-height: auto;
    }

    .access-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

.pay-form {
    margin-top: 22px;
}

.pay-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border: 0;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 900;
}

.pay-button:hover {
    background: var(--primary-dark);
}

.pay-error {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--danger-bg);
    color: var(--danger-text);
    font-weight: 800;
}

.small-note {
    margin-top: 12px !important;
    font-size: 14px;
}