/* Sidebar Styles */
.user-sidebar {
    position: fixed;
    left: -350px;
    top: 0;
    width: 350px;
    height: 100vh;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.user-sidebar.open {
    left: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Garantir que overlay não bloqueie a sidebar */
.user-sidebar {
    z-index: 10001 !important;
}

.user-sidebar * {
    position: relative;
    z-index: auto;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-header h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 16px;
    color: #e63946;
    margin: 0;
}

.sidebar-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 20px;
}

.sidebar-avatar {
    width: 120px;
    height: 200px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: white;
    border: 3px solid #10b981;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: pixelated;
}

.sidebar-user-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

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

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
    width: 100%;
    text-align: left;
    font-family: inherit;
    font-size: 16px;
}

.sidebar-item:focus {
    outline: none;
}

.sidebar-item:focus-visible {
    outline: 2px solid #e63946;
    outline-offset: 2px;
}

.sidebar-item:hover {
    background: rgba(230, 57, 70, 0.2);
    border-color: #e63946;
    transform: translateX(5px);
}

.sidebar-item.active {
    background: rgba(230, 57, 70, 0.3);
    border-color: #e63946;
}

.sidebar-icon {
    font-size: 24px;
    width: 30px;
    text-align: center;
}

.sidebar-footer {
    margin-top: auto;
    padding: 15px 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.sidebar-logout-btn {
    width: 100%;
    padding: 12px 15px;
    background: #e63946;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    transition: background 0.3s;
    text-align: left;
}

.sidebar-logout-btn:hover {
    background: #d62839;
}

/* Seções de conteúdo */
.sidebar-section {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
    color: #fff;
    max-height: 60vh;
    overflow-y: auto;
    position: relative;
    z-index: 2;
}

.sidebar-section[style*="display: block"] {
    display: block !important;
}

.sidebar-section h4 {
    font-family: 'Press Start 2P', cursive;
    font-size: 14px;
    color: #e63946;
    margin-bottom: 20px;
}

.profile-display {
    text-align: center;
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #e63946;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    color: white;
}

.profile-info {
    margin-bottom: 20px;
}

.profile-info h5 {
    font-size: 20px;
    color: #fff;
    margin-bottom: 10px;
}

.profile-info p {
    color: #ccc;
    font-size: 14px;
    margin: 5px 0;
}

.edit-profile-btn {
    width: 100%;
    padding: 12px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.edit-profile-btn:hover {
    background: #45a049;
}

/* Responsivo - Tablet */
@media (max-width: 1024px) {
    .user-sidebar {
        width: 320px;
    }
    
    .sidebar-header h3 {
        font-size: 14px;
    }
    
    .sidebar-avatar {
        width: 100px;
        height: 160px;
    }
}

/* Responsivo - Mobile */
@media (max-width: 850px) {
    .user-sidebar {
        width: 100%;
        left: -100%;
        max-width: 100vw;
    }
    
    .sidebar-header {
        padding: 15px;
    }
    
    .sidebar-header h3 {
        font-size: 12px;
    }
    
    .sidebar-close-btn {
        width: 35px;
        height: 35px;
        font-size: 28px;
    }
    
    .sidebar-content {
        padding: 15px;
    }
    
    .sidebar-user-info {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        gap: 12px;
    }
    
    .sidebar-avatar {
        width: 80px;
        height: 120px;
        margin: 0 auto;
    }
    
    .sidebar-user-name {
        font-size: 16px;
    }
    
    .sidebar-nav {
        gap: 8px;
    }
    
    .sidebar-item {
        padding: 12px;
        font-size: 14px;
        gap: 12px;
    }
    
    .sidebar-icon {
        font-size: 20px;
        width: 25px;
    }
    
    .sidebar-section {
        padding: 15px;
        margin-top: 15px;
        margin-bottom: 15px;
    }
    
    .sidebar-section h4 {
        font-size: 12px;
        margin-bottom: 15px;
    }
    
    .profile-avatar-large {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }
    
    .avatar-placeholder-large {
        font-size: 36px;
    }
    
    .profile-info h5 {
        font-size: 18px;
        margin-bottom: 8px;
    }
    
    .profile-info p {
        font-size: 13px;
        margin: 4px 0;
    }
    
    .edit-profile-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .sidebar-footer {
        padding: 12px 15px;
    }
    
    .sidebar-logout-btn {
        padding: 10px 12px;
        font-size: 13px;
    }
}

