/* Sidebar e Menu Toggle */
.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 250px;
    background: var(--card-bg);
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: transform 0.3s ease;
    transform: translateX(0);
    z-index: 900;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 2rem;
}

.user-info {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--borda);
}

.user-info h3 {
    margin: 0 0 1rem 0;
    color: var(--texto-primario);
}

.level-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.level {
    color: var(--destaque);
    font-weight: bold;
}

.xp-bar {
    height: 6px;
    background: var(--bg-secundario);
    border-radius: 3px;
    overflow: hidden;
}

.xp-progress {
    height: 100%;
    background: var(--destaque);
    transition: width 0.3s ease;
}

.xp-text {
    font-size: 0.8rem;
    color: var(--texto-secundario);
}

.sidebar-hidden {
    transform: translateX(-100%);
}

.progress-overview {
    padding: 1rem 0;
    border-bottom: 1px solid var(--borda);
}

.progress-overview h4 {
    margin: 0 0 1rem 0;
    color: var(--texto-primario);
}

.progress-bar {
    height: 8px;
    background: var(--bg-secundario);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress {
    height: 100%;
    background: var(--destaque);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--texto-secundario);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    color: var(--texto-primario);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.sidebar-nav a:hover {
    background: var(--bg-secundario);
    color: var(--destaque);
}

.sidebar-nav a.active {
    background: var(--destaque);
    color: white;
}

.sidebar-nav i {
    width: 20px;
    text-align: center;
}

.menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1001;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.menu-toggle.active {
    transform: translateX(250px);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar:not(.sidebar-hidden) {
        transform: translateX(0);
    }

    .menu-toggle:not(.active) {
        transform: translateX(0);
    }
}
