body.single-wiki {
    background-color: #1C1D1F;
    background-image: none;
}

body.single-wiki nav.navbar.navbar-expand-lg.navbar-dark.bg-dark,
body.single-wiki footer#colophon.site-footer {
    background-color: transparent !important;
}

@media (min-width: 768px) {
    body.single-wiki {
        background-image: var(--bg-image);
        background-attachment: fixed;
        background-position: top;
        background-repeat: no-repeat;
        background-size: cover;
    }
}

.wiki-container {
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
    width: 100%;
}

.wiki-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.wiki-main-col {
    width: 100%;
    min-width: 0;
    margin-bottom: 2rem;
}

.wiki-sidebar-col {
    width: 100%;
    max-width: 340px;
    margin: 0 auto 2rem auto;
}

@media (min-width: 992px) {
    .wiki-layout {
        flex-direction: row;
        align-items: flex-start;
        gap: 24px;
    }

    .wiki-main-col {
        flex: 1 1 0%;
        min-width: 0;
    }

    .wiki-sidebar-col {
        flex: 0 0 340px;
        width: 340px;
        max-width: 340px;
        margin: 0 0 2rem 0;
    }
}

.wiki-sidebar .ad-slot,
.wiki-sidebar .widget_ad,
.wiki-sidebar .widget .ad-slot {
    width: 300px;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    overflow: hidden;
}

.wiki-sidebar .ad-slot span.ad-label {
    display: block;
    font-size: 0.7rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: #888;
    margin-bottom: 0.4rem;
}

.wiki-sidebar .widget.card {
    overflow: hidden;
    color: #ddd;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.wiki-sidebar .widget.card:hover {
    border-color: rgba(255, 169, 57, 0.25) !important;
}

.wiki-sidebar .widget.card:last-child {
    margin-bottom: 0 !important;
}

.wiki-sidebar .widget .card-header,
.wiki-sidebar .widget h3.widget-title {
    background: rgba(35, 36, 38, 0.65) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    color: #ffa939 !important;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0.65rem 0.9rem;
    margin: 0;
    display: flex;
    align-items: center;
    letter-spacing: 0.02em;
}

.wiki-sidebar .widget .card-header::before,
.wiki-sidebar .widget h3.widget-title::before {
    content: '';
    display: inline-block;
    width: 3px;
    height: 12px;
    background-color: #ffa939;
    margin-right: 8px;
    border-radius: 2px;
}

.wiki-sidebar .widget ul {
    list-style: none;
    padding: 0.5rem 0.9rem;
    margin-bottom: 0;
}

.wiki-sidebar .widget ul li {
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 0.88rem;
    line-height: 1.45;
}

.wiki-sidebar .widget ul li:last-child {
    border-bottom: none;
}

.wiki-sidebar .widget a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.15s ease, padding-left 0.15s ease;
}

.wiki-sidebar .widget a:hover {
    color: #ffa939;
    padding-left: 3px;
}

.wiki-sidebar .widget .textwidget,
.wiki-sidebar .widget .tagcloud {
    font-size: 0.88rem;
}

.wiki-sidebar .widget select,
.wiki-sidebar .widget input[type="text"],
.wiki-sidebar .widget input[type="search"] {
    background: rgba(18, 19, 21, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 4px;
    padding: 0.4rem 0.6rem;
    width: 100%;
}

.wiki-article {
    background: #1C1D1F;
    border: 1px solid #2d2e31;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.wiki-header {
    background: #18191b;
    border-bottom: 1px solid #28292c;
    padding: 1.25rem 1.5rem;
}

.wiki-breadcrumb {
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
}

.wiki-breadcrumb .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

.wiki-breadcrumb a {
    color: #9fe7ff;
    text-decoration: none;
}

.wiki-breadcrumb a:hover {
    color: #ffa939;
    text-decoration: underline;
}

.wiki-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.wiki-entry-title {
    font-size: 2rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.wiki-meta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
    font-size: 0.82rem;
    color: #8a8d93;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.wiki-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.wiki-meta-badge {
    background: rgba(255, 169, 57, 0.12);
    color: #ffa939;
    border: 1px solid rgba(255, 169, 57, 0.3);
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
}

.wiki-body {
    padding: 1.75rem 1.5rem;
}

@media (min-width: 768px) {
    .wiki-body {
        padding: 2rem 2.25rem;
    }
}

.wiki-featured-media {
    margin-bottom: 1.5rem;
    text-align: center;
    background: #141517;
    border: 1px solid #28292b;
    border-radius: 6px;
    padding: 0.75rem;
}

.wiki-featured-media img {
    max-height: 400px;
    width: auto;
    max-width: 100%;
    border-radius: 4px;
}

.wiki-body h2 {
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 700;
    margin-top: 2.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.4rem;
    padding-left: 0.75rem;
    border-left: 4px solid #ffa939;
    border-bottom: 1px solid #2a2b2e;
}

.wiki-body h3 {
    color: #e6e6e6;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 1.75rem;
    margin-bottom: 0.75rem;
    padding-left: 0.6rem;
    border-left: 3px solid #6c757d;
}

.wiki-body h4 {
    color: #dddddd;
    font-size: 1.05rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.wiki-body p {
    color: #cccccc;
    line-height: 1.7;
    margin-bottom: 1.15rem;
}

.wiki-body a {
    color: #ffa939;
    text-decoration: none;
}

.wiki-body a:hover {
    color: #ffbe6b;
    text-decoration: underline;
}

.wiki-body table {
    width: 100%;
    margin-bottom: 1.5rem;
    background-color: #17181a;
    border: 1px solid #2e2f33;
    border-collapse: collapse;
}

.wiki-body table th {
    background-color: #242629;
    color: #ffa939;
    border: 1px solid #333539;
    padding: 0.65rem 0.85rem;
    font-weight: 700;
    text-align: left;
    font-size: 0.92rem;
}

.wiki-body table td {
    border: 1px solid #282a2e;
    padding: 0.6rem 0.85rem;
    color: #ddd;
    font-size: 0.9rem;
    background-color: #1a1b1d;
}

.wiki-body .wiki-infobox,
.wiki-body table.wiki-infobox {
    margin-bottom: 1.5rem;
    border: 2px solid #2e2f33;
    border-radius: 6px;
    overflow: hidden;
    background-color: #17181a;
}

@media (min-width: 768px) {
    .wiki-body .wiki-infobox,
    .wiki-body table.wiki-infobox {
        width: 320px;
        float: right;
        margin-left: 1.5rem;
        margin-bottom: 1.25rem;
    }
}

.wiki-body .wiki-infobox th,
.wiki-body table.wiki-infobox th {
    background-color: #242629;
    color: #ffa939;
    text-align: center;
    font-size: 0.92rem;
}

.wiki-body .wiki-infobox td,
.wiki-body table.wiki-infobox td {
    font-size: 0.88rem;
    padding: 0.5rem 0.75rem;
}

.wiki-body table tr:nth-child(even) td {
    background-color: #18191b;
}

.wiki-body blockquote {
    background: #202225;
    border-left: 4px solid #ffa939;
    padding: 0.85rem 1.15rem;
    margin: 1.25rem 0;
    border-radius: 0 4px 4px 0;
    color: #d1d5db;
}

.wiki-body blockquote p:last-child {
    margin-bottom: 0;
}
