/* ==========================================================================
   Myth War II Online - Wiki Stylesheet (Dark Fantasy MMORPG Theme)
   ========================================================================== */

:root {
    --mw-gold: #fff4c4;
    --mw-orange: #d4af37;
    --mw-border: rgba(142, 108, 74, 0.45);
    --mw-bg: #0a0907;
    --mw-panel: rgba(18, 16, 13, 0.95);
    --mw-shadow: 0 20px 50px rgba(0, 0, 0, 0.85);
    --mw-text: #e4dfd5;
    --mw-muted: #a19e95;
    --mw-line: rgba(142, 108, 74, 0.2);
}

body {
    background-color: var(--mw-bg);
    color: var(--mw-text);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

/* Page Background Setup */
.wiki-bg {
    position: fixed;
    inset: 0;
    z-index: -3;
    background: url('../img/maps/Map003_Tiles/File0010.jpg') center center / cover no-repeat;
    filter: brightness(0.35) saturate(0.5);
}

.wiki-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 0%, rgba(212, 175, 55, 0.06), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(142, 108, 74, 0.05), transparent 45%),
        linear-gradient(180deg, rgba(10, 9, 7, 0.85) 0%, rgba(0, 0, 0, 0.95) 100%);
}

.page-content {
    position: relative;
    z-index: 1;
}

.wiki-shell {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* Ornate Title Plates */
.wrapper-title-plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: 100%;
    margin-bottom: 24px;
    padding: 8px 24px;
    border-radius: 4px;
    background: linear-gradient(180deg, #5c432d 0%, #3a2717 100%);
    border: 1px solid var(--mw-orange);
    color: var(--mw-gold) !important;
    font-family: 'Cinzel', serif;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(212, 175, 55, 0.15);
    text-shadow: 0 2px 4px #000;
    white-space: nowrap;
}

.wrapper-title-plate::before,
.wrapper-title-plate::after {
    content: '✦';
    color: var(--mw-orange);
    font-size: 0.8em;
    margin: 0 8px;
}

/* ==========================================================================
   Wiki Sidebar Navigation
   ========================================================================== */

.wiki-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--mw-orange) transparent;
    padding: 20px 14px;
    border: 2px solid var(--mw-border);
    border-radius: 8px;
    background: var(--mw-panel);
    box-shadow: var(--mw-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wiki-sidebar::-webkit-scrollbar {
    width: 4px;
}

.wiki-sidebar::-webkit-scrollbar-thumb {
    background: var(--mw-orange);
    border-radius: 2px;
}

.wiki-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wiki-nav li {
    margin-bottom: 6px;
}

.wiki-nav a {
    display: block;
    padding: 8px 14px;
    color: var(--mw-text);
    text-decoration: none;
    border-radius: 4px;
    font-family: 'Marcellus', serif;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.25s ease;
    border: 1px solid transparent;
    background: rgba(142, 108, 74, 0.05);
    text-shadow: 0 1px 2px #000;
}

.wiki-nav a:hover,
.wiki-nav a.active {
    color: var(--mw-gold);
    background: linear-gradient(180deg, #5c432d 0%, #3a2717 100%);
    border-color: var(--mw-orange);
    transform: translateX(4px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 10px rgba(0, 0, 0, 0.4);
}

.wiki-nav .nav-section {
    color: var(--mw-orange);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    padding: 14px 10px 6px;
    pointer-events: none;
    border-bottom: 1px solid rgba(142, 108, 74, 0.15);
    margin-bottom: 8px;
    text-shadow: 0 1px 2px #000;
}

/* ==========================================================================
   Wiki Section & Layout
   ========================================================================== */

.wiki-section {
    padding: 40px 0;
    border-bottom: 1px solid rgba(142, 108, 74, 0.15);
}

.wiki-section:last-child {
    border-bottom: none;
}

.wiki-title {
    color: var(--mw-gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 1.6rem;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px #000;
}

.wiki-subtitle {
    color: var(--mw-muted);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 24px;
    line-height: 1.5;
}

.wiki-divider {
    width: 60px;
    height: 3px;
    background: var(--mw-orange);
    margin-bottom: 24px;
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* ==========================================================================
   Wiki Cards & Panels
   ========================================================================== */

.wiki-card {
    position: relative;
    background: linear-gradient(145deg, rgba(40, 29, 19, 0.4), rgba(22, 18, 14, 0.95));
    border: 2px solid var(--mw-border);
    border-radius: 8px;
    padding: 22px;
    height: 100%;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.wiki-card:hover {
    border-color: var(--mw-orange);
    transform: translateY(-4px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.15);
}

.wiki-card h5 {
    color: var(--mw-gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    margin-bottom: 12px;
    text-shadow: 0 1px 2px #000;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wiki-card p {
    color: var(--mw-text);
    font-family: 'Inter', sans-serif;
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.wiki-card ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.wiki-card li {
    font-size: 0.85rem;
    color: var(--mw-text);
    margin-bottom: 6px;
    line-height: 1.5;
}

.shortcut-list {
    list-style: none;
    padding: 0 !important;
}

.shortcut-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(142, 108, 74, 0.1);
}

.shortcut-list li:last-child {
    border-bottom: none;
}

.shortcut-key {
    background: linear-gradient(180deg, #5c432d 0%, #3a2717 100%);
    border: 1px solid var(--mw-orange);
    color: var(--mw-gold);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-weight: bold;
    font-size: 0.75rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 2px 4px rgba(0, 0, 0, 0.4);
}

#mapSearch {
    background: rgba(18, 16, 13, 0.9) !important;
    border: 2px solid var(--mw-border) !important;
    color: #fff !important;
    border-radius: 6px;
    padding: 10px 14px;
    font-family: 'Inter', sans-serif;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
}

#mapSearch:focus {
    border-color: var(--mw-orange) !important;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2), inset 0 1px 3px rgba(0, 0, 0, 0.5) !important;
}

/* ==========================================================================
   Races & Classes Restyling
   ========================================================================== */

.race-card {
    background: var(--mw-panel);
    border: 2px solid var(--mw-border);
    border-radius: 8px;
    padding: 26px;
    margin-bottom: 24px;
    box-shadow: var(--mw-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.race-card h4 {
    color: var(--mw-gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    text-shadow: 0 2px 4px #000;
    margin-bottom: 0;
}

.race-hometown {
    font-family: 'Marcellus', serif;
    color: var(--mw-orange);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.race-desc {
    color: var(--mw-text);
    font-size: 0.9rem;
    line-height: 1.55;
    margin-top: 10px;
    margin-bottom: 18px;
}

.class-entry {
    background: rgba(10, 9, 7, 0.6);
    border-radius: 6px;
    padding: 16px;
    border: 1px solid var(--mw-border);
    border-left: 4px solid var(--mw-orange);
    height: 100%;
}

.class-entry h6 {
    color: #fff;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.class-role {
    font-family: 'Marcellus', serif;
    color: var(--mw-gold);
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 600;
}

.class-entry p {
    color: var(--mw-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    margin-top: 6px;
    margin-bottom: 0;
}

/* ==========================================================================
   Tables Style
   ========================================================================== */

.wiki-table-wrap {
    max-height: 440px;
    overflow-y: auto;
    border-radius: 6px;
    border: 2px solid var(--mw-border);
    background: var(--mw-panel);
    scrollbar-width: thin;
    scrollbar-color: var(--mw-orange) transparent;
    box-shadow: var(--mw-shadow);
}

.wiki-table-wrap::-webkit-scrollbar {
    width: 4px;
}

.wiki-table-wrap::-webkit-scrollbar-thumb {
    background: var(--mw-orange);
    border-radius: 2px;
}

.wiki-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.wiki-table thead th {
    background: linear-gradient(180deg, #5c432d 0%, #3a2717 100%);
    color: var(--mw-gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    border-bottom: 2px solid var(--mw-orange);
    position: sticky;
    top: 0;
    z-index: 1;
    text-shadow: 0 1px 2px #000;
}

.wiki-table tbody td {
    padding: 10px 16px;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(142, 108, 74, 0.15);
    color: var(--mw-text);
    font-family: 'Inter', sans-serif;
}

.wiki-table tbody tr:hover td {
    background: rgba(142, 108, 74, 0.1);
    color: #fff;
}

.wiki-table .empty-cell {
    color: rgba(228, 223, 213, 0.35);
    font-style: italic;
}

/* ==========================================================================
   Map guide rows
   ========================================================================== */

.map-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: linear-gradient(145deg, rgba(40, 29, 19, 0.3), rgba(22, 18, 14, 0.9));
    border: 2px solid var(--mw-border);
    border-radius: 6px;
    margin-bottom: 10px;
    transition: all 0.25s ease;
}

.map-row:hover {
    border-color: var(--mw-orange);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5), 0 0 10px rgba(212, 175, 55, 0.1);
}

.map-row .map-name {
    color: var(--mw-gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 160px;
}

.map-row .map-levels {
    color: var(--mw-orange);
    font-family: 'Marcellus', serif;
    font-size: 0.82rem;
    font-weight: bold;
    min-width: 90px;
}

.map-row .map-type {
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    min-width: 85px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.map-row .map-tip {
    color: var(--mw-muted);
    font-size: 0.82rem;
    line-height: 1.5;
    flex: 1;
}

.type-Starter  { background: rgba(40, 200, 80, 0.12); border-color: rgba(40, 200, 80, 0.3) !important; color: #52d677; }
.type-Forest   { background: rgba(50, 180, 50, 0.12); border-color: rgba(50, 180, 50, 0.3) !important; color: #5cc25c; }
.type-Plains   { background: rgba(220, 180, 40, 0.12); border-color: rgba(220, 180, 40, 0.3) !important; color: #ecd04c; }
.type-Wild     { background: rgba(255, 140, 0, 0.12); border-color: rgba(255, 140, 0, 0.3) !important; color: #ff9b33; }
.type-Desert   { background: rgba(210, 160, 80, 0.12); border-color: rgba(210, 160, 80, 0.3) !important; color: #dbab67; }
.type-Dungeon  { background: rgba(100, 100, 255, 0.12); border-color: rgba(100, 100, 255, 0.3) !important; color: #8787ff; }
.type-Abyss    { background: rgba(180, 0, 255, 0.12); border-color: rgba(180, 0, 255, 0.3) !important; color: #cc54ff; }
.type-Ruins    { background: rgba(255, 60, 60, 0.12); border-color: rgba(255, 60, 60, 0.3) !important; color: #ff6868; }
.type-Volcanic { background: rgba(255, 90, 0, 0.12); border-color: rgba(255, 90, 0, 0.3) !important; color: #ff7633; }
.type-Dark     { background: rgba(160, 0, 220, 0.12); border-color: rgba(160, 0, 220, 0.3) !important; color: #c438ff; }
.type-Mountain { background: rgba(80, 180, 255, 0.12); border-color: rgba(80, 180, 255, 0.3) !important; color: #5cb8ff; }
.type-Cave     { background: rgba(140, 90, 40, 0.12); border-color: rgba(140, 90, 40, 0.3) !important; color: #b08152; }
.type-PvP      { background: rgba(255, 0, 0, 0.12); border-color: rgba(255, 0, 0, 0.3) !important; color: #ff5252; }

/* Swatch colors */
.rank-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    vertical-align: middle;
    margin-right: 8px;
}

/* ==========================================================================
   Leveling & System Tips
   ========================================================================== */

.tip-card {
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.08), rgba(22, 18, 14, 0.95));
    border: 1.5px solid var(--mw-border);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.tip-card .tip-range {
    color: var(--mw-gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.tip-card p {
    color: var(--mw-text);
    font-size: 0.85rem;
    line-height: 1.55;
    margin-bottom: 0;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    padding: 16px 20px;
    background: linear-gradient(145deg, rgba(40, 29, 19, 0.3), rgba(22, 18, 14, 0.9));
    border: 1.5px solid var(--mw-border);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.25s ease;
}

.info-list li:hover {
    border-color: var(--mw-orange);
    transform: translateY(-2px);
}

.info-list li strong {
    color: var(--mw-gold);
    font-family: 'Cinzel', serif;
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    font-weight: 700;
}

.info-list li span {
    color: var(--mw-text);
    font-size: 0.85rem;
    line-height: 1.55;
}

/* ==========================================================================
   Quest chain cards
   ========================================================================== */

.quest-chain {
    background: linear-gradient(145deg, rgba(40, 29, 19, 0.4), rgba(22, 18, 14, 0.95));
    border: 2px solid var(--mw-border);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
    border-left: 5px solid var(--mw-orange) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.quest-chain h5 {
    color: var(--mw-gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    margin-bottom: 4px;
}

.quest-chain .quest-meta {
    font-family: 'Marcellus', serif;
    font-size: 0.75rem;
    color: var(--mw-muted);
    margin-bottom: 12px;
}

.quest-chain .quest-meta span {
    margin-right: 16px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.quest-chain .quest-meta .qm-npc { color: #d4af37; }
.quest-chain .quest-meta .qm-loc { color: #b8860b; }
.quest-chain .quest-meta .qm-lvl { color: #28c850; }

.quest-chain p {
    color: var(--mw-text);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 12px;
}

.quest-chain .quest-rewards {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--mw-text);
    background: rgba(212, 175, 55, 0.1);
    padding: 10px 16px;
    border-radius: 6px;
    border: 1px solid var(--mw-border);
}

.quest-chain .quest-rewards strong {
    color: var(--mw-gold);
}

/* ==========================================================================
   Hero Header Banner
   ========================================================================== */

.wiki-hero {
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.12), transparent 45%),
        linear-gradient(180deg, rgba(22, 18, 14, 0.95) 0%, rgba(10, 9, 7, 0.8) 100%);
    padding: 130px 0 50px;
    text-align: center;
    border-bottom: 2px solid var(--mw-border);
    margin-bottom: 30px;
    box-shadow: var(--mw-shadow);
}

.wiki-hero::after {
    content: '';
    position: absolute;
    inset: auto 10% 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--mw-orange), var(--mw-gold), var(--mw-orange), transparent);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.wiki-hero h1 {
    color: var(--mw-gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 2.6rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px #000, 0 0 15px rgba(212, 175, 55, 0.2);
}

.wiki-hero p {
    color: var(--mw-muted);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    max-width: 740px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Scrollspy Active Classes */
.wiki-nav a.current {
    color: var(--mw-gold);
    background: linear-gradient(180deg, #5c432d 0%, #3a2717 100%);
    border-color: var(--mw-orange);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Footer Styling */
footer {
    background: transparent;
    padding: 40px 0;
    text-align: center;
    color: var(--mw-muted);
    font-family: 'Inter', sans-serif;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .wiki-sidebar {
        position: static;
        max-height: none;
        margin-bottom: 30px;
    }
    .map-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .map-row .map-name,
    .map-row .map-levels,
    .map-row .map-type {
        min-width: 0;
        width: auto;
    }
}
