body {
    margin: 0;
    background-color: #29ADCE; 
    min-height: 100vh;
    font-family: 'Titillium Web', sans-serif;
    color: #20150F;
}

#wiki_header_container {
    display: flex;
    justify-content: center;
}

#wiki_title {
    color: #FFFFFF;
    font-weight: 800;
    font-size: 50px;
    margin-top: 50px;
    text-transform: uppercase;
    text-shadow: 4px 4px 0px #20150F;
    letter-spacing: 2px;
    text-align: center;
}

/* --- Layout Grid --- */
#wiki_layout {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    gap: 30px;
}

/* --- Sidebar Navigation --- */
#wiki_sidebar {
    width: 280px;
    flex-shrink: 0;
}

.sidebar_title {
    background: #20150F;
    color: #FFFFFF;
    margin: 0 0 15px 0;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 22px;
    text-transform: uppercase;
    text-align: center;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.3);
}

.nav_btn {
    display: flex;
    align-items: center;
    width: 100%;
    background: #FFFFFF;
    border: 3px solid #20150F;
    box-shadow: 5px 5px 0px #20150F;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    font-family: 'Titillium Web', sans-serif;
    font-size: 18px;
    font-weight: 800;
    color: #20150F;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.2s ease;
    text-align: left;
}

.nav_btn:hover {
    filter: brightness(0.95);
}

.nav_btn.active {
    background: #FFD633; /* SunSMP Yellow for selected tab */
    transform: translate(3px, 3px);
    box-shadow: 2px 2px 0px #20150F;
}

/* --- Difficulty Dots on Sidebar --- */
.diff_dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #20150F;
    margin-right: 12px;
    display: inline-block;
}

/* The 5 Color Tiers */
.diff_easy { background: #4df14d; }       /* Bright Green */
.diff_moderate { background: #FFB347; }   /* Soft Orange/Gold */
.diff_hard { background: #FF5A1F; }       /* Bright Orange/Red */
.diff_very_hard { background: #D92525; }  /* Deep Crimson Red */
.diff_extreme { background: #B252F0; }    /* Purple */

/* --- Difficulty Badges inside Content --- */
.badge {
    padding: 5px 15px;
    border: 3px solid #20150F;
    border-radius: 10px;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 3px 3px 0px #20150F;
}

.content_badge { 
    background: #FFD633; /* Keeps the SunSMP Yellow */
    color: #20150F; 
}

.diff_bg_easy { background: #4df14d; color: #20150F; }
.diff_bg_moderate { background: #FFB347; color: #20150F; }
.diff_bg_hard { background: linear-gradient(135deg, #FF5A1F, #F05252); color: #20150F; }
.diff_bg_very_hard { background: #D92525; color: #FFFFFF; } /* White text for contrast on dark red */
.diff_bg_extreme { background: #B252F0; color: #FFFFFF; }   /* White text for contrast on purple */
.coords { background: #FFD633; color: #20150F; }

/* --- Main Content Area --- */
#wiki_content {
    flex-grow: 1;
    max-width: 850px;
}

.dungeon_card {
    background-color: #FFFFFF;
    border: 4px solid #20150F;
    box-shadow: 8px 8px 0px #20150F;
    border-radius: 20px;
    width: 100%;
    padding: 30px;
    box-sizing: border-box;
}

.dungeon_header {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.dungeon_name {
    font-size: 40px;
    font-weight: 800;
    margin: 0 0 10px 0;
    color: #20150F;
    text-transform: uppercase;
}

.dungeon_badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Difficulty Badges inside Content */
.badge {
    padding: 5px 15px;
    border: 3px solid #20150F;
    border-radius: 10px;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 3px 3px 0px #20150F;
}

.diff_bg_normal { background: #4df14d; color: #20150F; }
.diff_bg_hard { background: linear-gradient(135deg, #FF5A1F, #F05252); color: #20150F; }
.diff_bg_elite { background: #B252F0; color: #FFFFFF; }
.coords { background: #FFD633; color: #20150F; }

.dungeon_preview img {
    width: 100%;
    height: auto;
    border: 4px solid #20150F;
    border-radius: 15px;
    box-shadow: 5px 5px 0px #20150F;
    margin-bottom: 30px;
}

.dungeon_section {
    margin-bottom: 30px;
}

.dungeon_section h3 {
    font-size: 28px;
    font-weight: 800;
    border-bottom: 4px solid #20150F;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.dungeon_section h3 i {
    color: #F05252;
    margin-right: 10px;
}

.section_content p, .section_content li {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
}

.section_content ol, .section_content ul {
    padding-left: 20px;
}

.section_content li {
    margin-bottom: 10px;
}

/* Reward Grid */
.reward_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.reward_item {
    background-color: #29ADCE; 
    border: 4px solid #20150F;
    border-radius: 15px;
    box-shadow: 4px 4px 0px #20150F;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.1s ease;
}

.reward_item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px #20150F;
}

.reward_item img {
    width: 64px;
    height: 64px;
    margin-bottom: 10px;
    border: 2px solid #20150F;
    border-radius: 8px;
}

.reward_item span {
    font-weight: 800;
    color: #FFFFFF;
    text-shadow: 2px 2px 0px #20150F;
}

/* Back Button */
#wiki_back {
    display: flex;
    justify-content: center;
    margin: 30px 0 60px 0;
}

#wiki_back a {
    text-decoration: none;
    font-weight: 800;
    color: #20150F;
    width: 180px;
    display: flex;
    font-size: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #FFD633;
    height: 55px;
    border: 4px solid #20150F;
    box-shadow: 6px 6px 0px #20150F;
    transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.2s ease;
}

#wiki_back i {
    margin-right: 8px;
}

#wiki_back a:hover {
    filter: brightness(1.1);
}

#wiki_back a:active {
    transform: translate(4px, 4px);
    box-shadow: 2px 2px 0px #20150F;
}

/* Mobile Responsiveness */
@media(max-width: 850px) {
    #wiki_layout {
        flex-direction: column;
        align-items: center;
    }

    #wiki_sidebar {
        width: 100%;
        max-width: 400px;
    }

    .dungeon_card {
        padding: 20px;
    }

    .dungeon_name {
        font-size: 30px;
        text-align: center;
    }

    .dungeon_badges {
        justify-content: center;
    }

    .reward_grid {
        grid-template-columns: repeat(2, 1fr);
    }
}