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

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #1a1a1a;
    color: #ffffff;
    line-height: 1.6;
    min-height: 100vh;
}

/* Layout Container */
.wiki-container {
    display: flex;
    min-height: 100vh;
    background: #1a1a1a;
}

/* Sidebar */
.wiki-sidebar {
    width: 280px;
    background: #0f0f0f;
    border-right: 2px solid #2a2a2a;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    left: 0;
    top: 0;
}

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

.wiki-sidebar::-webkit-scrollbar-track {
    background: #0f0f0f;
}

.wiki-sidebar::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 4px;
}

.wiki-sidebar::-webkit-scrollbar-thumb:hover {
    background: #3a3a3a;
}

/* Logo */
.wiki-logo {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.wiki-logo img {
    max-width: 200px;
    height: auto;
}

/* Sidebar Sections */
.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-section-header {
    background: #2a2a2a;
    padding: 12px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 5px;
    transition: background 0.3s ease;
}

.sidebar-section-header:hover {
    background: #3a3a3a;
}

.sidebar-section-title {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-section-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
}

.sidebar-section-toggle {
    color: #888;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.sidebar-section.active .sidebar-section-toggle {
    transform: rotate(180deg);
}

.sidebar-section-links {
    padding-left: 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-section.active .sidebar-section-links {
    max-height: 1000px;
}

.sidebar-link {
    display: block;
    padding: 8px 10px;
    color: #b0b0b0;
    text-decoration: none;
    border-radius: 3px;
    margin-bottom: 3px;
    transition: all 0.2s ease;
    font-size: 13px;
}

.sidebar-link:hover {
    background: #2a2a2a;
    color: #ffffff;
}

.sidebar-link.active {
    background: #3a3a3a;
    color: #ffd700;
}

/* Main Content */
.wiki-main {
    flex: 1;
    margin-left: 280px;
    padding: 0;
    min-height: 100vh;
}

/* Top Bar */
.wiki-topbar {
    background: #2a2a2a;
    padding: 15px 30px;
    border-bottom: 1px solid #3a3a3a;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.wiki-breadcrumb {
    color: #b0b0b0;
    font-size: 14px;
}

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

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

.wiki-topbar-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wiki-topbar-link {
    color: #b0b0b0;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s ease;
}

.wiki-topbar-link:hover {
    color: #ffffff;
}

/* Content Area */
.wiki-content {
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Page Header */
.wiki-page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.wiki-page-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.wiki-page-description {
    color: #b0b0b0;
    font-size: 16px;
    line-height: 1.6;
}

/* Cards Grid */
.wiki-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.wiki-card {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.wiki-card:hover {
    border-color: #ffd700;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
}

.wiki-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.wiki-card-description {
    font-size: 14px;
    color: #b0b0b0;
    line-height: 1.5;
}

.warning-box {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 8px;
    padding: 16px 18px;
    margin-top: 24px;
    color: #fca5a5;
    line-height: 1.6;
}

.warning-box strong {
    color: #f87171;
}

/* Content Sections */
.wiki-section {
    margin-bottom: 40px;
}

.wiki-section-title {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3a3a3a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wiki-section-icon {
    width: 24px;
    height: 24px;
}

/* Tables */
.wiki-table {
    width: 100%;
    border-collapse: collapse;
    background: #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.wiki-table thead {
    background: #3a3a3a;
}

.wiki-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #ffffff;
    font-size: 14px;
    border-bottom: 2px solid #4a4a4a;
}

.wiki-table td {
    padding: 12px 15px;
    color: #b0b0b0;
    font-size: 14px;
    border-bottom: 1px solid #3a3a3a;
}

.wiki-table tbody tr:hover {
    background: #3a3a3a;
}

.wiki-table tbody tr:last-child td {
    border-bottom: none;
}

.wiki-table tbody tr:last-child td {
    border-bottom: none;
}

/* Divine Gems filter controls */
.gem-attr-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.gem-attr-filter-select,
.gem-attr-filter-search {
    min-width: 140px;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #4a4a4a;
    background-color: #1e1e1e;
    color: #f0f0f0;
    font-family: inherit;
    font-size: 14px;
}

.gem-attr-filter-select {
    cursor: pointer;
    appearance: none;
    color-scheme: dark;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23b0b0b0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

.gem-attr-filter-select:hover,
.gem-attr-filter-search:hover {
    border-color: #6a6a6a;
}

.gem-attr-filter-select:focus,
.gem-attr-filter-search:focus {
    outline: none;
    border-color: #b38a42;
    box-shadow: 0 0 0 2px rgba(179, 138, 66, 0.25);
}

.gem-attr-filter-select option {
    background-color: #1a1a1a;
    color: #f0f0f0;
}

.gem-attr-filter-search {
    flex: 1;
    min-width: 200px;
}

.gem-attr-filter-search::placeholder {
    color: #888;
}

.gem-attr-table-wrap {
    overflow-x: auto;
}

.gem-attr-empty {
    margin-top: 16px;
    opacity: 0.8;
}

/* Text Content */
.wiki-text {
    color: #b0b0b0;
    line-height: 1.8;
    margin-bottom: 20px;
}

.wiki-text p {
    margin-bottom: 15px;
}

.wiki-text h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
}

.wiki-text h3 {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
}

.wiki-text ul,
.wiki-text ol {
    margin-left: 20px;
    margin-bottom: 15px;
}

.wiki-text li {
    margin-bottom: 8px;
}

.wiki-text strong {
    color: #ffffff;
    font-weight: 600;
}

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

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

/* Responsive */
@media (max-width: 768px) {
    .wiki-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .wiki-sidebar.open {
        transform: translateX(0);
    }

    .wiki-main {
        margin-left: 0;
    }

    .wiki-content {
        padding: 20px;
    }

    .wiki-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Social Media Buttons */
.wiki-social-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-right: 10px;
}

.wiki-social-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
}

.wiki-social-btn:hover {
    transform: translateY(-2px) scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.wiki-social-btn svg {
    width: 18px;
    height: 18px;
    fill: #ffffff;
}

.wiki-social-instagram {
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: #bc1888;
}

.wiki-social-facebook {
    background: linear-gradient(135deg, #3b5998 0%, #2d4373 100%);
    border-color: #3b5998;
}

.wiki-social-discord {
    background: linear-gradient(135deg, #5865F2 0%, #4752C4 100%);
    border-color: #5865F2;
}

.wiki-social-website {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
}

/* Language Selector */
.wiki-language-selector {
    position: relative;
}

.wiki-language-btn {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wiki-language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 5px;
    min-width: 150px;
    display: none;
    z-index: 1000;
}

.wiki-language-selector.open .wiki-language-dropdown {
    display: block;
}

.wiki-language-option {
    padding: 10px 15px;
    color: #b0b0b0;
    cursor: pointer;
    transition: background 0.2s ease;
    font-size: 14px;
}

.wiki-language-option:hover {
    background: #3a3a3a;
    color: #ffffff;
}

/* Badges */
.wiki-badge {
    display: inline-block;
    padding: 3px 8px;
    background: #ff4444;
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 3px;
    margin-left: 5px;
}

.wiki-fragments-group-title {
    font-size: 15px;
    font-weight: 600;
    color: #e8c547;
    margin: 18px 0 10px;
}

.wiki-fragments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin: 12px 0 20px;
}

.wiki-fragment-card {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
}

.wiki-fragment-card img {
    display: block;
    margin: 0 auto 8px;
    image-rendering: pixelated;
    width: 32px;
    height: 32px;
}

.wiki-fragment-card strong {
    display: block;
    font-size: 12px;
    color: #ffffff;
    line-height: 1.3;
    margin-bottom: 4px;
}

.wiki-fragment-card small {
    display: block;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.35;
}

.wiki-table-reward {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wiki-table-reward img {
    width: 32px;
    height: 32px;
    image-rendering: pixelated;
    flex-shrink: 0;
}
