/* ── BladeHub — strona regulaminu ─────────────────────────────────────────── */
:root {
    --bg: #0b0a0e;
    --bg-2: #111017;
    --card: #16141c;
    --card-2: #1c1a24;
    --line: #2a2733;
    --line-2: #393444;
    --text: #ece9f1;
    --muted: #a19cad;
    --red: #e3261c;
    --red-2: #ff4b3e;
    --gold: #ffb400;
    --gold-2: #ffd35c;
    --green: #3ba55d;
    --orange: #ff7a00;
    --radius: 16px;
    --nav-h: 64px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --display: 'Rubik', var(--font);
    --pixel: 'Press Start 2P', monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-h) + 24px);
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(1200px 600px at 85% -10%, rgba(227, 38, 28, 0.18), transparent 60%),
        radial-gradient(900px 500px at -10% 10%, rgba(255, 180, 0, 0.08), transparent 60%),
        var(--bg);
    color: var(--text);
    font: 400 16px/1.65 var(--font);
    -webkit-font-smoothing: antialiased;
}

main {
    flex: 1;
}

img {
    max-width: 100%;
    display: block;
}

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

strong {
    color: #fff;
    font-weight: 700;
}

.wrap {
    width: min(1180px, 100% - 32px);
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* ── nawigacja ─────────────────────────────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--nav-h);
    background: rgba(11, 10, 14, 0.72);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font: 800 20px/1 var(--display);
    letter-spacing: 0.3px;
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--muted);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s, background 0.2s;
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

/* ── przyciski, plakietki ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--red-2), var(--red));
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(227, 38, 28, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: transform 0.15s, box-shadow 0.2s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(227, 38, 28, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.nav-links .btn {
    color: #fff;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 14px;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-2);
    box-shadow: none;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.09);
    box-shadow: none;
}

.badge,
.pixel {
    display: inline-block;
    font: 400 10px/1 var(--pixel);
    letter-spacing: 1px;
    color: var(--gold-2);
}

.badge {
    padding: 9px 12px 8px;
    border: 1px solid rgba(255, 180, 0, 0.35);
    border-radius: 8px;
    background: rgba(255, 180, 0, 0.08);
    margin-bottom: 18px;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-2);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.chip-link {
    color: var(--gold-2);
    border-color: rgba(255, 180, 0, 0.35);
}

.chip-link:hover {
    background: rgba(255, 180, 0, 0.1);
}

.icon {
    width: 44px;
    height: 44px;
}

.icon-sm {
    width: 26px;
    height: 26px;
}

.icon-lg {
    width: 52px;
    height: 52px;
}

/* ── hero ──────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 72px 0 56px;
    overflow: hidden;
}

/* subtelna pikselowa siatka w tle */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 75%);
    pointer-events: none;
}

.hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    align-items: center;
    gap: 48px;
}

.hero h1 {
    margin: 0 0 14px;
    font: 800 clamp(34px, 5.2vw, 60px) / 1.05 var(--display);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.grad {
    background: linear-gradient(90deg, var(--red-2), var(--orange) 55%, var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.tagline {
    margin: 0 0 8px;
    font: 700 20px/1.4 var(--display);
    color: var(--gold-2);
}

.lead {
    margin: 0 0 22px;
    max-width: 620px;
    color: var(--muted);
    font-size: 18px;
}

.meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 26px;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-art {
    justify-self: center;
    position: relative;
}

.hero-art::before {
    content: '';
    position: absolute;
    inset: -18%;
    background: radial-gradient(circle, rgba(227, 38, 28, 0.45), transparent 65%);
    filter: blur(20px);
}

.hero-art img {
    position: relative;
    width: min(300px, 70vw);
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.6));
    animation: float 6s ease-in-out infinite;
}

.hero-card {
    justify-self: end;
    width: min(300px, 80vw);
    position: relative;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: -10%;
    background: radial-gradient(circle, rgba(255, 122, 0, 0.45), transparent 65%);
    filter: blur(24px);
}

.hero-card img {
    position: relative;
    height: auto;
    filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.6));
    animation: float 6s ease-in-out infinite;
}

.hero-section {
    padding-top: 40px;
}

.crumbs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.hero-404 {
    text-align: center;
    padding: 120px 0;
}

.hero-404 h1 {
    justify-content: center;
}

.hero-404 .lead {
    margin-inline: auto;
}

.hero-404 .hero-cta {
    justify-content: center;
}

@keyframes float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* ── sekcje strony głównej ─────────────────────────────────────────────────── */
.block {
    padding: 28px 0 40px;
}

.block-head h2 {
    margin: 0 0 4px;
    font: 800 30px/1.2 var(--display);
}

.block-head p {
    margin: 0 0 22px;
    color: var(--muted);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 22px;
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--card-2), var(--card));
    border: 1px solid var(--line);
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(227, 38, 28, 0.6);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(227, 38, 28, 0.25);
}

.card-icon {
    flex: none;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(227, 38, 28, 0.1);
    border: 1px solid rgba(227, 38, 28, 0.25);
}

.card-body h3 {
    margin: 0 0 4px;
    font: 700 19px/1.3 var(--display);
}

.card-body p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14.5px;
}

.card-meta {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gold-2);
}

.card-arrow {
    margin-left: auto;
    color: var(--muted);
    font-size: 22px;
    transition: transform 0.2s, color 0.2s;
}

.card:hover .card-arrow {
    color: var(--red-2);
    transform: translateX(4px);
}

.modes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}

.mode {
    position: relative;
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--card-2), var(--card));
    border: 1px solid var(--line);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

/* Grafika trybu ma własny tytuł, więc opis jest pod nią, a nie na niej. */
.mode img {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 5;
    object-fit: cover;
    padding: 14px 14px 0;
    transition: transform 0.4s;
}

.mode-info {
    padding: 14px 18px 18px;
    border-top: 1px solid var(--line);
    margin-top: 12px;
}

.mode-info h3 {
    margin: 8px 0 4px;
    font: 800 22px/1.2 var(--display);
}

.mode-info p {
    margin: 0 0 10px;
    font-size: 14px;
    color: #d6d1de;
}

.mode-link {
    font-weight: 700;
    font-size: 14px;
    color: var(--gold-2);
}

a.mode:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 180, 0, 0.6);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 122, 0, 0.25);
}

a.mode:hover img {
    transform: scale(1.04);
}

.mode-soon {
    opacity: 0.55;
    filter: grayscale(1);
}

.mode-soon .pixel {
    color: #cfcfcf;
}

/* ── układ strony regulaminu ───────────────────────────────────────────────── */
.layout {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 32px;
    align-items: start;
    padding-bottom: 64px;
}

/* kolumna na całą wysokość treści — dzięki temu spis treści może „jechać” razem z przewijaniem */
.sidebar {
    align-self: stretch;
    min-width: 0; /* bez tego przewijany poziomo spis treści (telefon) rozpycha całą stronę */
}

.hero-text {
    min-width: 0;
}

.sidebar-inner {
    position: sticky;
    top: calc(var(--nav-h) + 20px);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search {
    position: relative;
    display: block;
}

.search input {
    width: 100%;
    padding: 12px 40px 12px 14px;
    border-radius: 12px;
    border: 1px solid var(--line-2);
    background: var(--card);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(227, 38, 28, 0.2);
}

.search kbd {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    padding: 2px 7px;
    border-radius: 6px;
    border: 1px solid var(--line-2);
    color: var(--muted);
    font: 600 12px/1.4 var(--font);
}

.toc {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--card);
}

.toc-title {
    margin: 0 0 8px 8px;
    font: 400 9px/1 var(--pixel);
    color: var(--muted);
    letter-spacing: 1px;
}

.toc a {
    display: flex;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    border-left: 2px solid transparent;
    transition: color 0.2s, background 0.2s, border-color 0.2s;
}

.toc a span {
    color: var(--red-2);
    min-width: 22px;
}

.toc a:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.toc a.active {
    color: var(--text);
    background: rgba(227, 38, 28, 0.1);
    border-left-color: var(--red);
}

.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
}

.panel,
.chapter {
    padding: 24px 26px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, var(--card-2), var(--card));
}

.panel h2,
.chapter h2 {
    margin: 0;
    font: 700 22px/1.3 var(--display);
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-gold {
    border-color: rgba(255, 180, 0, 0.35);
    background: linear-gradient(180deg, rgba(255, 180, 0, 0.09), var(--card) 70%);
}

.panel-green {
    border-color: rgba(59, 165, 93, 0.4);
    background: linear-gradient(180deg, rgba(59, 165, 93, 0.1), var(--card) 70%);
}

.checks {
    list-style: none;
    margin: 16px 0 0;
    padding: 0;
    display: grid;
    gap: 10px;
}

.checks li {
    position: relative;
    padding-left: 30px;
}

.checks li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    width: 18px;
    height: 18px;
    border-radius: 5px;
    background: var(--gold);
    box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.25);
}

.checks.ok li::before {
    background: var(--green);
}

.chapter header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.para {
    flex: none;
    display: grid;
    place-items: center;
    min-width: 46px;
    height: 46px;
    padding: 0 8px;
    border-radius: 12px;
    background: linear-gradient(180deg, var(--red-2), var(--red));
    box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.25), 0 6px 16px rgba(227, 38, 28, 0.3);
    font: 400 12px/1 var(--pixel);
    color: #fff;
}

.rules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 4px;
}

.rules li {
    display: flex;
    gap: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    transition: background 0.2s;
}

.rules li:hover {
    background: rgba(255, 255, 255, 0.03);
}

.rules li:target {
    background: rgba(255, 180, 0, 0.1);
    box-shadow: inset 3px 0 0 var(--gold);
}

.rules p {
    margin: 0;
}

.num {
    flex: none;
    min-width: 42px;
    height: 26px;
    margin-top: 1px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-2);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    transition: color 0.2s, border-color 0.2s;
}

.num:hover {
    color: var(--gold-2);
    border-color: rgba(255, 180, 0, 0.5);
}

mark {
    padding: 0 2px;
    border-radius: 4px;
    background: rgba(255, 180, 0, 0.35);
    color: #fff;
}

/* ── taryfikator ───────────────────────────────────────────────────────────── */
.table-wrap {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--line);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

th,
td {
    padding: 12px 16px;
    text-align: left;
}

th {
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font: 400 9px/1 var(--pixel);
    letter-spacing: 1px;
}

tbody tr {
    border-top: 1px solid var(--line);
    transition: background 0.2s;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

td:last-child {
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

.sev {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 10px;
    border-radius: 3px;
    vertical-align: 1px;
}

.sev-1 {
    background: var(--gold);
}

.sev-2 {
    background: var(--orange);
}

.sev-3 {
    background: var(--red);
    box-shadow: 0 0 10px rgba(227, 38, 28, 0.8);
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.note {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.no-results {
    padding: 28px;
    text-align: center;
    border-radius: var(--radius);
    border: 1px dashed var(--line-2);
    color: var(--muted);
}

.more h2 {
    margin: 12px 0 14px;
    font: 800 22px/1.2 var(--display);
}

.cards-compact {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

/* ── stopka, toast ─────────────────────────────────────────────────────────── */
.footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.25);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 22px 0;
    color: var(--muted);
    font-size: 14px;
}

.footer-inner p {
    margin: 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: var(--text);
}

.footer-brand img {
    border-radius: 8px;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 100;
    padding: 12px 18px;
    border-radius: 12px;
    background: #fff;
    color: #111;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    transform: translate(-50%, 20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
}

.toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

[hidden] {
    display: none !important;
}

/* ── telefon / tablet ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-art {
        order: -1;
    }

    .hero-art img {
        width: 160px;
    }

    .hero-card {
        justify-self: center;
        width: 200px;
    }

    .layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .sidebar-inner {
        position: static;
    }

    .toc {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
        scrollbar-width: none;
    }

    .toc-title {
        display: none;
    }

    .toc a {
        flex: none;
        border-left: 0;
    }
}

@media (max-width: 560px) {
    body {
        font-size: 15px;
    }

    .hero {
        padding: 40px 0 32px;
    }

    .nav-links a:not(.btn) {
        display: none;
    }

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

    .modes {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .mode-info {
        padding: 12px;
    }

    .mode-info h3 {
        font-size: 17px;
    }

    .mode-info p {
        display: none;
    }

    .panel,
    .chapter {
        padding: 18px;
    }

    .rules li {
        padding: 8px 4px;
        gap: 10px;
    }

    td:last-child {
        white-space: normal;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

@media print {
    body {
        background: #fff;
        color: #000;
    }

    .nav,
    .sidebar,
    .footer,
    .toast,
    .more,
    .hero-art,
    .hero-card,
    .hero::before {
        display: none !important;
    }

    .layout {
        display: block;
    }

    .panel,
    .chapter {
        border: 1px solid #ccc;
        background: #fff;
        break-inside: avoid;
    }

    strong,
    td:last-child {
        color: #000;
    }

    .lead,
    .tagline,
    .note,
    .legend {
        color: #333;
    }
}
