/* =========================
   Beacoland Guides / Wiki
   Polish Icons v1
========================= */

body {
    min-height: 100vh;
    font-family: "Inter", Arial, sans-serif;
    background:
        radial-gradient(circle at top left, rgba(212, 162, 76, 0.10), transparent 28%),
        radial-gradient(circle at bottom right, rgba(212, 162, 76, 0.06), transparent 32%),
        var(--bg-primary);
    color: var(--text-primary);
}

a {
    color: inherit;
}

/* =========================
   Custom Scrollbar
========================= */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #2B3138;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3A424C;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #2B3138 transparent;
}

/* =========================
   Shared Icons
========================= */

.ui-icon,
.nav-icon,
.pill-icon,
.search-icon,
.breadcrumb-icon,
.next-guide-icon,
.guide-card-icon img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0) invert(1);
    opacity: 0.82;
}

.nav-icon {
    width: 17px;
    height: 17px;
    opacity: 0.58;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.pill-icon,
.breadcrumb-icon,
.next-guide-icon {
    width: 16px;
    height: 16px;
}

.search-icon {
    width: 18px;
    height: 18px;
    opacity: 0.9;
    filter: brightness(0) saturate(100%) invert(70%) sepia(75%) saturate(397%) hue-rotate(359deg) brightness(92%) contrast(88%);
}

/* =========================
   Main Layout
========================= */

.docs-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
}

.docs-main {
    min-width: 0;
    padding: 54px 64px 84px;
}

.docs-container {
    width: min(100%, 1320px);
    margin: 0 auto;
}

/* =========================
   Sidebar
========================= */

.docs-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 30px 24px;
    overflow-y: auto;
    background:
        linear-gradient(180deg, rgba(26, 29, 32, 0.96), rgba(13, 15, 17, 0.98));
    border-right: 1px solid var(--border-soft);
    z-index: 60;
}

.docs-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 34px;
}

.docs-brand img {
    width: 178px;
    height: auto;
    display: block;
}

.docs-home-link,
.docs-icon-button,
.docs-account-button {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ui-icon {
    width: 28px;
    height: 28px;
    opacity: 0.8;
    transition: all 0.2s ease;
}

/* Smaller back arrow only */
.docs-home-link .ui-icon {
    width: 14px;
    height: 14px;
}

.docs-home-link:hover,
.docs-icon-button:hover,
.docs-account-button:hover {
    color: var(--gold-primary);
    border-color: rgba(212, 162, 76, 0.35);
    transform: translateY(-2px);
}

.docs-home-link:hover .ui-icon,
.docs-icon-button:hover .ui-icon,
.docs-account-button:hover .ui-icon {
    opacity: 1;
}

.docs-sidebar-section {
    margin-bottom: 28px;
}

.docs-sidebar-section + .docs-sidebar-section {
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.055);
}

.docs-sidebar-section p {
    margin-bottom: 12px;
    color: var(--gold-secondary);
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.docs-sidebar-section a {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 8px;
    padding: 12px 13px;
    border-radius: 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 750;
    transition: all 0.2s ease;
}

.docs-sidebar-section a > span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.docs-sidebar-section a:hover,
.docs-sidebar-section a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.055);
}

.docs-sidebar-section a:hover .nav-icon,
.docs-sidebar-section a.active .nav-icon {
    opacity: 0.95;
}

.docs-sidebar-section a.active {
    border: 1px solid rgba(212, 162, 76, 0.28);
    background:
        radial-gradient(circle at top left, rgba(212, 162, 76, 0.16), transparent 45%),
        rgba(255, 255, 255, 0.055);
    box-shadow:
        inset 0 0 0 1px rgba(212, 162, 76, 0.08),
        0 0 24px rgba(212, 162, 76, 0.08);
}

.docs-sidebar-section a.active::before {
    content: "";
    position: absolute;
    left: -9px;
    top: 50%;
    width: 3px;
    height: 22px;
    border-radius: 999px;
    background: var(--gold-primary);
    transform: translateY(-50%);
}

.sidebar-overlay {
    display: none;
}

body.sidebar-open {
    overflow: hidden;
}

/* =========================
   Top Bar
========================= */

.docs-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 28px;
}

.docs-topbar-left,
.docs-topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.docs-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.docs-pill strong {
    color: var(--gold-primary);
}

/* =========================
   Guides Home Hero
========================= */

.docs-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 34px;
    padding: 40px 42px;
    border: 1px solid var(--border-soft);
    border-radius: 32px;
    background:
        radial-gradient(circle at top right, rgba(212, 162, 76, 0.16), transparent 35%),
        linear-gradient(135deg, rgba(32, 36, 42, 0.96), rgba(18, 21, 24, 0.96));
    box-shadow: var(--shadow-card);
}

.docs-hero::after {
    content: "";
    position: absolute;
    inset: auto -20% -55% 35%;
    height: 220px;
    background: radial-gradient(circle, rgba(212, 162, 76, 0.12), transparent 68%);
    pointer-events: none;
}

.docs-kicker {
    margin-bottom: 14px;
    color: var(--gold-secondary);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.docs-hero h1 {
    max-width: 860px;
    margin-bottom: 18px;
    font-size: clamp(2.6rem, 4.2vw, 4.25rem);
    font-weight: 750;
    line-height: 1.06;
    letter-spacing: -0.035em;
}

.docs-hero p {
    max-width: 760px;
    color: var(--text-secondary);
    font-size: 1.08rem;
    line-height: 1.75;
}

/* =========================
   Search
========================= */

.docs-search-wrap {
    position: relative;
    z-index: 5;
    max-width: 900px;
    margin-top: 26px;
}

.docs-search {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(8, 10, 12, 0.50);
    border: 1px solid var(--border-soft);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.docs-search:hover {
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(8, 10, 12, 0.58);
}

.docs-search:focus-within {
    border-color: rgba(212, 162, 76, 0.42);
    box-shadow: 0 0 0 4px rgba(212, 162, 76, 0.08);
}

.docs-search input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text-primary);
    font-size: 1rem;
}

.docs-search input::placeholder {
    color: var(--text-muted);
}

.docs-search kbd {
    padding: 6px 9px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid var(--border-soft);
    color: var(--text-muted);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.search-plus {
    color: var(--text-muted) !important;
    font-size: 0.78rem;
    font-weight: 900;
}

.search-results {
    display: none;
    margin-top: 8px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(8, 10, 12, 0.72);
    border: 1px solid var(--border-soft);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(16px);
}

.search-results.visible {
    display: grid;
    gap: 8px;
}

.search-result-count {
    padding: 8px 10px 4px;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.search-result-item {
    display: grid;
    gap: 5px;
    padding: 14px;
    border-radius: 16px;
    color: var(--text-primary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.search-result-item:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 162, 76, 0.4);
    background: rgba(255, 255, 255, 0.06);
}

.search-result-item:active {
    transform: translateY(0);
}

.search-result-item small {
    color: var(--gold-primary);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.search-result-item strong {
    font-size: 0.95rem;
}

.search-result-item span {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.search-empty {
    padding: 15px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.docs-quick-links {
    position: relative;
    z-index: 4;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.docs-quick-links span {
    color: var(--text-muted);
    font-size: 0.86rem;
    font-weight: 800;
}

.docs-quick-links a {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 800;
    transition: all 0.2s ease;
}

.docs-quick-links a:hover {
    color: var(--gold-primary);
    border-color: rgba(212, 162, 76, 0.26);
}

/* =========================
   Guide Sections / Cards
========================= */

.docs-section {
    margin-top: 38px;
}

.docs-section-header {
    margin-bottom: 18px;
}

.docs-section-header h2 {
    margin-bottom: 7px;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.docs-section-header p {
    color: var(--text-secondary);
    line-height: 1.65;
}

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

.guide-card {
    position: relative;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--border-soft);
    background:
        radial-gradient(circle at top right, rgba(212, 162, 76, 0.08), transparent 40%),
        rgba(26, 29, 32, 0.82);
    color: var(--text-primary);
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: all 0.25s ease;
}

.guide-card:hover {
    transform: translateY(-6px);
    border-color: rgba(212, 162, 76, 0.34);
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
}

.guide-card-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-soft);
}

.guide-card-icon img {
    opacity: 0.85;
}

.guide-card small {
    color: var(--gold-primary);
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.guide-card h3 {
    margin: 14px 0 10px;
    font-size: 1.18rem;
}

.guide-card p {
    color: var(--text-secondary);
    line-height: 1.65;
}

.guide-card .guide-status {
    margin-top: auto;
    padding-top: 22px;
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 800;
}

.guide-card.featured {
    grid-column: span 2;
    background:
        radial-gradient(circle at top left, rgba(212, 162, 76, 0.20), transparent 42%),
        linear-gradient(135deg, rgba(32, 36, 42, 0.98), rgba(18, 21, 24, 0.98));
}

/* =========================
   Article Layout
========================= */

.article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 40px;
    align-items: start;
}

.article-card {
    padding: 60px;
    border: 1px solid var(--border-soft);
    border-radius: 32px;
    background: rgba(26, 29, 32, 0.82);
    box-shadow: var(--shadow-card);
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 34px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 800;
}

.breadcrumbs a {
    color: var(--gold-primary);
    text-decoration: none;
}

.article-card h1 {
    max-width: 900px;
    margin-bottom: 20px;
    font-size: clamp(2.8rem, 4.2vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.guide-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
    color: var(--text-muted);
    font-size: 0.92rem;
    font-weight: 700;
}

.guide-tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 30px;
}

.guide-tag {
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-soft);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 850;
}

.guide-tag.official {
    color: var(--gold-primary);
    border-color: rgba(212, 162, 76, 0.25);
    background: rgba(212, 162, 76, 0.08);
}

.article-intro {
    max-width: 900px;
    margin-bottom: 42px;
    color: var(--text-secondary);
    font-size: 1.18rem;
    line-height: 1.8;
}

.article-block {
    padding: 36px 0;
    border-top: 1px solid var(--border-soft);
}

.article-block h2 {
    margin-bottom: 16px;
    font-size: 1.7rem;
    letter-spacing: -0.025em;
}

.article-block p,
.article-block li {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.article-block ul {
    margin: 14px 0 0 22px;
}

.article-callout {
    margin: 28px 0;
    padding: 24px;
    border-radius: 22px;
    border: 1px solid rgba(212, 162, 76, 0.24);
    background:
        radial-gradient(circle at top left, rgba(212, 162, 76, 0.12), transparent 48%),
        rgba(255, 255, 255, 0.045);
}

.article-callout strong {
    display: block;
    margin-bottom: 8px;
    color: var(--gold-primary);
}

.server-ip {
    display: inline-flex;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 14px;
    background: rgba(8, 10, 12, 0.48);
    border: 1px solid var(--border-soft);
    color: var(--gold-secondary);
    font-weight: 900;
}

/* =========================
   Article Sidebar
========================= */

.article-side {
    position: sticky;
    top: 34px;
    display: grid;
    gap: 16px;
}

.side-card {
    padding: 26px;
    border-radius: 22px;
    border: 1px solid var(--border-soft);
    background: rgba(26, 29, 32, 0.74);
}

.side-card h3 {
    margin-bottom: 14px;
    font-size: 1rem;
}

.side-card p,
.side-card a {
    color: var(--text-secondary);
    line-height: 1.65;
    font-size: 0.94rem;
}

.side-card a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
}

.side-card a:hover {
    color: var(--gold-primary);
}

.next-guide {
    margin-top: 34px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 24px;
    border-radius: 24px;
    background:
        radial-gradient(circle at top right, rgba(212, 162, 76, 0.14), transparent 44%),
        rgba(255, 255, 255, 0.045);
    border: 1px solid var(--border-soft);
    text-decoration: none;
    transition: all 0.2s ease;
}

.next-guide:hover {
    transform: translateY(-3px);
    border-color: rgba(212, 162, 76, 0.34);
}

.next-guide p {
    color: var(--text-muted);
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.next-guide h3 {
    margin-top: 8px;
}

/* =========================
   Responsive
========================= */

@media (max-width: 1100px) {
    .docs-shell {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 340px);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: 30px 0 80px rgba(0, 0, 0, 0.45);
    }

    body.sidebar-open .docs-sidebar {
        transform: translateX(0);
    }

    .docs-sidebar nav {
        display: block;
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        opacity: 0;
        visibility: hidden;
        background: rgba(0, 0, 0, 0.58);
        backdrop-filter: blur(6px);
        z-index: 50;
        transition: all 0.25s ease;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }

    .docs-main {
        padding: 34px 24px 70px;
    }

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

    .article-side {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .docs-main {
        padding: 24px 16px 56px;
    }

    .docs-topbar,
    .next-guide {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .docs-pill.hide-mobile {
        display: none;
    }

    .docs-hero,
    .article-card {
        padding: 30px 22px;
        border-radius: 24px;
    }

    .docs-hero h1 {
        font-size: clamp(2.35rem, 11vw, 3.2rem);
    }

    .docs-search {
        gap: 9px;
        padding: 14px;
    }

    .docs-search kbd,
    .search-plus {
        display: none;
    }

    .docs-quick-links {
        gap: 8px;
    }

    .guide-grid,
    .article-side {
        grid-template-columns: 1fr;
    }

    .guide-card.featured {
        grid-column: span 1;
    }

    .article-card h1 {
        font-size: clamp(2.3rem, 12vw, 3.2rem);
        line-height: 1.08;
    }
}

/* =========================
   Guide Images
========================= */

.guide-image {
    margin-top: 24px;
    margin-bottom: 12px;
}

.guide-image img {
    width: 100%;
    display: block;
    border-radius: 18px;
    border: 1px solid var(--border-soft);
    background: rgba(255, 255, 255, 0.03);
    box-shadow: var(--shadow-card);
}

.guide-image figcaption {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.guide-image-small {
    max-width: 520px;
}

/* =========================
   Rule Cards
========================= */

.rule-list {
    display: grid;
    gap: 14px;
    margin-top: 22px;
}

.rule-item {
    padding: 18px 20px;
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(212, 162, 76, 0.055), transparent 42%),
        rgba(255, 255, 255, 0.028);
    border: 1px solid rgba(255, 255, 255, 0.075);
}

.rule-item h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.rule-item p,
.rule-item li {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
}

.rule-item p + p {
    margin-top: 10px;
}

.rule-item ul {
    margin-top: 10px;
    margin-left: 20px;
}

.rule-item:hover {
    border-color: rgba(212, 162, 76, 0.18);
    background:
        radial-gradient(circle at top left, rgba(212, 162, 76, 0.075), transparent 42%),
        rgba(255, 255, 255, 0.038);
}

/* =========================
   Recommended Modpacks
========================= */
.mod-list {
    margin-top: 14px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--border-soft);
}

.mod-list summary {
    cursor: pointer;
    color: var(--text-primary);
    font-weight: 850;
}

.mod-list ul {
    margin-top: 14px;
}