/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light mode colors */
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #666666;
    --accent-orange: #ff6b35;
    --accent-purple: #9b59b6;
    --accent-gold: #f1c40f;
    --sidebar-bg: #2c3e50;
    --sidebar-text: #ecf0f1;
    --header-gradient: linear-gradient(135deg, #ff6b35, #9b59b6, #f1c40f);
    --border-color: #ddd;
    --info-box-bg: #f8f9fa;
    --shadow: 0 2px 5px rgba(0,0,0,0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --sidebar-bg: #000000;
    --sidebar-text: #ffffff;
    --border-color: #404040;
    --info-box-bg: #363636;
    --shadow: 0 2px 5px rgba(0,0,0,0.3);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

.wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    position: relative;
}

/* Minecraft-style font for headings */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Press Start 2P', cursive;
    margin-bottom: 1rem;
    line-height: 1.4;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #1a2632 100%);
    color: var(--sidebar-text);
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.sidebar-header h2 {
    color: var(--accent-gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.sidebar-header i {
    color: var(--accent-orange);
    margin-right: 0.5rem;
}

.sidebar-search {
    position: relative;
    margin-bottom: 1.5rem;
}

.sidebar-search input {
    width: 100%;
    padding: 0.8rem 2.5rem 0.8rem 1rem;
    border: none;
    border-radius: 25px;
    background-color: rgba(255,255,255,0.1);
    color: var(--sidebar-text);
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.sidebar-search input:focus {
    outline: none;
    background-color: rgba(255,255,255,0.2);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.3);
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-gold);
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.5rem;
}

.sidebar-nav a {
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 0.8rem 1rem;
    display: block;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar-nav a i {
    margin-right: 0.8rem;
    width: 20px;
    color: var(--accent-orange);
}

.sidebar-nav li:hover a {
    background: linear-gradient(90deg, var(--accent-purple), transparent);
    transform: translateX(5px);
}

.sidebar-nav li.active a {
    background: linear-gradient(90deg, var(--accent-orange), var(--accent-purple));
    color: white;
    box-shadow: 0 4px 10px rgba(255,107,53,0.3);
}

.sidebar-footer {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.server-status i {
    font-size: 0.6rem;
    margin-right: 0.5rem;
}

.online {
    color: #2ecc71;
}

/* Main Content Styles */
.main-content {
    background-color: var(--bg-secondary);
    padding: 2rem;
    min-height: 100vh;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 2rem;
    padding: 0.8rem 1rem;
    background: linear-gradient(90deg, var(--accent-purple), transparent);
    border-radius: 8px;
    color: white;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--accent-gold);
}

.breadcrumb i {
    margin: 0 0.5rem;
    font-size: 0.8rem;
}

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, var(--info-box-bg), white);
    border-left: 4px solid var(--accent-orange);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255,107,53,0.2);
}

.info-box.rarity {
    border-left-color: var(--accent-purple);
}

.info-box.commands {
    border-left-color: var(--accent-gold);
}

.info-box.stats {
    border-left-color: #3498db;
}

.info-box h3 {
    margin-bottom: 1rem;
    color: var(--accent-orange);
}

.info-box.rarity h3 {
    color: var(--accent-purple);
}

.info-box.commands h3 {
    color: var(--accent-gold);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.category-card {
    background: linear-gradient(135deg, var(--bg-secondary), var(--info-box-bg));
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.category-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255,107,53,0.3);
}

.category-card i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: var(--header-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.category-card h3 {
    margin-bottom: 0.5rem;
}

.category-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.5rem;
    background: var(--header-gradient);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.category-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px var(--accent-gold);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 25px;
    background: var(--header-gradient);
    color: white;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,107,53,0.4);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Tables */
.wiki-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.wiki-table thead {
    background: var(--header-gradient);
    color: white;
}

.wiki-table th,
.wiki-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.wiki-table tbody tr:hover {
    background: var(--info-box-bg);
}

/* Toggle Buttons */
.mobile-menu-toggle,
.dark-mode-toggle {
    display: none;
    position: fixed;
    z-index: 1000;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--header-gradient);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.mobile-menu-toggle {
    top: 1rem;
    left: 1rem;
}

.dark-mode-toggle {
    bottom: 1rem;
    right: 1rem;
}

.mobile-menu-toggle:hover,
.dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Footer */
.footer {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--sidebar-bg), #000);
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-orange);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-orange);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        z-index: 999;
        transition: left 0.3s ease;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .mobile-menu-toggle,
    .dark-mode-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-content {
        padding: 1rem;
        margin-top: 3rem;
    }
    
    h1 {
        font-size: 1.2rem;
    }
    
    h2 {
        font-size: 1rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-result-item:hover {
    background-color: var(--info-box-bg);
}

.search-result-item a {
    color: var(--text-primary);
    text-decoration: none;
    display: block;
}

.search-result-item .category {
    font-size: 0.8rem;
    color: var(--accent-orange);
    margin-left: 0.5rem;
}