@font-face {
    font-family: 'CustomFont';
    src: url('../../fonts/font.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'CustomFont';
    src: url('../../fonts/bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}


:root {
    --bg: #0d0d0d;
    --card: #141414;
    --card-hover: #1c1c1c;
    --muted: #bfc9df;
    --text: #e9eef8;
    --accent: #5561ff;
    --accent-hover: #6d79ff;
    --border: #222;
    --code-bg: #0f0f10;
    --success: #7fffa1;
    --warning: #ffea73;
    --glow: rgba(115, 135, 255, 0.12);
    --pastel-blue: #a8d5ff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'CustomFont', Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Header */
header {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(15, 15, 15, 0.8);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'CustomFont', sans-serif;
    font-weight: 600;
    font-size: 20px;
    color: var(--text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s;
    font-size: 14px;
    margin-left: 24px;
}

nav a:hover {
    color: var(--text);
}

/* Wiki Layout */
.wiki-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    padding: 32px;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 96px;
    height: fit-content;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
}

.sidebar h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 16px;
    font-weight: 600;
}

.sidebar-section {
    margin-bottom: 24px;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    transition: all .2s;
    font-size: 14px;
    margin-bottom: 4px;
    cursor: pointer;
}

.sidebar-item:hover {
    background: var(--card-hover);
    color: var(--accent);
}

.sidebar-item:hover .icon {
    color: var(--accent);
}

.sidebar-item.active {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
}

.sidebar-item.active .icon {
    color: #fff;
}

.sidebar-item.sub {
    padding-left: 40px;
    font-size: 13px;
}

.icon {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin-right: 10px;
    transition: all .2s;
}

/* Icon colors by category */
.sidebar-section:nth-child(1) .sidebar-item .icon {
    color: #3b82f6;
}

/* Blue */
.sidebar-section:nth-child(2) .sidebar-item .icon {
    color: #f59e0b;
}

/* Orange */
.sidebar-section:nth-child(3) .sidebar-item .icon {
    color: #10b981;
}

/* INÍCIO DAS REGRAS ADICIONADAS PARA AS NOVAS SEÇÕES (LOOT, SYSTEMS E RESOURCES) */
.sidebar-section:nth-child(4) .sidebar-item .icon {
    color: #a855f7; /* Roxo para Loot & Drops */
}

.sidebar-section:nth-child(5) .sidebar-item .icon {
    color: #10b981; /* Verde antigo realocado para Advanced Systems */
}

.sidebar-section:nth-child(6) .sidebar-item .icon {
    color: #ec4899; /* Rosa para Resources */
}
/* FIM DAS REGRAS ADICIONADAS */

/* Green */

.sidebar-item.active .icon {
    color: #fff !important;
}

/* Main Content */
.wiki-content {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 48px;
    min-height: 600px;
}

/* Back Link Integrado */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
    width: fit-content;
    margin-bottom: 24px;
}

.back-link:hover {
    color: var(--text);
}

.wiki-content h1 {
    font-size: 36px;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.wiki-content h2 {
    font-size: 28px;
    margin-top: 48px;
    margin-bottom: 16px;
    font-weight: 700;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.wiki-content h3 {
    font-size: 22px;
    margin-top: 32px;
    margin-bottom: 12px;
    font-weight: 600;
}

.wiki-content h4 {
    font-size: 18px;
    margin-top: 24px;
    margin-bottom: 10px;
    font-weight: 600;
}

.wiki-content p {
    line-height: 1.7;
    margin-bottom: 16px;
    color: var(--text);
    font-size: 15px;
}

.wiki-content ul, .wiki-content ol {
    margin: 16px 0 16px 24px;
    line-height: 1.8;
}

.wiki-content li {
    margin-bottom: 8px;
    color: var(--text);
}

.wiki-content a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.wiki-content a:hover {
    text-decoration: underline;
}

/* Code Blocks */
.wiki-content code {
    background: var(--code-bg);
    padding: 3px 8px;
    border-radius: 4px;
    font-family: ui-monospace, monospace;
    font-size: 13px;
    color: #e879f9;
    border: 1px solid var(--border);
}

.wiki-content pre {
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    overflow-x: auto;
    margin: 20px 0;
}

.wiki-content pre code {
    background: none;
    padding: 0;
    border: none;
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* Info Boxes */
.info-box {
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid var(--accent);
    background: rgba(59, 130, 246, 0.1);
}

.info-box.warning {
    border-left-color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.info-box.success {
    border-left-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.info-box p {
    margin-bottom: 0;
}

.info-box strong {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tables */
.wiki-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--code-bg);
    border-radius: 8px;
    overflow: hidden;
}

.wiki-content th {
    background: var(--border);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.wiki-content td {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 14px;
}

.wiki-content tr:hover {
    background: rgba(59, 130, 246, 0.05);
}

/* Search */
.wiki-search {
    margin-bottom: 20px;
}

.wiki-search input {
    width: 100%;
    padding: 10px 16px;
    background: var(--code-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
}

.wiki-search input:focus {
    outline: none;
    border-color: var(--accent);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--text);
}

.breadcrumb span {
    color: var(--border);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media(max-width:1024px) {
    .wiki-container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .wiki-content {
        padding: 32px 24px;
    }
}

@media(max-width:640px) {
    .wiki-container {
        padding: 16px;
    }

    .wiki-content {
        padding: 24px 16px;
    }

    .wiki-content h1 {
        font-size: 28px;
    }

    .wiki-content h2 {
        font-size: 22px;
    }
}