:root {
    --accent: #b45309; 
    --highlight: #fbbf24; 
    --bg-dark: #0f172a; 
    --panel-bg: rgba(30, 20, 10, 0.85);
    --gold: #f59e0b;
    --border-color: #78350f;
    --text-main: #fef3c7;
    --gem-slot: #1a120b;
    --success: #2ecc71;
}

body {
    font-family: Arial, sans-serif;
    background: #111;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    display: flex;
    height: 100vh;
    overflow: hidden;
    box-sizing: border-box;
}

/* --- THREE COLUMN LAYOUT --- */
.page-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* --- LEFT SIDEBAR (Items Categories) --- */
.sidebar-left {
    width: 290px;
    background: #181818;
    border-right: 2px solid var(--border-color);
    overflow-y: auto;
    padding: 15px 10px;
    box-sizing: border-box;
    flex-shrink: 0;
}

.sidebar-heading {
    font-size: 1.05em;
    font-weight: bold;
    color: var(--highlight);
    margin: 18px 0 6px 5px;
    text-transform: uppercase;
    border-bottom: 1px solid #444;
    padding-bottom: 3px;
}

.sidebar-subheading {
    font-size: 0.9em;
    font-weight: bold;
    color: var(--highlight);
    margin: 12px 0 4px 12px;
    border-bottom: 1px dashed #333;
    padding-bottom: 2px;
}

.nav-btn {
    display: block;
    width: 100%;
    background: none;
    border: none;
    color: #bbb;
    text-align: left;
    padding: 6px 12px;
    margin: 2px 0;
    font-size: 0.9em;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    box-sizing: border-box;
}

.indented-tier1 { padding-left: 16px; }
.indented-tier2 { padding-left: 28px; }

.nav-btn:hover { background: #2a2a2a; color: #fff; }

.nav-btn.active {
    border-left: 3px solid var(--highlight);
    background: #222;
    color: #fff;
}

/* --- MIDDLE CONTENT (Items Panels) --- */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 280px;
}

.main-content h1 { 
    margin-top: 0; 
    color: #fff; 
    width: 100%;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.item {
    border: 2px solid var(--border-color);
    margin: 20px 0;
    padding: 20px;
    border-radius: 8px;
    background: var(--panel-bg);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

table {
    width: 100%;
    margin-bottom: 10px;
    border-collapse: collapse;
}

table td {
    padding: 6px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

img {
    max-width: 100px;
    height: auto;
    vertical-align: middle;
    margin-left: 10px;
    display: inline-block;
}

.category-section { display: none; width: 100%; }
.category-section.active { display: block; }

/* --- RIGHT SIDEBAR (Checklist Style Navigation) --- */
.sidebar-right {
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--panel-bg);
    border-left: 2px solid var(--border-color);
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    box-shadow: -5px 5px 15px rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    z-index: 100;
}

.sidebar-right h3 {
    color: var(--highlight);
    text-transform: uppercase;
    font-size: 18px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 10px;
    margin-top: 0;
    text-align: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sidebar-nav button {
    width: 100%;
    background: var(--gem-slot);
    border: 1px solid var(--highlight);
    color: var(--highlight);
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    transition: 0.2s;
    text-align: left;
}

.sidebar-nav button:hover {
    background: var(--accent);
    color: white;
}

/* --- HAMBURGER BUTTON (mobile only) --- */
.hamburger {
    display: none;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 200;
    background: var(--gem-slot);
    border: 2px solid var(--highlight);
    color: var(--highlight);
    font-size: 22px;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* --- THEMED SCROLLBARS --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--gold);
}

/* --- RESPONSIVE BREAKPOINTS --- */
@media (max-width: 900px) {
    body {
        overflow: auto;
        height: auto;
    }
    .page-wrapper {
        flex-direction: column;
        height: auto;
        overflow: visible;
    }
    .sidebar-left {
        width: 100%;
        height: auto;
        max-height: 220px;
        border-right: none;
        border-bottom: 2px solid var(--border-color);
        overflow-x: auto;
        overflow-y: auto;
    }
    .main-content {
        height: auto;
        overflow: visible;
        padding: 16px;
    }
    .item {
        padding: 14px;
        margin: 12px 0;
    }
    table td {
        font-size: 0.85em;
        padding: 4px;
    }
    img {
        max-width: 70px;
    }
}

@media (max-width: 1550px) {
    /* Show hamburger, hide fixed sidebar */
    .hamburger {
        display: flex;
    }
    .main-content { margin-right: 0; }
    
    .sidebar-right {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        width: 75vw;
        max-width: 300px;
        height: 100vh;
        z-index: 150;
    }
    
    .sidebar-right.open {
        display: flex;
    }
    
    /* Overlay behind open nav */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 140;
    }
    
    .nav-overlay.open {
        display: block;
    }
    
    .main-content {
        padding: 12px 8px;
    }
    
    .main-content h1 {
        font-size: 1.3em;
    }
    
    .item {
        padding: 10px;
    }
    
    .nav-btn {
        font-size: 0.82em;
        padding: 5px 8px;
    }
}
